Operations
Poll a long-running async action to a terminal state. Side-effecting endpoints hand back an operation_id you poll instead of guessing.
Some actions kick off work that may take a moment — buying a domain, for example. Those endpoints return an operation_id; you poll the operation here until its status reaches a terminal state (succeeded or failed) instead of re-firing the action and re-triggering the side effect.
An operation is a durable, read-only handle. You never mutate one — you read it until it settles. A synchronous action that completes inline still writes an operation row (inserted already-terminal), so the polling contract is uniform whether the work was async or not.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /admin/projects/:projectId/operations | List operations, newest first (filter by kind/status). |
| GET | /admin/projects/:projectId/operations/:operationId | Fetch one operation's status. |
Lifecycle
pending (accepted, not started) and running are non-terminal — keep polling. succeeded and failed are terminal — stop. On failed, failed_reason carries a short, customer-safe explanation. On succeeded, result holds the outcome payload (shape depends on kind).
GET /admin/projects/:projectId/operations
Query
| Param | Type | Default | Notes |
|---|---|---|---|
kind | string | — | Filter to one kind, e.g. domain_purchase. |
status | pending | running | succeeded | failed | — | Filter to one lifecycle status. |
limit | integer | 50 | Page size, clamped to 1–200. |
offset | integer | 0 | Skip rows. |
Response 200
Errors
400 INVALID_QUERY— badkind(too long) orstatus(not a lifecycle value).500 LIST_FAILED.
GET /admin/projects/:projectId/operations/:operationId
Reading a still-running handle for an async action self-reconciles: the server re-checks the underlying work and settles the handle to its terminal status before returning. So polling this endpoint alone drives the action to completion — you don't need to also poll the producing resource.
Response 200
Errors
400 INVALID_OPERATION_ID— not a valid UUID.404 NOT_FOUND— no such operation on this project.500 GET_FAILED.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/operationscurl -X GET 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/operations'Curl:
MCP tools
| Tool | Description |
|---|---|
amba_operations_get | Poll one operation by operation_id until succeeded / failed. |
amba_operations_list | List operations, optionally filtered by kind and/or status. |
Producing tools (e.g. amba_domains_purchase) return the operation_id; pass it to amba_operations_get and re-call until it settles rather than re-running the action.
Reference
- Domains — the first producer of operation handles (
kind: domain_purchase).