APIs
Studio API
The Studio API is the programmable surface of the transformation workbench. The console’s Studio page and the agent’s studio.* tools call these routes. Auth, tenancy, and errors are the same as the REST API.
A mapping is a project, not a single anonymous script:
- A workspace has a runtime pack (language), files (one entrypoint), and samples.
- The active sample arrives as
msg. Your script must assignresult. - A sample can carry a golden expectation and become a regression test.
- A known-good version is a milestone — a content-hashed snapshot.
The same workbench is embedded on a transform node in the visual builder.
Continue with:
- Projects and files — workspaces, files, samples, fixtures
- Runs, tests, and milestones — execute, assert, promote, SQL, WASM
- Studio recipes — end-to-end curl and Python
- Host API —
sirius.*contract and the full 248-symbol catalog - Core · Standards · I/O · Devices
- Write a transform — the console walkthrough
Permissions
| Permission | Covers |
|---|---|
studio:read | List and get |
studio:write | Create, edit, run, test, promote |
studio:terminal | Git clone into a workspace |
Run is a write. A viewer role can inspect a project; it cannot execute it.
Quick start
SIRIUS=http://localhost:8080
WS=$(curl -s -X POST "$SIRIUS/studio/workspaces" \
-H 'content-type: application/json' \
-d '{"tenant_id":"default","name":"Normalize order"}' | jq -r .id)
curl -s -X PUT "$SIRIUS/studio/workspaces/$WS/files" \
-H 'content-type: application/json' -d '{
"tenant_id":"default","path":"main.js","entrypoint":true,
"content":"result = { message: sirius.json.decode(msg.raw) };"
}'
curl -s -X PUT "$SIRIUS/studio/workspaces/$WS/samples" \
-H 'content-type: application/json' -d '{
"tenant_id":"default","name":"sample","content_type":"json",
"content":"{\"id\":\"A-1\"}","make_active":true
}'
curl -s -X POST "$SIRIUS/studio/workspaces/$WS/run" \
-H 'content-type: application/json' \
-d '{"tenant_id":"default"}' | jq '{status, output, annotations}'
The execution contract
msg includes raw, content_type, sample_name, and — for recognized formats — a parsed msg.parsed tree. Assign:
result = { message: /* transformed payload */ };
A run that assigns no result fails with mapping script produced no result. That is the usual first-run mistake.
Recognized content_type values (aliases accepted): json, hl7 / hl7v2, x12 / edi, fhir. Anything else is raw text with no parsed tree.
Live catalog
GET /studio/sirius-api returns the host-API catalog that drives editor autocomplete. GET /agent/tools?category=studio lists every Studio HTTP operation.
WebSockets
Collaboration and the project terminal upgrade over /studio/collab/ws and /studio/terminal/ws. They authenticate with a one-time ticket from POST …/collab/ticket or POST …/terminal/ticket, not a browser-held bearer.