Free Practice API

Free fake REST API for practising API testing — no sign-up, no key. Send real requests from Postman, Playwright, cURL or right here in your browser.

Base URLhttps://lab.roicians.com/api/free
  • No keyNo sign-up, no API key
  • JSONJSON in, JSON out, real status codes
  • Nothing savedWrites answer like a real API
  • CORS onCall it from any web page
  • 300/minRequests per minute per IP

Simple rules, so you can focus on testing

Reads and writes

  • GET returns fixed, fictional data — the same for everyone, every time.
  • POST returns 201 with a new id and createdAt; PUT and PATCH return 200 with updatedAt; DELETE returns 204. Nothing is saved.
  • Unknown ids return 404 with an empty object {}; ids that aren't whole numbers return 400.
  • Lists are paged: page, per_page (default 6, up to 50), total, total_pages, data.

Errors you can test

  • 400 for invalid JSON, invalid query values and missing or wrong fields (one message per field).
  • 401 without a valid token, 403 for the wrong role, 404 for unknown routes, 405 with an Allow header.
  • 415 when a body isn't sent as application/json, 413 above 100 KB, 429 with Retry-After above the rate limit.
  • Add ?delay=1 to ?delay=10 to any request to slow it down.

Demo log-ins

Use these with POST /login. Tokens are JWTs that last 60 minutes; send them as Authorization: Bearer <token>.

EmailPasswordWhat it's for
student@roicians.testpractice123Student role — use it for /me
admin@roicians.testadmin123Admin role — the only one allowed on /admin/summary
locked@roicians.testlocked123Locked — log-in is refused with 403

Try every endpoint

Paths are relative to the base URL. Open Try it to send the real request from your browser, edit the path or body, and copy it as cURL, PowerShell, Postman or Playwright code.

Users

12 fictional people with paging. Writes return what a real API would, but nothing is saved.

GET/users

List users, 6 per page. Use ?page= and ?per_page= (1–50).

GET/users?page=2&per_page=5

Page 2 with 5 per page — check page, per_page, total and total_pages.

GET/users/{id}

One user by id.

GET/users/{id}

A user that doesn't exist → 404 with an empty object {}.

POST/users

Create a user → 201 with a new id and createdAt (not saved).

POST/users

Missing and invalid fields → 400 with an error for each field.

PUT/users/{id}

Replace a user (all required fields) → 200 with updatedAt.

PATCH/users/{id}

Change only some fields → 200 with the whole user and updatedAt.

DELETE/users/{id}

Delete a user → 204 No Content (nothing is really deleted).

Menu & restaurants

4 fictional restaurants and 24 menu items (prices in CAD) for food-delivery practice. Filter, sort and page.

GET/restaurants

All restaurants. Filter with ?isOpen=true.

GET/restaurants/{id}

One restaurant: cuisine, city, delivery fee, minimum order, open or closed.

GET/restaurants/{id}/menu

One restaurant's menu (same filters as /menu).

Products

12 simple shop items with categories, prices and stock.

GET/products

All products. Filters: ?category= ?inStock=, sort: ?sort=price | -price | name | -name.

GET/products/{id}

One product.

POST/products

Create a product → 201 (not saved).

PUT/products/{id}

Replace a product → 200.

DELETE/products/{id}

Delete a product → 204.

Todos & posts

Todos with a completed flag, blog posts and their comments — the classic nested resource.

GET/todos

Todos. Filters: ?userId= ?completed=true|false.

GET/todos/{id}

One todo.

POST/todos

Create a todo → 201 (not saved).

PATCH/todos/{id}

Tick a todo off → 200.

DELETE/todos/{id}

Delete a todo → 204.

GET/posts

Blog posts. Filter with ?userId=.

GET/posts/{id}

One post.

GET/posts/{id}/comments

A post's comments (posts 9 and 10 have none).

POST/posts/{id}/comments

Add a comment to a post → 201 (not saved).

POST/posts

Create a post → 201 (not saved).

Auth

Register, log in, use a Bearer token, log out. 401 vs 403 practice included.

POST/register

