mocki.io Open in urlscan Pro
13.35.58.18  Public Scan

URL: https://mocki.io/fake-json-api
Submission: On May 15 via api from US — Scanned from DE

Form analysis 1 forms found in the DOM

<form>
  <textarea id="body" class="form-control mt-4" rows="5" placeholder="JSON Response Body"></textarea>
  <div id="fail" style="display: none" class="alert alert-warning mt-4" role="alert"> Failed! Make sure that your JSON is valid </div>
  <div id="success" style="display: none" class="alert alert-success mt-4" role="alert"> Success! Your API is available at $API_URL </div>
  <button type="button" onclick="createApi()" id="create" class="btn btn-primary btn-pill mt-4 w-100" style="margin-right: auto"> Create API </button>
</form>

Text Content

 * Use Cases
   
   MOCK API FOR MICROSERVICES
   
   Create microservice mocks
   
   
   FAKE JSON API
   
   Create an API with fake JSON data
   
   
   GRAPHQL
   
   Mock your GraphQL API
   
   
   MOCK HTTP SERVER
   
   Mock an HTTP server
 * Pricing
 * Documentation
 * Blog

Sign Up


FAKE JSON API

Access fake APIs with dummy data ๐ŸŽญ


CREATE YOUR OWN FAKE JSON API

The editor below allows you to create a fake JSON API with your own fake data.
Scroll down for ready-to-use examples of different fake APIs.


FREE API EDITOR

If you want to create a simple API for testing purposes, simply enter a response
body below and press Create API to get your custom API URL.

Failed! Make sure that your JSON is valid
Success! Your API is available at $API_URL
Create API

Use Mocki to create a fully fledged mock API. Sign up for a 7-day free trial and
get:

 * Multiple API endpoints
 * Monitoring dashboard
 * Simulated errors and delays
 * Generated test data

Sign Up (Free Trial)

JAN, ARCHITECT

Mocki is a great tool for creating and designing REST APIs for data ingestion

OSKAR, CTO

We use Mocki for simulating API responses in our enterprise OAuth service

JOSHUA, DEVELOPER

When testing how our apps handle different API responses, Mocki is a key tool.


READY TO USE FAKE APIS

Below we have created APIs that serve test data for you to use. We created them
with the form above. If you want to create your own API instead of using ours,
feel free!


USERS

Users are one of the most fundamental components for a lot of apps. Therefore we
will start out by using some endpoints providing a fake JSON API for users.

LIST USERS

A simple list of users. Call the endpoint we have prepared below to get started.

URL: https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8

To test the request you can open you terminal and use cURL. You will receive you
fake JSON data back as a list of users shown below.

cURL

curl https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8


Response:

[
  {
    "name": "Harry Potter",
    "city": "London"
  },
  {
    "name": "Don Quixote",
    "city": "Madrid"
  },
  {
    "name": "Joan of Arc",
    "city": "Paris"
  },
  {
    "name": "Rosa Park",
    "city": "Alabama"
  }
]


GET USER

If you want to simulate a detail request for a single user you can create
another endpoint in the form above. Or just use the one we have provided below.

URL: https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8

cURL

curl https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8


Response:

{
   "name": "Rosa Parks",
   "city": "Alabama"
}



TO DOS

Many tutorials and getting started guides consist of to do apps. Below we
provide you with endpoints serving fake to do JSON data. You can use these APIs
for building your own to do app or simply while learning a new programming
language.

LIST TO DOS

This list endpoint returns three TODOs as response.

URL: https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8

cURL

curl https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8


Response:

[
   {
      "title": "Clean the kitchen",
      "description": "Mop the floor, wipe the countertop and don't forget to take out the trash!"
   },
   {
      "title": "Call Mom",
      "description": "It's her birthday!"
   },
   {
      "title": "Water flowers",
      "description": "They need water, or they will die."
   }
]


GET TO DO DETAILS

This endpoint returns the details of a single to do item.

URL: https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8

cURL

curl https://mocki.io/v1/d4867d8b-b5d5-4a48-a4ab-79131b5809b8


Response:

{
   "title": "Clean the kitchen",
   "description": "Mop the floor, wipe the countertop and don't forget to take out the trash!"
}



CREATE YOUR OWN FAKE API

If you want to create your own fake API with multiple endpoints, dynamic
responses and more advanced features, you can use Mocki. We created the tool to
make development and testing APIs a lot easier.

If you for example wanted to mock the endpoints provided above in a single API,
it would require the following endpoints:

 https://mocki.io/v1/users
 https://mocki.io/v1/users/{id}
 https://mocki.io/v1/todos
 https://mocki.io/v1/todos/{id}


When using Mocki you can do this by using our API editor. It lets you select
response code and data to return for each endpoint. You can also create
conditions for serving dynamic responses, simulated delays and errors.




TESTING USING A FAKE API

Developing a fake API can be useful for testing purposes as well. Let us say you
have two different systems communicating. When developing one of the systems
locally you might not be able to start and run the other system on your
developer machine. This is where a fake JSON API can come in handy. You could
point all calls to the second system over to your fake API instead. If the fake
API returns the expected JSON responses, you can make sure that the
functionality of the system we develop locally is doing what it is supposed to
do.


VERSION CONTROL YOUR API

Version control is fundamental in all development processes. It makes it easy to
track changes in your code and if need be revert to previous versions. This can
also be applied on your mock configuration. A Mocki API can be defined using a
configuration file that you can put inside a Git repository. When you make
changes to the API configuration, Mocki will update it automatically.


CONCLUSION

Using our ready made fake APIs you can build your own applications while
learning a new language. You can also create your own APIs with custom data both
using our free tool and the more advanced Mocki editor.

Testing external dependencies can be made easier using a fake API to simulate
responses and enabling development without the external service actually being
up and running.

Version controlling your API is made easy using Mocki. Simply put your
configuration file inside a GitHub repository and Mocki will update it on the
fly when you push changes.

Do you have any ideas or requests on fake data you would like to see on this
page? Reach out to us through the chat!

ยฉ 2020

BLOG

 * Service Virtualization for Microservices
 * Mock API for Testing
 * GraphQL Sweden Meetup

FEATURED PAGES

 * Docs: Getting started
 * Docs: Configuration
 * Docs: Deployment
 * Terms of Service
 * Privacy Policy

ABOUT

Created with ๐Ÿงก by Sveten

Want to get in touch with us? Use the chat in the bottom right to send us a
message! ๐Ÿš€