Skip to content

HTTP API Overview

The WarmHub HTTP API exposes mounted JSON endpoints for repository reads, action observability, callbacks, MCP HTTP transport, and SSE.

Repository data writes and management operations are not REST CRUD endpoints. Use the SDK, CLI, or MCP tools for those workflows.

Most REST endpoints use the /api prefix:

https://api.warmhub.ai/api/

Root-mounted transports use the origin without /api:

https://api.warmhub.ai/mcp
https://api.warmhub.ai/sse

For example, the repository HEAD endpoint is:

https://api.warmhub.ai/api/repos/acme/world/head

Authenticated endpoints require an Authorization header with a Bearer token:

Terminal window
curl -H "Authorization: Bearer <token>" \
https://api.warmhub.ai/api/repos/acme/world/head

Repository data read endpoints (/head, /about/:wref, /query) on public repositories can be read anonymously; the same endpoints on private repos require authentication. Action-observability endpoints (/api/repos/:org/:repo/actions/*) and MCP POST endpoints (POST /mcp, POST /mcp/:org/:repo) always require authentication regardless of repo visibility — see the per-endpoint Auth column in the tables below.

PAT management REST endpoints are not currently mounted. Create and manage PATs with the CLI (wh token) or the SDK (client.token.*); see Authentication.

  • Content-Type: application/json for JSON request bodies
  • Path parameters: URL-encoded (for example, Shape%2FMyShape for Shape/MyShape)
  • Query parameters: Standard URL query string format

Repository read and action observability endpoints return JSON on success. The /sse endpoint streams text/event-stream, and MCP endpoints follow JSON-RPC over HTTP.

Most REST errors use this envelope:

{
"error": {
"code": "NOT_FOUND",
"message": "Thing not found: Sensor/temp-1"
}
}
HTTP StatusCommon Error Codes
400VALIDATION_ERROR, SHAPE_MISMATCH, RESERVED_NAME, ILLEGAL_OP_SEQUENCE
401UNAUTHENTICATED
403FORBIDDEN
404NOT_FOUND
409CONFLICT, ARCHIVED
429RATE_LIMITED
500INTERNAL_ERROR

SDK callers receive these as WarmHubError.code / kind. See the ErrorKind reference for retryability and corrective actions per kind.

Repository read endpoints (/head, /about/:wref, /query) collapse missing-repo and unauthorized-private-repo cases into the same 404 so repo existence stays opaque. See Queries for the full deny-path behavior.

Transport-specific endpoints can use their own error shape. For example, early /sse failures return a simple string-valued error object.

When REST endpoints return 429 RATE_LIMITED, they may include a Retry-After response header. Clients should back off until that interval has elapsed.

Repository query endpoints support cursor-based pagination with limit and cursor. Action endpoints support limit and since filtering.

ParameterDescription
limitMaximum number of items to return per page.
cursorOpaque pagination token from a previous response’s nextCursor field.
sinceFilter action records after this epoch-milliseconds timestamp.

Endpoints marked None are publicly accessible for public repositories. Private repositories require a valid Bearer token.

MethodPathDescriptionAuth
GET/api/repos/:org/:repo/headHEAD snapshotNone
GET/api/repos/:org/:repo/about/:wrefAssertions about a thingNone
GET/api/repos/:org/:repo/queryFiltered queryNone
MethodPathDescriptionAuth
GET/api/repos/:org/:repo/actions/runsList action runsrepo:configure
GET/api/repos/:org/:repo/actions/runs/:runId/attemptsGet run attemptsrepo:configure
GET/api/repos/:org/:repo/actions/notificationsList action notifications (terminal failures, plus successes when notifyOnSuccess is enabled)repo:configure
POST/api/action-runs/:runId/callbackReport async action progress or completionrepo:write
MethodPathDescriptionAuth
POST/mcpMCP HTTP transport (GET returns 405)Bearer token
POST/mcp/:orgName/:repoNameRepo-scoped MCP HTTP transport (GET returns 405)Bearer token
GET/sseServer-sent invalidation stream with a live ticketLive ticket
MethodPathDescriptionAuth
POST/api/component-registry/:orgName/:componentName/resolveCheck install eligibility and mint an install idthings:write on the install repo
POST/api/component-registry/:orgName/:componentName/sourceDownload the component source archive through the backendthings:write on the install repo
POST/api/component-registry/:orgName/:componentName/setup-callDispatch the optional registered-component setup callbackthings:write on the install repo

These surfaces are intentionally documented through SDK, CLI, and MCP workflows rather than REST endpoint references:

SurfaceUse Instead
Commit writesSDK commit APIs, wh commit submit, or warmhub_commit_submit
Shape managementSDK shape APIs, wh shape, or commit writes
Organization and repository managementCLI org/repo commands or SDK org/repo APIs
Subscription managementSubscription CLI/MCP workflows
Credential set managementCredential CLI workflows
PAT managementPersonal Access Tokens guide