Overview
Query task definitions, target parameters, step configurations, and derived statuses. To obtain real-time step execution information, call "Query SOP Execution Details".
API details
Constraints
You must have the SOP_TASK:READ permission for this task.
Request path
GET /api/v2/sop/tasks/{id}
Request parameters
Parameter |
Location |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|---|
| id | Path | Long | Yes | 1001 |
Task ID. |
Response parameters
Parameter |
Type |
Description |
|
|---|---|---|---|
| successful | Boolean | Returns 0 on success.true. |
|
| data.id | Long | Task ID. | |
| data.name | String | Task name. | |
| data.sopType | String | SOP type code. | |
| data.sopTypeDisplayName | String | The display name of the SOP type in the current locale. | |
| data.targetParam | Object | Task-level target parameters and server-side parsed/complementary fields. The core fields for rebuilding a standby tenant arestandbyClusterId、standbyTenantId、logTransportMode; Arbitration type isclusterIdChoose either arbitration service or service group; rebuild OBServer toclusterIdand optionalreplacementHostId. |
|
| data.operationObjects | Object | The resolved display objects. Rebuilding a standby tenant may include the original/new standby tenant, original/new standby cluster, primary tenant, primary cluster, various IDs, log transfer methods, and backup configurations; the arbitration type may include the affected tenant, faulty IP, arbitration service/service group, and service connection information; OBServer rebuilding may include the affected tenant, faulty IP, Zone, and alternate host ID/IP. If a field does not exist, it is not returned. | |
| data.targetSummary.displayText | String | Summary text for the target. | |
| data.targetSummary.kind | String | Target category. | |
| data.targetSummary.details[] | Array | Summary details; each item containslabel(name) andvalue(value). |
|
| data.steps[] | Array | Configure the current task step. | |
| data.steps[].stepIndex | Integer | Step number. | |
| data.steps[].stepKey | String | Unique identifier of the step. | |
| data.steps[].stepName | String | Step display name. | |
| data.steps[].stepKind | String | EXECUTABLEorCONFIRMATION. |
|
| data.steps[].stepDescription | String \ | null | Step description. |
| data.steps[].autoRun | Boolean | Whether to execute automatically. | |
| data.steps[].enabled | Boolean \ | null | Whether to enable;nullIndicates that the feature is always enabled. |
| data.steps[].blockNext | Boolean | Whether to block subsequent automatic progress when a failure occurs. | |
| data.steps[].editable | Boolean | Whether to allow adjustment of the auto-execution switch. | |
| data.steps[].userMovable | Boolean | Whether to allow adjusting the step order. | |
| data.steps[].minStepIndex | Integer \ | null | The minimum step number allowed for moving. |
| data.steps[].maxStepIndex | Integer \ | null | Maximum step number allowed for moving. |
| data.comments | String \ | null | Remarks. |
| data.creator | String | Username of the creator. | |
| data.createTime | Datetime | The time when the task was created. | |
| data.updateTime | Datetime | Last update time of the task. | |
| data.displayStatus | String | NOT_STARTED、WAITING_CONFIRM、RUNNING、FAILEDorCOMPLETED. |
|
| data.currentExecutionId | Long \ | null | The ID of the instance being started. If the instance is not started, this field isnull. |
| timestamp | Datetime | The time taken by the server to create the response. | |
| duration | Long | The time consumed by the server for processing, in milliseconds. | |
| status | Integer | HTTP status code. In case of success, it is200. |
|
| traceId | String | Request link ID, used for log troubleshooting. |
Error codes
HTTP |
Error Code |
Description |
|---|---|---|
| 404 | SOP10008 (SOP_TASK_NOT_FOUND) |
The task does not exist. |
