Introduction
Welcome to the Mock66 documentation. Learn how to generate realistic mock APIs in seconds.
Mock66 allows you to create, customize, and host mock REST APIs with dynamic data generation. Stop writing JSON files manually and start building with realistic data immediately.
Why use Mock66?
Visual Schema Editor
Define complex JSON structures and relationships using an intuitive visual interface.
Dynamic Data
Powered by faker.js for realistic names, dates, and emails.
What is JSON?
JSON (JavaScript Object Notation) is a standard text-based format for representing structured data based on JavaScript object syntax. It is commonly used for transmitting data in web applications (e.g., sending some data from the server to the client, so it can be displayed on a web page, or vice versa).
Think of it as a way to organize information so that both humans and computers can easily understand it. It uses key-value pairs, similar to a dictionary.
Example
Here is a simple example of a JSON object representing a user profile:
In this example, "name" is a key, and "Arex" is its value. Lists of items are enclosed in square brackets [], and objects are enclosed in curly braces {}.
What are HTTP requests?
HTTP requests are messages sent by a client (like your web browser or a mobile app) to a server to ask for data or to trigger an action. It's the foundation of data communication on the World Wide Web.
When you visit a website, your browser sends a GET request to the server to fetch the page content. When you submit a form, it might send a POST request to save your data.
Common HTTP Methods
- GET: Retrieve data from a server (e.g., "Get me the list of users").
- POST: Send data to a server to create a new resource (e.g., "Create a new user").
- PUT: Update an existing resource (e.g., "Update user #101's email").
- DELETE: Remove a resource (e.g., "Delete user #101").
Example
Here is how you might make a request to a Mock66 API using JavaScript's fetch function: