Features
Query the default step template for a specified SOP type. When creating or editing a task, construct the steps array based on this template.
API details
Constraints
The SOP_TASK:READ permission is required.
Request path
GET /api/v2/sop/types/{type}/steps
Request parameters
Parameter |
Location |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|---|
| type | Path | String | Yes | OBSERVER_DATA_REBUILD |
SOP type code. Valid values:REBUILD_STANDBY_TENANT(Rebuild standby tenant),ARBITRATION_FOR_FAULTY_REPLICA(Arbitration service enabled for abnormal replicas),OBSERVER_DATA_REBUILD(OBServer data reconstruction after exception). |
Response parameters
Parameter |
Type |
Description |
|
|---|---|---|---|
| successful | Boolean | Returns 0 on success.true. |
|
| data.contents | Array | PressstepIndexThe default step for ascending order. |
|
| data.contents[].stepIndex | Integer | Default step number, starting from 1. | |
| data.contents[].stepKey | String | Unique identifier of the step. You must use the value from the template when creating or editing a task. | |
| data.contents[].stepName | String | The name displayed for the step in the current locale. | |
| data.contents[].stepKind | String | EXECUTABLE: Performs class steps, which may create an OCP task instance;CONFIRMATION: Confirmation steps. Click "Next" to proceed. |
|
| data.contents[].stepDescription | String \ | null | The step description in the current locale. If no description is available, it isnull. |
| data.contents[].autoRun | Boolean | Whether to automatically execute by default.falseIndicates that the process is waiting for manual intervention. |
|
| data.contents[].enabled | Boolean \ | null | Whether to enable by default.nullindicates that the feature is fixedly enabled and cannot be disabled;true/falseIndicates that the parameter is configurable. |
| data.contents[].blockNext | Boolean | Whether to block subsequent automatic progress when a step fails. | |
| data.contents[].editable | Boolean | Whether to allow modification of this step'sautoRun. |
|
| data.contents[].userMovable | Boolean | Whether to allow reordering steps when creating/editing a task. | |
| data.contents[].minStepIndex | Integer \ | null | The minimum step number (inclusive) allowed when moving; otherwise, it isnull. |
| data.contents[].maxStepIndex | Integer \ | null | The maximum step number (inclusive) allowed when moving. Otherwise, it 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. |
Return step identifier values
data_contents[].stepKey does not accept arbitrary strings. The complete step identifiers for each type are as follows. When creating or editing a task, only identifiers of the corresponding type can be used in the step array.
type |
stepKeyComplete Value (in the order of default steps) |
|---|---|
REBUILD_STANDBY_TENANT |
CONFIRM_STANDBY_TENANT_INFO、BACKUP_PRIMARY_TENANT、DISCONNECT_STANDBY_TENANT、LOCK_STANDBY_TENANT、DELETE_STANDBY_TENANT、CREATE_STANDBY_TENANT、VERIFY_PRIMARY_STANDBY_SYNC |
ARBITRATION_FOR_FAULTY_REPLICA |
CONFIRM_ARBITRATION_TARGET、ADD_ARBITRATION_SERVICE、DELETE_TENANT_REPLICA、DELETE_OBSERVER、ENABLE_TENANT_ARBITRATION、VERIFY_TENANT_ARBITRATION |
OBSERVER_DATA_REBUILD |
CONFIRM_OBSERVER_TARGET、DELETE_TENANT_REPLICA、DELETE_OBSERVER、FORCE_DELETE_HOST、ADD_OBSERVER、ADD_TENANT_REPLICA、VERIFY_REPLICA_REBUILD |
Error codes
HTTP |
Error Code |
Description |
|---|---|---|
| 400 | SOP10006 (SOP_TYPE_UNSUPPORTED) |
typeNot a supported SOP type. |
