Fake REST for Helping you to Test
Tags: postman, mockapi, apidesign, api
Published: 2021-08-08 17:33:21

---
title: Fake REST for Helping you to Test
published: true
date: 2021-08-08 17:29:49 UTC
tags: postman,mockapi,apidesign,api
canonical_url: https://berviantoleo.medium.com/fake-rest-for-helping-you-to-test-bb342db88b65
---

#### It’s easy to start and great functional

Sometimes, not sometimes, but usually, we need to have parallel task between Front-end development and Back-end development. Oh no, the Front-end team need to know the Request/Response object that expected to know. Yeah, that context will usual meet in the project. It will best if we have the actual services, but sometimes it’s impossible to have or implement that in short time. So, we need to another alternatives to help Front-end team, so they don’t need to wait.

### Mock API

We usually ended the solution with Mock API. At least the Front-end team know what is the request object and the response object. Is it will bring _json_, _xml,_ or _files_? That’s why we need Mock API. But, yeah, we need the Mock API that **no need take long time to build** and **no need much code to write**. We can say that, we need **effortless solution**. If we still write many codes (I mean, too much effort) just for Mock API, I want to say that, it is useless and better we create the solution directly.

#### Simple REST API (Mock)

I found a solution that I think it’s good for simple REST API and just need the CRUD (Create, Read, Update and Delete). You can check [here](https://my-json-server.typicode.com/).

![](https://cdn-images-1.medium.com/max/1024/1*YgQZutjwsQ2Te0XOZB8jgw.png)<figcaption>My JSON Server</figcaption>

I am not really sure if that service will reliable, but at least you can use it for short time, and the important things is effortless. But, please take care, since this is public services, make sure you **not store any confidential data**. You can check the guidance. If you need locally or private solution, you can use [Json Server](https://github.com/typicode/json-server). It is easy to setup. Since the SaaS (Software as a Service), the **My JSON Server** is public services, I recommend you to setup the **Json Server** if you really need to be private and have some confidential data (but still not recommend to store this kind of data, better just reasonable dummy data). The disadvantage of this kind Mock API, it’s only support json (when I write this article) for request and response, but good enough if we need the simple REST API.

#### Postman API

I think this is quite good solution or alternative to create mock API. Please refer this [documentation](https://learning.postman.com/docs/designing-and-developing-your-api/mocking-data/setting-up-mock/) for how to create the Mock API.

![](https://cdn-images-1.medium.com/max/544/1*oulaR62tJQODs6fmI_Rs4w.png)<figcaption>Create New API</figcaption>

I think this is really good solution if you need complex request/response of the API. You can define the collections for request/response, give the description. You can create the documentation also! I want to recommend you to use this features. Somehow, yeah, you can do many things in here.

### Happy Exploring!

![](https://cdn-images-1.medium.com/max/1024/0*PYL54qklKhRyTaKA)<figcaption>Photo by <a href="https://unsplash.com/@acharki95?utm_source=medium&amp;utm_medium=referral">Aziz Acharki</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption>

I just want to say Happy Exploring! I only want to recommend some tools/services that will help you to create the Mock API. So at least you can bring some “contract” to Front-end teams. If you have another solutions or alternatives, feel free to add and comment here.

I just want to say Happy Exploring! I only want to recommend some tools/services that will help you to create the Mock API. So at least you can bring some “contract” to Front-end teams. If you have another solutions or alternatives, feel free to add and comment here.