Register → 201 with a token you can use straight away (the account itself isn't saved).

POST/register

Register without a password → 400 {"error": "Missing password"}.

POST/login

Log in with a demo account → 200 with a Bearer token (valid for 1 hour).

POST/login

Log in without a password → 400 {"error": "Missing password"}.

POST/login

Wrong password → 401.

GET/me

Who am I? Needs Authorization: Bearer <token> → 200.

GET/me

The same request without a token → 401.

GET/admin/summary

Admins only: 401 without a token, 403 with a student token, 200 with the admin account's token.

POST/logout

Log out → 200. The token stops working (try /me again).

Utilities

Delays, any status code, echo, headers, random failures, UUIDs and the time.

GET/users?delay=3

Add ?delay=0–10 (seconds) to any request to slow the response down.

GET/status/{code}

Returns the status code you ask for (200–599), with any method.

POST/echo

Sends back your method, query, headers (secrets hidden) and body. Any method.

GET/headers

The request headers the API received (cookies and tokens hidden).

GET/slow

Always takes 3 seconds — practise timeouts.

GET/random-error

Fails with 500 about 1 time in 3 (?failRate=0–100 to change it) — practise retries.

GET/uuid

A fresh random UUID.

GET/time

The server time in UTC (ISO 8601 and Unix).

Postman and OpenAPI

Postman collection

Every endpoint above with ready-made status-code checks. The log-in request stores the token for the others.

Download collection

Postman environment

Sets baseUrl and an empty token. In Postman: Import → choose both files → pick the environment at the top right.

Download environment

OpenAPI 3 contract

The full contract: every path, parameter, schema and status code. Import it into Postman or use it for schema checks.

Open openapi.json

Prefer the command line? Run the collection with Newman: npx newman run Roicians_Free_Practice_API.postman_collection.json -e Roicians_Free_Practice_API.postman_environment.json

10 beginner exercises

Work through them in Postman first, then automate them with Playwright. Write down what you expect before you send each request.

  1. Status codesSend GET /users/2, GET /users/23 and GET /users/abc. Write down the status code and body of each, and say which kind of test (positive or negative) each one is.
  2. Pagination mathsCall GET /users?per_page=5 and then every page after it. Before you look at total_pages, work it out yourself from total and per_page. What does a page after the last one return?
  3. Schema of /users/2List every field in the response of GET /users/2 with its type. Then write a check (in Postman or Playwright) that fails if a field is missing or has the wrong type.
  4. Negative log-inTry POST /login with: no email, no password, a wrong password, and the locked account. Record the status code and error message for each in a small test-case table.
  5. Tokens: 401 vs 403Log in as the student and call /me and /admin/summary with the token, without it and with a broken token. Then log in as the admin. Explain the difference between 401 and 403 in one sentence.
  6. Log outLog in, call /me, call /logout, then call /me again with the same token. Write the expected result before you send the last request.
  7. Delay and timeoutsMeasure GET /users?delay=3 in Postman. Then set a 2-second timeout (Postman settings or Playwright's timeout option) and describe what happens.
  8. ValidationPOST /users with an empty body, then with an invalid email, then with a number for firstName. Compare the field errors. Which fields are required?
  9. Filters and sortingGET /menu?category=mains&vegetarian=true&sort=price. Prove with a test that every item matches both filters and that prices go up. What happens with ?vegetarian=yes?
  10. RetriesCall /random-error until you see a 500. Then write a Playwright test that retries up to 3 times before it fails, and explain when retrying is (and isn't) a good idea.

Ready for a real API testing project?

Career Lab's API Testing projects use NorthCart: a full e-commerce API with your own private sandbox, real bugs to find, OAuth, webhooks, GraphQL and performance testing — plus a Playwright + TypeScript starter project. Start free.

Questions

Do I need an account or an API key?
No. The Free Practice API is open to everyone: no sign-up, no key. If you send an X-Practice-Key header it is simply ignored.
Why does GET return 404 for a user I just created?
Nothing you send is saved. POST, PUT and PATCH answer the way a real API would (a new id, createdAt or updatedAt) and DELETE returns 204, but the data always stays the same. That keeps every result predictable for every learner.
Is there a limit?
Yes, a per-IP rate limit per minute. Above it you get 429 Too Many Requests with a Retry-After header — a good thing to test too. Bodies larger than 100 KB get 413.
What should I practise after this?
Career Lab's API Testing projects use NorthCart, a full e-commerce API with your own private sandbox, real bugs to find, OAuth, webhooks, GraphQL and performance tests — plus a Playwright + TypeScript starter project.