APIs
Studio projects
Everything in Studio hangs off a workspace. This page is the project surface. Execution is on Runs, tests, and milestones.
Workspaces
| Method | Path | Purpose |
|---|---|---|
POST | /studio/workspaces | Create (runtime_pack, tags optional) |
GET | /studio/workspaces | List with full contents |
GET | /studio/workspaces/summary | Lightweight index for dashboards |
GET | /studio/workspaces/{id} | One project — files, samples, lineage |
PATCH | /studio/workspaces/{id} | Rename or edit description |
DELETE | /studio/workspaces/{id} | Delete |
GET | /studio/workspaces/{id}/search, GET /studio/search | Substring search |
PUT | /studio/workspaces/{id}/tags, POST /studio/workspaces/retag | Tags |
PUT | /studio/workspaces/{id}/archive | Retire or revive |
POST | /studio/workspaces/{id}/clone, POST …/merge | Fork or consolidate |
GET | …/lint, …/reconcile, …/run-stats | Pre-flight, fixture drift, history |
GET | …/export, POST /studio/workspaces/import | Signed portable bundles |
GET | /studio/tenant/summary, /studio/tenant/export | Tenant-wide rollup |
curl -s -X POST "$SIRIUS/studio/workspaces" -H 'content-type: application/json' -d '{
"tenant_id":"default",
"name":"Partner normalize",
"runtime_pack":"python",
"tags":["orders","inbound"]
}'
Files
| Method | Path | Purpose |
|---|---|---|
PUT | /studio/workspaces/{id}/files | Create or update (path, content, entrypoint?, encoding?) |
DELETE | /studio/workspaces/{id}/files | Delete a file |
POST | …/files/rename, …/duplicate, …/set-entrypoint, …/bulk-delete, …/replace | File ops (replace supports dry_run) |
POST / GET | …/files/binary | Raw bytes (WASM modules) |
The entrypoint can import sibling files with the language’s usual mechanism (require in JavaScript, load in Python, local import in Go). Imports resolve only against workspace files — never the host disk or the network.
curl -s -X PUT "$SIRIUS/studio/workspaces/$WS/files" \
-H 'content-type: application/json' -d '{
"tenant_id":"default",
"path":"lib/util.js",
"content":"module.exports = { stamp: () => sirius.now() };"
}'
Binary files use encoding: "base64" or POST …/files/binary with application/octet-stream.
Samples
Samples are first-class. You run the entrypoint against the active sample.
| Method | Path | Purpose |
|---|---|---|
PUT | /studio/workspaces/{id}/samples | Add or update (name, content, content_type, make_active?) |
POST | …/samples/import | Paste a raw payload; content type is detected when possible |
POST | /studio/workspaces/{id}/active-sample | Choose the active sample |
GET | …/samples, …/samples/profile, …/samples/compare | List, profile, diff |
POST | …/samples/{id}/expectation | Attach a golden output |
POST | …/samples/{id}/capture-expectation | Approve the current output as golden |
POST / GET | …/sample-groups | Named suites (smoke, regression) |
curl -s -X POST "$SIRIUS/studio/workspaces/$WS/samples/import" \
-H 'content-type: application/json' -d '{
"tenant_id":"default",
"name":"order-001",
"content":"{\"id\":\"A-1\",\"site\":\"west\"}",
"make_active":true
}'
Fixtures
Tenant-wide canonical payloads — a known-good order, a tricky document — shared across workspaces.
| Method | Path | Purpose |
|---|---|---|
PUT / GET | /studio/fixtures | Save or list (optional expected golden) |
POST | /studio/workspaces/{id}/fixtures/{fid}/use | Instantiate into a workspace as a sample |
GET | /studio/fixtures/search, …/{fid}/impact | Discover and blast-radius |
POST | /studio/fixtures/import, …/export | Portable bundles |
Use fixtures when the same payload should test more than one project.