jermbo / SampleAPIs

A simple, no fuss, no mess, no auth playground for learning RESTful or GraphQL APIs.
https://sampleapis.com/
MIT License
214 stars 50 forks source link
api javascript json-server node restful

Sample APIs 3.1

Screenshot

Purpose

Understanding RESTful APIs is hard enough, even without including an authentication mechanism. The sole purpose of this repository is to play with RESTful endpoints and learn. We have a few endpoints that you can start playing around with right away! If you are not finding anything you are interested in, create your own endpoints and/or submit a pull request. Take a look at the CONTRIBUTING for more information on how to get involved.

How to use the service

Choose an endpoint, say "futurama", then choose what information you'd like, say "characters":

const baseURL = "https://api.sampleapis.com/futurama/characters";
fetch(baseURL)
  .then(resp => resp.json())
  .then(data => console.log(data));

Want to Search? for all chatacters with the name "Bender"?

const baseURL = "https://api.sampleapis.com/futurama/characters";
fetch(`${baseURL}?name.first=Bender`)
  .then(resp => resp.json())
  .then(data => console.log(data));

You also have full CRUD, so you can add information or correct existing ones.

Note: Just know that we reset all datapoints weekly and each time we have a new endpoint added.



Changes

Hosting has switched again due to Vercel.com's static nature. The app is being self hosted and is back to being fully CRUD-able.

Checkout the Change Log for full details.

Disclaimers

Recent changes.

Ok. a LOT of work from the great Jermbo, and then a little fluf from TheDamian to make it more pretty!