Mock REST API

Free public endpoints for API testing practice. No sign-up, no rate limits, no auth required.

Base URL

https://myqatools.com/api

CORS

Access-Control-Allow-Origin: *

Persistence

POST/PUT/PATCH/DELETE are stateless (echo back)

Supported query parameters

_limit=10 — max items to return

_page=2 — page number (with _limit)

_sort=name&_order=asc|desc — sort results

field=value — filter by any field (e.g. ?userId=1, ?role=admin)

Endpoints

GEThttps://myqatools.com/api/users

List all users. Supports filtering, sorting, and pagination.

Query params

?_limit=5 ?_page=2 ?role=admin ?_sort=name&_order=asc

Example request

bash
curl "https://myqatools.com/api/users?_limit=3"

Example response

json
[
  { "id": 1, "name": "Alice Johnson", "email": "alice@example.com", "role": "admin" },
  { "id": 2, "name": "Bob Smith",     "email": "bob@example.com",   "role": "user"  },
  { "id": 3, "name": "Carol White",   "email": "carol@example.com", "role": "user"  }
]
GEThttps://myqatools.com/api/users/:id

Get a single user by ID.

Example request

bash
curl "https://myqatools.com/api/users/1"

Example response

json
{ "id": 1, "name": "Alice Johnson", "username": "alice", "email": "alice@example.com", "role": "admin" }
POSThttps://myqatools.com/api/users

Create a user (mock — does not persist).

Example request

bash
curl -X POST "https://myqatools.com/api/users" \
  -H "Content-Type: application/json" \
  -d '{"name":"New User","email":"new@example.com"}'

Example response

json
{ "id": 4782, "name": "New User", "email": "new@example.com", "createdAt": "2025-01-01T00:00:00.000Z" }
PUThttps://myqatools.com/api/users/:id

Replace a user (mock).

Example request

bash
curl -X PUT "https://myqatools.com/api/users/1" \
  -H "Content-Type: application/json" \
  -d '{"name":"Updated Name","email":"updated@example.com"}'

Example response

json
{ "id": 1, "name": "Updated Name", "email": "updated@example.com", "updatedAt": "..." }
PATCHhttps://myqatools.com/api/users/:id

Partially update a user (mock).

Example request

bash
curl -X PATCH "https://myqatools.com/api/users/1" \
  -H "Content-Type: application/json" \
  -d '{"role":"admin"}'

Example response

json
{ "id": 1, "name": "Alice Johnson", "role": "admin", "updatedAt": "..." }
DELETEhttps://myqatools.com/api/users/:id

Delete a user (mock — does not persist).

Example request

bash
curl -X DELETE "https://myqatools.com/api/users/1"

Example response

json
{ "deleted": true, "id": 1 }
GEThttps://myqatools.com/api/posts

List posts. Filter by userId.

Query params

?userId=1 ?_limit=5 ?_sort=createdAt&_order=desc

Example request

bash
curl "https://myqatools.com/api/posts?userId=1&_limit=3"

Example response

json
[{ "id": 1, "userId": 1, "title": "Getting started with test automation", "body": "...", "tags": ["selenium","java"] }]
GEThttps://myqatools.com/api/products

List products. Filter by category.

Query params

?category=Electronics ?_limit=5

Example request

bash
curl "https://myqatools.com/api/products?category=Electronics"

Example response

json
[{ "id": 1, "name": "Wireless Mouse", "category": "Electronics", "price": 29.99, "stock": 150 }]
GEThttps://myqatools.com/api/comments

List comments. Filter by postId.

Query params

?postId=1 ?_limit=10

Example request

bash
curl "https://myqatools.com/api/comments?postId=1"

Example response

json
[{ "id": 1, "postId": 1, "userId": 1, "body": "Great post!" }]
GEThttps://myqatools.com/api/todos

List todos. Filter by completed or userId.

Query params

?completed=true ?userId=1

Example request

bash
curl "https://myqatools.com/api/todos?completed=false"

Example response

json
[{ "id": 2, "userId": 1, "title": "Review automation scripts", "completed": false }]
POSThttps://myqatools.com/api/auth/login

Mock login — returns a JWT token for any email/password combination.

Example request

bash
curl -X POST "https://myqatools.com/api/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"email":"alice@example.com","password":"pass123"}'

Example response

json
{ "token": "eyJhbGciOiJIUzI1NiIs...", "user": { "id": 1, "email": "alice@example.com", "role": "user" }, "expiresIn": 86400 }
POSThttps://myqatools.com/api/auth/register

Mock register — returns a JWT and new user object.

Example request

bash
curl -X POST "https://myqatools.com/api/auth/register" \
  -H "Content-Type: application/json" \
  -d '{"name":"New User","email":"new@example.com","password":"pass123"}'

Example response

json
{ "token": "eyJhbGciOiJIUzI1NiIs...", "user": { "id": 4782, "name": "New User", "email": "new@example.com" } }