Sandbox API

Local development

make up, docs-dev, smoke, Postman, and what to do when ports are busy.

Environments

EnvironmentGateway hostNotes
Localhttp://localhost:8780make up (GCS + Pub/Sub emulator; LLM via Gateway when configured)
Docs onlyhttp://localhost:3333make docs-dev — hot-reload of this site
Productionhttps://sandbox.turing.com (or your ingress)Same API paths — only the host changes

Docs and OpenAPI on the gateway host:

ResourcePath
Integrator docs/docs
Platform OpenAPI/openapi/sandbox-platform.yaml
Engineer Swagger/internal/swagger
export SANDBOX_GATEWAY_URL="${SANDBOX_GATEWAY_URL:-http://localhost:8780}"

Quick start (full stack)

make setup && make up && make smoke && make e2e-local

Port conflicts

make up needs host ports including 8085 (Pub/Sub emulator), 5433 (Postgres), 6379 (Redis), and 8780 (gateway). If another stack (for example Workbench) already binds them, Compose fails with “port is already allocated”.

Options:

  1. Stop the other stack, then make up again.
  2. Preview docs only: make docs-devhttp://localhost:3333/docs (no API).

Docs hot-reload

make docs-dev
# → http://localhost:3333/docs/introduction/overview/

Edit files under docs-site/content/docs/; the page reloads. This is the same content the gateway serves at /docs after a full stack build/deploy.

Postman

Import from the repo:

  • docs/postman/sandbox_platform.postman_collection.json
  • docs/postman/sandbox.local.postman_environment.json

Regenerate: make postman. Guide: Postman.

Engineering Swagger

Cluster operators only: /internal/swagger on the gateway host (not for integrators).

Next steps