APIs

Studio projects

Everything in Studio hangs off a workspace. This page is the project surface. Execution is on Runs, tests, and milestones.

Workspaces

MethodPathPurpose
POST/studio/workspacesCreate (runtime_pack, tags optional)
GET/studio/workspacesList with full contents
GET/studio/workspaces/summaryLightweight 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/searchSubstring search
PUT/studio/workspaces/{id}/tags, POST /studio/workspaces/retagTags
PUT/studio/workspaces/{id}/archiveRetire or revive
POST/studio/workspaces/{id}/clone, POST …/mergeFork or consolidate
GET…/lint, …/reconcile, …/run-statsPre-flight, fixture drift, history
GET…/export, POST /studio/workspaces/importSigned portable bundles
GET/studio/tenant/summary, /studio/tenant/exportTenant-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

MethodPathPurpose
PUT/studio/workspaces/{id}/filesCreate or update (path, content, entrypoint?, encoding?)
DELETE/studio/workspaces/{id}/filesDelete a file
POST…/files/rename, …/duplicate, …/set-entrypoint, …/bulk-delete, …/replaceFile ops (replace supports dry_run)
POST / GET…/files/binaryRaw 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.

MethodPathPurpose
PUT/studio/workspaces/{id}/samplesAdd or update (name, content, content_type, make_active?)
POST…/samples/importPaste a raw payload; content type is detected when possible
POST/studio/workspaces/{id}/active-sampleChoose the active sample
GET…/samples, …/samples/profile, …/samples/compareList, profile, diff
POST…/samples/{id}/expectationAttach a golden output
POST…/samples/{id}/capture-expectationApprove the current output as golden
POST / GET…/sample-groupsNamed 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.

MethodPathPurpose
PUT / GET/studio/fixturesSave or list (optional expected golden)
POST/studio/workspaces/{id}/fixtures/{fid}/useInstantiate into a workspace as a sample
GET/studio/fixtures/search, …/{fid}/impactDiscover and blast-radius
POST/studio/fixtures/import, …/exportPortable bundles

Use fixtures when the same payload should test more than one project.