> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dbhost.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get operation

> Read the current status of an asynchronous database operation.

Returns one operation visible to the authenticated API key. Operations cover
`backup`, `restore`, `clone`, `delete`, and `recover` jobs.

<Note>
  Reading an operation does not authorize a destructive capability. Execution
  still requires the exact per-database rollout binding and agent capability.
</Note>

## Path parameters

| Parameter | Type   | Description                                    |
| --------- | ------ | ---------------------------------------------- |
| `id`      | string | Operation ID returned by an asynchronous route |

## Response

```json 200 OK theme={null}
{
  "operation": {
    "id": "op_01J...",
    "type": "restore",
    "status": "running",
    "stage": "validate_artifact",
    "progress": 20,
    "error": null,
    "createdAt": "2026-07-20T12:00:00Z",
    "startedAt": "2026-07-20T12:00:01Z",
    "completedAt": null,
    "updatedAt": "2026-07-20T12:00:04Z"
  }
}
```

Statuses are `queued`, `running`, `succeeded`, `failed`, and `canceled`.
`stage` is operation-specific. `progress` is an integer from 0 to 100. Failed
operations return a stable error code/message without exposing credentials or
dump content.

Clients can poll until a terminal status. The CLI waits by default; `--no-wait`
returns the operation ID immediately.

## Errors

| Status | Code                  | Description                                             |
| ------ | --------------------- | ------------------------------------------------------- |
| 401    | `UNAUTHORIZED`        | Missing or invalid API key                              |
| 404    | `OPERATION_NOT_FOUND` | Operation is missing or outside the key's visible scope |
