GraphQL and REST API for Testing and Prototyping

fake data | real responses | 24/7 online

Trying it Out

POST /public/v2/usersCreate a new user
GET /public/v2/users/6940322Get user details
PUT|PATCH /public/v2/users/6940322Update user details
DELETE /public/v2/users/6940322Delete user

Nested Resources

GET /public/v2/users/6940322/postsRetrieves user posts
GET /public/v2/posts/6940322/commentsRetrieves post comments
GET /public/v2/users/6940322/todosRetrieves user todos
POST /public/v2/users/6940322/postsCreates a user post
POST /public/v2/posts/6940322/commentsCreates a post comment
POST /public/v2/users/6940322/todosCreates a user todo

GraphQL Endpoint


Rate Limiting Headers

  • Customize the rate limit per access token.
  • X-RateLimit-Limit number of allowed requests/minute.
  • X-RateLimit-Remaining remaining requests within the current period.
  • X-RateLimit-Reset seconds to wait before having maximum number of allowed requests again.

Pagination Headers

  • X-Pagination-Total total number of results.
  • X-Pagination-Pages total number of pages.
  • X-Pagination-Page current page number.
  • X-Pagination-Limit results per page.

API Version 2

API Version 1

API Version 0


Unlike Web applications, RESTful APIs are usually stateless, which means sessions or cookies should not be used. Therefore, each request should come with some sort of authentication credentials. A common practice is to send a secret access token with each request to authenticate the user. Since an access token can be used to uniquely identify and authenticate a user, API requests should always be sent via HTTPS to prevent man-in-the-middle (MitM) attacks.

There are different ways to send an access token:

cUrl Examples for REST API

List users
curl -i -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization: Bearer ACCESS-TOKEN" -XGET ""
Create user
curl -i -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization: Bearer ACCESS-TOKEN" -XPOST "" -d '{"name":"Tenali Ramakrishna", "gender":"male", "email":"", "status":"active"}'
Update user
curl -i -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization: Bearer ACCESS-TOKEN" -XPATCH "" -d '{"name":"Allasani Peddana", "email":"", "status":"active"}'
Delete user
curl -i -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization: Bearer ACCESS-TOKEN" -XDELETE ""

cUrl Examples for GraphQL

List users
curl -i -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization: Bearer ACCESS-TOKEN" -XPOST "" -d '{"query":"query{users {pageInfo {endCursor startCursor hasNextPage hasPreviousPage} totalCount nodes {id name email gender status}}}"}'
Get User
curl -i -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization: Bearer ACCESS-TOKEN" -XPOST "" -d '{"query":"query{user(id: 6940322) { id name email gender status }}"}'
Create User
curl -i -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization: Bearer ACCESS-TOKEN" -XPOST "" -d '{"query":"mutation{createUser(input: {name: \"Tenali Ramakrishna\" gender: \"male\" email: \"\" status: \"active\"}) {user{id name gender email status}}}"}'
Update User
curl -i -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization: Bearer ACCESS-TOKEN" -XPOST "" -d '{"query":"mutation{updateUser(input: {id: 6940322 name: \"Allasani Peddana\" email: \"\" status: \"active\"}) {user{id name gender email status}}}"}'
Delete User
curl -i -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization: Bearer ACCESS-TOKEN" -XPOST "" -d '{"query":"mutation{deleteUser(input: {id: 6940322}){user {id name email gender status}}}"}'

REST API Http Response Codes