Mock API

 

Design your mock

General informations

Request name
Response delay (between 0 and 5 seconds)

Request configuration

Method
URI https://extendsclass.com/mock/rest/ /
Request body

Response configuration

Status code
Content-type Content-encoding
Response body

This fake REST API allows you to create mock REST API, and monitor your Mocks Calls, and track your requests!

You can create several mock, and they will be saved. You must keep your API key for later editing.

User guide

  • If you already have a 'API KEY', click on "Load Collection" button in order to retrieve your mock.
  • Click on the "New mock +" button to display the form to add a mock
  • Click on the "Add or update" button to add or update a mock
  • Click on "delete" button to delete a mock
  • Click on "view" button to display a mock
  • You can monitor your Mocks Calls by clicking on "Request Logger" button

Note: CORS requests are automatically accepted from any origin.

Mock REST API

This free online Mock REST API enables you to create fake APIs for test data retrieval.

This allows you to develop your frontend without waiting for the backend to be fully developed, avoiding unnecessary delays and optimizing your time.

You have the ability to define all responses, including HTTP headers, HTTP status code, and response payload. With complete flexibility, you can conduct thorough testing by tailoring responses according to your specific requirements.

If you want to generate JSON data, you can use our fake JSON generator.

Mock data

In the realm of object-oriented programming (OOP), mock objects serve as simulated counterparts to real objects, emulating their behavior under controlled conditions. Think of it as a dynamic simulation.

Leverage mock objects when accessing the actual service or object isn't feasible. For instance, in scenarios where a front-end developer is awaiting back-end development completion, Mock API proves invaluable by eliminating the need for waiting and minimizing time wastage. The strategic use of mocking can be a highly potent time-saving strategy.

Advantages of Mocking

You can create tests in advance. You can write tests before the service is created, and test your scenarios. Your coworkers can work in parallel without waiting for you to build the services.

You can also easily create proof of concepts, mocking allows to rapidly prototype different response shapes to see how they work.

Another advantage is being able to work offline.

Disadvantages of Mocking

Mocking have also some disadvantages.

It takes extra work, you must evaluate the effort you will put into the Mock.

Mocks are also subject to bugs, there may be differences with the real service.



Load Mock Collection
Your API key ([A-Za-z0-9])
You can report a bug or give feedback by adding a comment (below) or by clicking "Contact me" link (at the top right hand corner of the page).

Comments




Paolo-2019-10-24 18:14
Response delay does not work. Please, there is a way to delay response ?


Cyril-2019-11-08 19:38
Hi, yes there was a bug, I have just corrected! Millisecond vs second ...


Alex-2020-03-11 07:24
ALl OK


Matthias-2021-08-26 14:46
Hey!
Great stuff, thank you for creating this :)

One idea that would help us: Do you think it's possible to include query parameters for the mock matching?
So, something like this:
- Mock A: ../list?start=0
- Mock B: ../list?start=25

Would be greatly appreciated!


Francisco-2022-05-18 13:47
I didn´t get it. Mine gives 404 always.