Skip to content
AIM Development and Automation

API Playground

This is how your app talks to its server: it asks for, creates and changes data, and every answer comes back clear.

Live. Uses the AIM API.

What your client sees

A real-life example: Picture your team's task app. Someone creates "Call the supplier", someone else marks it as done and everyone sees the change, because every action travels to the server and comes back with its answer.

Under the hood

What it does, in technical terms

A console for trying out a real REST API built with NestJS. List, create, edit and delete tasks in your own sandbox, and see the status code, timings, headers and JSON of every response.

Technologies
  • NestJS
  • Zod
  • Swagger
  • Vitest
  • Supertest
  • Docker

Architecture

  1. 1.The console, in your browser

    It builds the request, sends it with CORS to another domain and shows the status, timings, headers and JSON. It also writes the equivalent curl and fetch.

  2. 2.REST API in NestJS (Render)

    Controller, service and repository. Each visitor works in their own in-memory sandbox, with the X-Sandbox-Id header.

  3. 3.Validation and limits

    Zod schemas, errors with the same shape in Spanish or English depending on Accept-Language, and 429 with Retry-After past the limit.

  4. 4.Docs and tests

    OpenAPI in Swagger, and end-to-end tests with Vitest and Supertest for every endpoint.

By the numbers

requests per minute per connection
60
tasks at most in each sandbox
50
without use and the sandbox is deleted
30 min

The team's task app

Your phone

Team tasks

Asking the server for the tasks…

The server

Every action travels here and comes back with its answer.

Your teammate's phone

Team tasks

Asking the server for the tasks…

The same test space as your phone, seen from another device.

Your sandbox

Every request carries this id in the X-Sandbox-Id header. It's your private space in the API: it starts with 3 sample tasks, holds up to 50 and is deleted after 30 minutes without use.

Setting up your sandbox…

Request

Examples

Filters by status and priority, searches text, sorts and paginates with a cursor.

Server: https://aimweb-api.onrender.com

List filters

Every change is written into the path, and whatever you type in the path shows up here.

In the title and the description, ignoring case and accents.

From 1 to 50.

GET doesn't take a body in this API.

Response

Choose an example and send the request. Here you'll see the status code, the timings, the headers and the JSON of the response.

Equivalent code

The same request, with your sandbox, for your terminal (bash, zsh or Git Bash) or your code.

curl -i 'https://aimweb-api.onrender.com/api/v1/tasks?sort=createdAt:desc&limit=10' \
  -H 'X-Sandbox-Id: your-sandbox-id' \
  -H 'Accept-Language: en'

History

Your last 10 requests in this tab. Choose one to see its response again.

You haven't sent any requests yet.

Want it for your business?

This is part of what I build in the web apps service. See what's included or get a reference estimate for your case.

Curious how it is built? Look under the hood

How it works

The sample Tasks API runs on Render, on a different domain, and the browser calls it with CORS. Each visitor works in their own in-memory sandbox: the console creates an id, sends it in the X-Sandbox-Id header and the API gives you 3 sample tasks. It holds up to 50, and the sandbox is deleted after 30 minutes without use.

Data is validated with Zod schemas, and every error comes back in the same shape: a code, a message in Spanish or English, whichever the Accept-Language header asks for (the console asks for the language of this page), and, when relevant, the problems field by field. The list filters by status and priority, searches ignoring accents, sorts by date and paginates with a cursor. There’s a limit of 60 requests per minute per connection (it answers 429 with Retry-After), every response includes its server time (X-Response-Time), and everything is documented with OpenAPI in Swagger.

Data goes through a repository: today it’s kept in memory, and it can move to Postgres without touching the controller or the rules. The end-to-end tests, with Vitest and Supertest, cover every endpoint, validation, the sandbox, CORS and the rate limit.

The API runs on Render’s free plan: if nobody uses it for about 15 minutes it goes to sleep, and the first request takes about a minute while it wakes up. The console lets you know when that happens.