{
  "id": "crdb_tasks",
  "title": "CRDB tasks requests",
  "url": "https://redis.io/docs/latest/operate/rs/7.8/references/rest-api/requests/crdb_tasks/",
  "summary": "Active-Active database task status requests",
  "content": "\n| Method | Path | Description |\n|--------|------|-------------|\n| [GET](#get-all-crdb_tasks) | `/v1/crdb_tasks` | Get all running tasks |\n| [GET](#get-crdb_task) | `/v1/crdb_tasks/{task_id}` | Get the status of an executed task |\n| [POST](#post-crdb_task-cancel) | `/v1/crdb_tasks/{task_id}/actions/cancel` | Cancel a running or queued task |\n\n## Get all running tasks {#get-all-crdb_tasks}\n\n```sh\nGET /v1/crdb_tasks\n```\n\nGet all running tasks.\n\n### Request {#get-all-request}\n\n#### Example HTTP request\n\n```sh\nGET /v1/crdb_tasks\n```\n\n### Response {#get-all-response}\n\nReturns a JSON array of [CRDB task objects]().\n\n#### Status codes {#get-all-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | A list of running tasks. |\n| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | Unauthorized request. Invalid credentials. |\n\n## Get task status {#get-crdb_task}\n\n\tGET /v1/crdb_tasks/{task_id}\n\nGet the status of an executed task.\n\nThe status of a completed task is kept for 500 seconds by default.\n\n### Request {#get-request} \n\n#### Example HTTP request\n\n    GET /v1/crdb_tasks/1\n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| X-Result-TTL | integer | Task time to live |\n\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| task_id | string | Task ID |\n\n#### Query parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| verbose | boolean | Return detailed task information (optional) |\n\n### Response {#get-response} \n\nReturns a [CRDB task object]().\n\n### Status codes {#get-status-codes} \n\n| Code | Description |\n|------|-------------|\n| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Task status. |\n| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | Unauthorized request. Invalid credentials. |\n| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Task not found. |\n\n## Cancel task {#post-crdb_task-cancel}\n\n```sh\nPOST /v1/crdb_tasks/{task_id}/actions/cancel\n```\n\nGracefully cancels a running or queued task.\n\nA task that already reached the commit phase cannot be canceled.\n\n### Request {#post-cancel-request}\n\n#### Example HTTP request\n\n```sh\nPOST /v1/crdb_tasks/1/actions/cancel\n```\n\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| task_id | string | Task ID |\n\n#### Query parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| force | boolean | Cancel even when the task is during commit. **WARNING**: Can break the CRDB in CCS, use with caution! (optional) |\n\n### Response {#post-cancel-response}\n\nReturns a success message.\n\n#### Status codes {#post-cancel-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | The request has been accepted. |\n| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | Unauthorized request. Invalid credentials. |\n| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Task not found. |\n| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | Task cannot be canceled. |\n| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Failed to cancel task. |\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-04-01T08:10:08-05:00",
  "children": []
}

