Skip to main content

HTTP reference

48 endpoints, read at build time out of the endpoint tables in 9 specifications. Nothing on this page is typed by hand; adding a row to a specification adds it here.

This is not the whole API. It is every row of every endpoint table the specifications carry under a section named HTTP Endpoints, REST Endpoints, Endpoint Table and Web Routes. A specification that documents its surface some other way contributes nothing, and 9 of 15 specifications contribute at all.

Carrying an endpoint section that is deliberately out of scope — a route map for this website rather than a service API:

SPEC-0001 Web App Shell and the Bin

Derived from Web Routes

MethodPathPurposeAuth
GET/{id}Render the artifact shell (header · panel · registry-selected body)Publiclink-based capability read (ADR-0007); unknown/unauthorized/expired ids return a uniform 404
GET/run/{id}Render the trajectory shell (/run/ sub-path per SPEC-0002)Publicsame link-capability justification
GET/bin(and /)Render the Bin listing (keyset paginated)Requiredworkspace-scoped listing
GET/{id}/shareRender the Share dialog partialRequiredonly the owner may open sharing controls
GET/{id}/commentsLoad-more comments partial (HTMX)Publicannotation read is granted by the same capability link as the artifact

SPEC-0002 Artifact Core and Share Types

Derived from REST Endpoints

MethodPathPurposeAuth
POST/v1/artifactsCreate an artifact; streams the body to storage with checksum verification (ADR-0008)Required
GET/v1/artifacts/{id}Fetch metadata + preview payload for the resolved share typePubliclink-based capability read (ADR-0007); unknown/unauthorized/expired ids return a uniform 404
GET/v1/artifacts/{id}/bodyDownload raw body bytes (re-verifiable against the stored SHA-256)Publicsame link-capability justification
GET/v1/artifacts/{id}/members/{name}Read a bundle member <bundle_id>/<name> (web tabs / MCP)Publicsame link-capability justification
DELETE/v1/artifacts/{id}Delete an artifact (owner only; also honors expiry)Requiredowner only
POST/v1/artifacts/{id}/shareSet/adjust link access policy or rotate the id (ADR-0007)Requiredowner only; no sharing:manage for agents
GET/v1/binList the Bin, keyset-paginated over (created_at, id), optionally narrowed to artifacts carrying every ?tag=Requiredworkspace-scoped

SPEC-0003 Artifact Viewers

Derived from HTTP Endpoints

MethodPathPurposeAuth
GET/{id}(web)Render the app shell + resolved body viewerPublicgated by link capability (ADR-0007); returns 404/403 without it
GET/v1/artifacts/{id}Fetch metadata + rendered/preview payload for a viewerPublicgated by link capability (ADR-0007)
GET/v1/artifacts/{id}/bodyDownload raw, checksum-verifiable bytes (file/bundle download)Publicgated by link capability (ADR-0007)

SPEC-0004 Trajectory Share

Derived from HTTP endpoints

MethodPathPurposeAuth
POST/v1/runsIngest a run — a complete run (batch) or open a live runRequired
POST/v1/runs/{id}/spansAppend one or more spans to an open run (incremental)Required
POST/v1/runs/{id}/closeClose an open run (stamp ended_at, freeze derived stats)Required
GET/v1/runs/{id}Fetch run metadata, span tree, and derived statsLink-cap
GET/v1/runs/{id}/spans/{span_id}/outputLazily fetch a span's large (output_ref) outputLink-cap
GET/v1/runs/{id}/streamSSE: live span-append events for an open run (ADR-0009/ADR-0012) streamLink-cap

SPEC-0005 Webhook Inspector

Derived from HTTP endpoints

