Free and Easy Rest API for Prototype
How to make an API free for prototyping your app without writing any backend code or setup a server
Do you want to create an app, but not sure how it will go just yet? Thinking about all server setup, managing database, and other stuff is scary. Good news is, we can serve our database from API (Application Programming Interface) without configuring any server or write backend code!
My JSON Server
We can make our own data as easy as make a JSON file and serve it from our github pages with My JSON Server! Here is todo data example
{
"todos": \[
{"id":0, "text":"bersih bersih", "completed": false},
{"id":1, "text":"belajar", "completed": false},
{"id":2, "text":"menyapu", "completed": false}
\]
}
How to:
- Create a public repository in Github
- Create a db.json file inside this repo
- Make your API in json format inside this db.json file
- Your API is ready in https://my-json-server.typicode.com/USERNAME/REPO
Limitation is we only can perform “GET” data, you can test/mock other HTTP request like POST, PUT, PATCH and DELETE but it won’t change the actual data itself.
Sheety.co
What if you want a GUI (User Interface) like a spreadsheet to manage your API Data? Well, you could use Google Sheet with Sheety.
How to:
- Create your new API in google sheet the structure is the first row, would be the column’s name. And you can add any data under each that column.
- Publish it by clicking Menu File > Publish to the web
- Choose which tab you want then Select .csv format
- Paste the URL to Sheety input box and sheety will return your API Link
Mockaroo
If you don’t want to create your own data, there’s also tools for that! Mockaroo let you choose how much data you want, what type of data, and much more, it’s very flexible, include what format you want to export your data to
JSONPlaceholder
It’s (fake) online REST API brought by JSONPlaceholder + LowDB. It provides us with ready to use API in case you need some data for tutorials, libraries, code samples or anything. Some sample data like blog posts, comments, todos or users are ready to use
Other free API services
I’ve made complete listing page of free stuff include API services for Dev Check out freestuff.dev