Totalshiftleft

API Learning Sandbox

Welcome to the API Learning Sandbox 🧪 A hands-on API testing platform for learning REST, GraphQL, SOAP, and Authentication. Quick Start 1. No login required —…

Developer tools#test-data

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Welcome to the API Learning Sandbox đź§Ş

A hands-on API testing platform for learning REST, GraphQL, SOAP, and Authentication.

Quick Start

  1. No login required — a session is auto-created on your first request
  2. Your session ID is returned in the x-session-id response header
  3. All data you create is private to your session and auto-expires after 30 minutes of inactivity
  4. Use the REST, GraphQL, or SOAP endpoints — they all share the same data store

Authentication Methods

MethodHow to use
API KeyAdd header x-api-key: demo-key-sandbox-2026
JWTPOST /auth/token → use Authorization: Bearer
OAuth2POST /auth/oauth with client credentials

Simulation Features

Add these query params to any REST endpoint:

  • ?delay=2000 — add 2 second artificial delay
  • ?error=500 — force a 500 error response
  • ?random_fail=true — 30% random failure chance

Rate Limits and Sessions for Load and Security Testing

There is no rate limit on any endpoint except GET /api/v1/rate-limited/ping
(10 requests per minute per session, for practising back-off). ?error=429 simulates
a 429 anywhere. Start each virtual user with x-session-id: new so they never share
data, and treat responses carrying X-Sandbox-Simulated as intentional.

Protected Store

/api/v1/secure/{entity} requires a Bearer token or x-api-key and enforces roles,
OAuth scopes and record ownership (401 / 403) — a real boundary for security tools.

Requirements

The executable requirements are at /requirements/store.txt and /requirements/auth-testing.txt.

Entities Available

  • users — name, email, role, age
  • products — name, price, description, stock, category
  • orders — user_id, product_id, quantity, status, notes

Standard Demo Dataset

Your first REST request auto-seeds your session with standard users, products,
and orders — no special header needed, so every entity endpoint below always
has data to test against. Create/update/delete freely for practice: the seed
only ever runs once per session, so your edits are never overwritten. See
GET /api/v1/demo for the fixed record IDs, and POST /api/v1/demo/reset
to restore your session to the standard dataset at any time.

HTTP QUERY Method — search with a request body

Every entity below also supports the QUERY method — a safe, idempotent
"GET with a JSON body" (IETF draft).
It isn't shown as a separate operation below because OpenAPI has no schema
slot for custom HTTP methods, but it's fully implemented on every entity path
you see here — same path, method QUERY instead of GET, with a JSON body:

QUERY /api/v1/{entity}
Content-Type: application/json

{
  "filters": { "price": { "gte": 10, "lte": 100 }, "category": ["books", "games"] },
  "sort": "price", "order": "asc", "limit": 20, "fields": ["name", "price"]
}