MethodPathPurposeAuth
POST/v1/hooksCreate a webhook endpoint (owner); returns id, ingress URL, mcp://cairn/hook/<id>Required
GET/v1/hooks/{id}Endpoint metadata + recent request bufferLink-cap
GET/v1/hooks/{id}/requestsList captured requests (keyset paginated, seq order)Link-cap
GET/v1/hooks/{id}/requests/{seq}Full detail of one captured request (metadata + body ref)Link-cap
GET/v1/hooks/{id}/requests/{seq}/bodyRaw captured body bytes (lazy, checksum-verifiable)Link-cap
GET/v1/hooks/{id}/streamSSE: live captured requests (ADR-0010/ADR-0012) streamLink-cap
ANY/h/{id}(also hook.cairn.stump.wtf/{id})Ingress: capture an inbound request of any methodPublic

SPEC-0006 Annotations — Reactions & Comments

Derived from HTTP Endpoints

MethodPathPurposeAuth
GET/v1/artifacts/{id}/reactionsList reactions (grouped tallies + "did I react")Publicgated by artifact link capability (ADR-0007)
POST/v1/artifacts/{id}/reactionsReact (idempotent; registry-gated anchor)Required
DELETE/v1/artifacts/{id}/reactions/{rid}Un-react (delete own reaction)Required
GET/v1/artifacts/{id}/commentsList comment threads for the artifactPublicgated by artifact link capability (ADR-0007)
POST/v1/artifacts/{id}/commentsComment (registry-gated anchor; refused on non-commentable types)Required

SPEC-0007 MCP Server and OAuth Authorization

Derived from Endpoint Table

MethodPathPurposeAuth
GET/.well-known/oauth-authorization-serverAS metadata (RFC 8414) discoveryPublicclients must read metadata before they can authenticate; contains no secrets
GET/.well-known/oauth-protected-resourceProtected-resource metadataPublicsame discovery bootstrap; no secrets
POST/oauth/registerDynamic Client Registration (RFC 7591)PublicDCR must accept unregistered clients per the MCP auth spec; rate-limited, redirect-URI validated
GET/oauth/authorizeRender login + consent screenRequiredhuman session; unauthenticated visitors are redirected to login
POST/oauth/authorizeSubmit consent (approve/deny)Requiredhuman session + CSRF token
POST/oauth/tokenCode exchange, refresh rotationClient-authenticated (PKCE)no Cairn session; authenticated by PKCE code_verifier / client credentials
POST/oauth/revokeRevoke a grant's tokens (RFC 7009)Client-authenticatedpresented token + client credentials authenticate the call
POST / GET (SSE)/mcpMCP transport: tools + resource reads streamRequiredOAuth 2.1 bearer access token, audience-bound to Cairn

SPEC-0009 Provenance, Link-Based Access, and Retention

Derived from Endpoint Table

MethodPathPurposeAuth
GET/{id}Resolve + read an artifact/bundle by capability-URLPublicthe capability-URL is the read token (ADR-0007); unguessable id + uniform 404 + rate limit
GET/run/{id}Read a trajectory by capability-URLPublicsame capability-URL rationale
POST/{id}/annotationsPost a comment/reactionRequiredannotation is never anonymous
PATCH/{id}/policyChange sharing (e.g. owner-only)Requiredowner only
PATCH/{id}/ttlChange expiry / extend / no-expiryRequiredowner only
POST/{id}/rotateRotate the id (revoke a leaked link)Requiredowner only

SPEC-0011 OTLP Trace Ingestion

Derived from HTTP endpoints

MethodPathPurposeAuth
POST/v1/otlp/v1/tracesOTLP/HTTP trace export → native run/span ingestRequired

Streaming

The rows above that the specifications describe as server-sent event streams rather than as request/response calls — an SSE method, an SSE purpose, or a /stream path. This is a view of this page, so it inherits this page's scope: a stream a specification documents outside an endpoint table is not here either.

MethodPathPurposeAuth
GET/v1/runs/{id}/streamSSE: live span-append events for an open run (ADR-0009/ADR-0012) streamLink-cap
GET/v1/hooks/{id}/streamSSE: live captured requests (ADR-0010/ADR-0012) streamLink-cap
POST / GET (SSE)/mcpMCP transport: tools + resource reads streamRequiredOAuth 2.1 bearer access token, audience-bound to Cairn