CRDB tasks requests
Active-Active database task status requests
| Redis Enterprise Software |
|---|
| Method | Path | Description |
|---|---|---|
| GET | /v1/crdb_tasks |
Get all running tasks |
| GET | /v1/crdb_tasks/{task_id} |
Get the status of an executed task |
| POST | /v1/crdb_tasks/{task_id}/actions/cancel |
Cancel a running or queued task |
Get all running tasks
GET /v1/crdb_tasks
Get all running tasks.
Request
Example HTTP request
GET /v1/crdb_tasks
Response
Returns a JSON array of CRDB task objects.
Status codes
| Code | Description |
|---|---|
| 200 OK | A list of running tasks. |
| 401 Unauthorized | Unauthorized request. Invalid credentials. |
Get task status
GET /v1/crdb_tasks/{task_id}
Get the status of an executed task.
The status of a completed task is kept for 500 seconds by default.
Request
Example HTTP request
GET /v1/crdb_tasks/1
Request headers
| Key | Value | Description |
|---|---|---|
| X-Result-TTL | integer | Task time to live |
URL parameters
| Field | Type | Description |
|---|---|---|
| task_id | string | Task ID |
Query parameters
| Field | Type | Description |
|---|---|---|
| verbose | boolean | Return detailed task information (optional) |
Response
Returns a CRDB task object.
Status codes
| Code | Description |
|---|---|
| 200 OK | Task status. |
| 401 Unauthorized | Unauthorized request. Invalid credentials |
| 404 Not Found | Task not found. |
Cancel task
POST /v1/crdb_tasks/{task_id}/actions/cancel
Gracefully cancels a running or queued task.
A task that already reached the commit phase cannot be canceled.
Request
Example HTTP request
POST /v1/crdb_tasks/1/actions/cancel
URL parameters
| Field | Type | Description |
|---|---|---|
| task_id | string | Task ID |
Query parameters
| Field | Type | Description |
|---|---|---|
| force | boolean | Cancel even if the task is in the commit phase. WARNING: This can break the CRDB in the cluster configuration store (CCS), so use with caution. (optional) |
Response
Returns a status code.
Status codes
| Code | Description |
|---|---|
| 200 OK | The request has been accepted. |
| 401 Unauthorized | Unauthorized request. Invalid credentials. |
| 404 Not Found | Task not found. |
| 406 Not Acceptable | Task cannot be canceled. |
| 409 Conflict | Failed to cancel task. |