Skip to content

Instantly share code, notes, and snippets.

@zer0id0
Created February 12, 2019 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zer0id0/ef971bd163c9b3cc5190245f26fb3c72 to your computer and use it in GitHub Desktop.
Save zer0id0/ef971bd163c9b3cc5190245f26fb3c72 to your computer and use it in GitHub Desktop.
Json server url params
GET ALL USERS
http://localhost:3000/users
GET SINGLE USER
http://localhost:3000/users/1
GET ALL COMPANIES
http://localhost:3000/companies
GET SINGLE COMPANY
http://localhost:3000/companies/1
GET ALL USERS OF A COMPANY
http://localhost:3000/companies/1/users
FILTER COMPANIES BY NAME
http://localhost:3000/companies?name=Microsoft
http://localhost:3000/companies?name=Microsoft&name=Apple
PAGINATION & LIMIT
http://localhost:3000/companies?_page=1&_limit=2
SORTING
http://localhost:3000/companies?_sort=name&_order=asc
USERS AGE RANGE
http://localhost:3000/users?age_gte=30
http://localhost:3000/users?age_gte=30&age_lte=40
FULL TEXT SEARCH
http://localhost:3000/users?q=Paul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment