DEV Community

Cover image for How to Mock an API in ONE minute

How to Mock an API in ONE minute

Ismail Kamil on November 18, 2022

Front-end developers usually meet this problem. The API is designed, but it's not been implemented yet. I need to make some fake data for my interf...
Collapse
 
ankitjaininfo profile image
Ankit Jain • Edited

APIDog is a very procedural way to create a mock API. The main intention of the mock is to set up quickly and be ready to be consumed right there. I see tools like Beeceptor or Mockoon are designed for the same experience, where you can create APIs in a few setups. E.g. Beeceptor doesn't even require you to signup first. Just upload the payload and it's working.

Collapse
 
seanevans profile image
Sean Evans

Powerful. Front-end engineers should like it.

Collapse
 
ismailkamil profile image
Ismail Kamil

Yeah I believe so.

Collapse
 
marcobrandizi profile image
Marco Brandizi

It's really interesting, despite the fact things won't be so smooth in reality: an initial specification of how the API responses should look like is likely to change while it is developed for real. But the approach might be useful in having an early and clear-enough idea of what the API should return. Having to make a few changes later, either client or server side, is still better than having to redefine the API completely because important requirements were overseen.

Collapse
 
ismailkamil profile image
Ismail Kamil

Thanks for the reply. I wrote a new article to answer this question, in which I used your sentence.😁

Collapse
 
restdbjones profile image
Jbee - codehooks.io

Hi, another approach is to use serverless API where you actually create the real API without the hassle of a server. And run your code against different backend spaces, i.e. mock/dev/stage/production.

codehooks.io/blog/how-to-quickly-c...

Jones

Collapse
 
rexcel profile image
RexcelWang

Looks great!

Collapse
 
govindappaarun profile image
Arun Kumar Govindappa

But sure its not a one minute thing

Collapse
 
kingdavidmiles profile image
david miles

sure indeed it really help

Collapse
 
arifpateldubaiprestonuk profile image
Arif Patel Dubai Preston UK

Thank You For The Information

Collapse
 
prof3ssorst3v3 profile image
Info Comment hidden by post author - thread only accessible via permalink
Steve Griffith

Do you work for APIDog?

Collapse
 
manuelbrs profile image
Juan Manuel Bello

Great, thanks for sharing

Collapse
 
vaibhav-saini123 profile image
vaibhav

we can also use Faux API platform, which gives us a lot of space to store values in APis and access it anytime we want, without any limits

faux-api.com/

Collapse
 
fontanaricardo profile image
Ricardo Fontana

This tool is great for paid services and offline API, but in real scenarios the backend generates de Open API specification, if you don't have the API you don't have the specification.

Collapse
 
ismailkamil profile image
Ismail Kamil

In many companies backend developers design API first. So API specification comes out before API is implemented.

Collapse
 
alexelziere profile image
Alex Elziere

great

Some comments have been hidden by the post's author - find out more