Public API Reference
Authentication, scopes, rate limits, idempotency, endpoints, and request models for the deployment API
Ask AI about this page
Get answers grounded in the live Obelisk docs set, with source links, selected-text explainers, and prompts for the next document to read.
This page documents the current public deployment API as implemented in the product today.
Base Surface
Current routes:
GET /api/public/v1/deployments/indexerPOST /api/public/v1/deployments/indexerGET /api/public/v1/deployments/indexer/[id]GET /api/public/v1/deployments/channelPOST /api/public/v1/deployments/channelGET /api/public/v1/deployments/channel/[id]
These routes are organization-scoped through the API key that authenticates the request.
Authentication
Accepted credentials:
Authorization: Bearer <API_KEY>x-api-key: <API_KEY>
API keys:
- use the
obk_token format - are stored hashed in the database
- can be revoked
- can expire
- are limited by scopes
Current scopes:
deployments:readdeployments:write
Only organization owner and admin members can create or revoke these keys from the workspace.
Request Context Headers
Optional request headers:
x-request-ididempotency-key
Behavior:
- if
x-request-idis missing, the server creates one - if
idempotency-keyis missing, the request ID is reused - create requests are idempotent per template and request body
Response Headers
Every successful and error response includes:
x-public-api-versionx-request-id
Rate-limit headers:
x-ratelimit-limitx-ratelimit-remainingx-ratelimit-resetx-ratelimit-reset-atretry-after
Default rate limit:
120requests per60seconds per API key unless environment configuration overrides it
Endpoint Summary
| Route | Method | Scope | Purpose |
|---|---|---|---|
/api/public/v1/deployments/indexer | GET | deployments:read | List indexer deployments for the authenticated organization |
/api/public/v1/deployments/indexer | POST | deployments:write | Create an indexer deployment |
/api/public/v1/deployments/indexer/[id] | GET | deployments:read | Fetch one indexer deployment with recent task and audit history |
/api/public/v1/deployments/channel | GET | deployments:read | List channel deployments for the authenticated organization |
/api/public/v1/deployments/channel | POST | deployments:write | Create a channel deployment |
/api/public/v1/deployments/channel/[id] | GET | deployments:read | Fetch one channel deployment with recent task and audit history |
List Query Parameters
Shared list query model:
| Field | Type | Required | Notes |
|---|---|---|---|
limit | integer | no | minimum 1, maximum appConfig.pagination.maxLimit |
offset | integer | no | minimum 0 |
Create Indexer Deployment
Request body:
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | 1-80 characters |
template | string | no | defaults to dubhe-indexer-api |
region | string | no | optional region override |
configJsonUrl | string | yes | valid URL to managed indexer config |
Example:
curl -X POST \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: indexer-prod-2026-03-12" \
-d '{"name":"indexer-prod-01","template":"dubhe-indexer-api","configJsonUrl":"https://example.com/indexer.config.json"}' \
"https://your-app.example.com/api/public/v1/deployments/indexer"Create Channel Deployment
Request body:
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | 1-80 characters |
template | string | no | defaults to dubhe-channel-api |
region | string | no | optional region override |
rpcUrl | string | yes | valid RPC URL |
syncTimeSeconds | integer | no | defaults to 5, max 3600 |
dockerImage | string | no | optional override; otherwise env-driven |
appName | string | no | optional runtime naming override |
Example:
curl -X POST \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: channel-prod-2026-03-12" \
-d '{"name":"channel-prod-01","template":"dubhe-channel-api","rpcUrl":"https://rpc.example.com","syncTimeSeconds":5}' \
"https://your-app.example.com/api/public/v1/deployments/channel"Preconditions On Create
Create endpoints currently require all of these to pass:
- the organization has managed infrastructure access
- provisioning queue capacity is available
- provisioning preflight succeeds
- the API key has
deployments:write
Idempotency Behavior
Create endpoints hash the request body and pair it with the idempotency key.
If the same key is reused:
- with the same payload, the existing deployment is returned
- with a different payload, the API returns
409 idempotency_conflict
This is the correct pattern for retry-safe automation.
Error Model
The public API normalizes errors into JSON with:
errormessage- optional
details - optional
requestId
Current notable error codes:
unauthorizedforbiddeninvalid_requestinvalid_jsonnot_foundprecondition_failedqueue_capacity_exceededrate_limit_exceededidempotency_conflictinternal_error
What The API Returns
List routes return:
totalpaginationdeployments
Create routes return:
deploymenttaskidempotentReplay
Single-deployment routes return the deployment plus recent task and audit history for that deployment.
Operational Notes
- API requests update the key's
lastUsedAttimestamp - rate limiting is enforced per API key, not globally per organization
- create routes write provisioning audit logs with source
public_api