Filter operators: eq, ne, contains, in, nin, gt, gte, lt, lte
(combine per field — they're AND-ed). A teaching endpoint is also available at
QUERY /api/v1/echo, which just reflects your request back to you.

Endpoints 38

Users

  • GETList users/api/v1/usersReturns a paginated list. Supports ?page, ?limit, ?sort, ?order, and any field as a filter (e.g. ?status=pending). Also supports ?delay, ?error, ?random_fail…
  • POSTCreate a new user/api/v1/usersCreates a new record in the sandbox. Data is session-scoped and auto-expires after 30 minutes of inactivity.
  • GETGet a single user by ID/api/v1/users/:idFetch one record by UUID.
  • PUTReplace a user (full update)/api/v1/users/:idFull replacement — all required fields must be supplied. Missing optional fields revert to defaults.
  • DELETEDelete a user by ID/api/v1/users/:idPermanently removes the record from the session. Returns 204 No Content on success.
  • PATCHPartially update a user (PATCH)/api/v1/users/:idSend only the fields you want to change. Omitted fields are left as-is.

Products

  • GETList products/api/v1/productsReturns a paginated list. Supports ?page, ?limit, ?sort, ?order, and any field as a filter (e.g. ?status=pending). Also supports ?delay, ?error, ?random_fail…
  • POSTCreate a new product/api/v1/productsCreates a new record in the sandbox. Data is session-scoped and auto-expires after 30 minutes of inactivity.
  • GETGet a single product by ID/api/v1/products/:idFetch one record by UUID.
  • PUTReplace a product (full update)/api/v1/products/:idFull replacement — all required fields must be supplied. Missing optional fields revert to defaults.
  • DELETEDelete a product by ID/api/v1/products/:idPermanently removes the record from the session. Returns 204 No Content on success.
  • PATCHPartially update a product (PATCH)/api/v1/products/:idSend only the fields you want to change. Omitted fields are left as-is.

Orders

  • GETList orders/api/v1/ordersReturns a paginated list. Supports ?page, ?limit, ?sort, ?order, and any field as a filter (e.g. ?status=pending). Also supports ?delay, ?error, ?random_fail…
  • POSTCreate a new order/api/v1/ordersCreates a new record in the sandbox. Data is session-scoped and auto-expires after 30 minutes of inactivity.
  • GETGet a single order by ID/api/v1/orders/:idFetch one record by UUID. Add ?expand=user,product to inline the linked user and product objects.
  • PUTReplace a order (full update)/api/v1/orders/:idFull replacement — all required fields must be supplied. Missing optional fields revert to defaults.
  • DELETEDelete a order by ID/api/v1/orders/:idPermanently removes the record from the session. Returns 204 No Content on success.
  • PATCHPartially update a order (PATCH)/api/v1/orders/:idSend only the fields you want to change. Omitted fields are left as-is.

Demo Data

  • GETStandard demo dataset — how to use it/api/v1/demoExplains the standard demo dataset every session is seeded with, and whether YOUR current session has been seeded yet.
  • POSTRestore the standard demo dataset/api/v1/demo/resetWipes your current session's users/products/orders and re-seeds the standard dataset. Useful after you have modified or deleted records while learning.

Protected Store

  • GETList users (protected)/api/v1/secure/usersNon-admin callers see only their own records.
  • POSTCreate a user (protected)/api/v1/secure/usersRequires credentials. owner_id is set to the caller. Any authenticated caller (service tokens need the write scope).
  • GETGet a user (protected)/api/v1/secure/users/:id
  • PUTReplace a user (protected)/api/v1/secure/users/:id
  • DELETEDelete a user (protected, admin only)/api/v1/secure/users/:id
  • PATCHUpdate a user (protected)/api/v1/secure/users/:id
  • GETList orders (protected)/api/v1/secure/ordersNon-admin callers see only their own records.
  • POSTCreate a order (protected)/api/v1/secure/ordersRequires credentials. owner_id is set to the caller. Any authenticated caller (service tokens need the write scope).
  • GETGet a order (protected)/api/v1/secure/orders/:id
  • PUTReplace a order (protected)/api/v1/secure/orders/:id
  • DELETEDelete a order (protected, admin only)/api/v1/secure/orders/:id
  • PATCHUpdate a order (protected)/api/v1/secure/orders/:id
  • GETList products (protected)/api/v1/secure/productsEvery authenticated caller sees the whole catalogue.
  • POSTCreate a product (protected)/api/v1/secure/productsRequires credentials. owner_id is set to the caller. Requires admin, moderator, or a service token with the write scope.
  • GETGet a product (protected)/api/v1/secure/products/:id
  • PUTReplace a product (protected)/api/v1/secure/products/:id
  • DELETEDelete a product (protected, admin only)/api/v1/secure/products/:id
  • PATCHUpdate a product (protected)/api/v1/secure/products/:id

API details

Base URL
https://demo.totalshiftleft.ai
Authentication
An API key in the x-api-key header
A bearer token in the Authorization header
An API key in the x-session-id header
Operations
38 operations on 14 pathsGET 13POST 7PUT 6PATCH 6DELETE 6
Main resources
Protected Store 18Orders 6Products 6Users 6Demo Data 2
Response formats
application/json
Description format
OpenAPI 3.0.3, API version 1.0.0

How to test the API Learning Sandbox in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the API Learning Sandbox collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the x-api-key header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “List users” (GET /api/v1/users), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the API Learning Sandbox?

Welcome to the API Learning Sandbox 🧪 A hands-on API testing platform for learning REST, GraphQL, SOAP, and Authentication. Quick Start 1. No login required —… It is listed under Developer tools and has 38 endpoints.

Who publishes the API Learning Sandbox?

It is listed from Totalshiftleft's public API description (an OpenAPI document), not published by Totalshiftleft on Swastik Codes. Anyone who controls demo.totalshiftleft.ai can claim the profile by adding a DNS TXT record.

What is the base URL of the API Learning Sandbox?

Requests go to https://demo.totalshiftleft.ai. Endpoint paths are added to this base URL.

How do I authenticate with the API Learning Sandbox?

It accepts 3 methods: an API key in the x-api-key header; A bearer token in the Authorization header; an API key in the x-session-id header.

How many endpoints does the API Learning Sandbox have?

38 operations on 14 paths (13 GET, 7 POST, 6 PUT, 6 PATCH, 6 DELETE). The largest groups are Protected Store, Orders, Products, Users.

Is forking the API Learning Sandbox free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.