Querying the Task List
Function
This API is used to query the task list.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
GET /v3/{project_id}/operation-logs
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| end_time | No | String | Definition End time of a task, in %YYYY-%mm-%ddT%HH:%MM:%SSZ format. For example, 2018-02-01T12:00:00Z. Constraints N/A Range N/A Default Value N/A |
| enterprise_project_id | No | String | Definition Enterprise project ID. Constraints N/A Range Enterprise project ID or all_granted_eps. Value all_granted_eps indicates to query the IDs of all enterprise projects on which the user has permissions. Default Value N/A |
| limit | No | Integer | Definition Number of records displayed on each page. You are advised to explicitly define the value of this parameter. Constraints N/A Range A positive integer. The minimum value is 1. Default Value N/A |
| offset | No | Integer | Definition Offset. Constraints N/A Range A positive integer Default Value N/A |
| operation_type | No | String | Task type, which can be one of the following: backup: backup tasks replication: replication tasks delete: deletion tasks restore: restoration tasks vault_delete: vault deletion tasks remove_resource: resource dissociation tasks sync: synchronization tasks copy: replication tasks in the earlier version. Currently, replication tasks are all of the replication type. migrate_resources: resource migration tasks update_expiration_time: existing retention rule update tasks |
| provider_id | No | String | Definition Backup provider ID. Constraints N/A Range N/A Default Value N/A |
| resource_id | No | String | Definition ID of the resource on which the task is performed. For details about how to obtain the resource ID, see Querying All Backups, Querying Protectable Resources, and Querying the Vault List. Constraints N/A Range N/A Default Value N/A |
| resource_name | No | String | Definition Name of the resource on which the task is performed. For details about how to obtain the resource name, see Querying All Backups, Querying Protectable Resources, and Querying the Vault List. Constraints N/A Range N/A Default Value N/A |
| start_time | No | String | Definition Task start time, for example, 2018-01-01T12:00:00Z. Constraints Format: %YYYY-%mm-%ddT%HH:%MM:%SSZ Range N/A Default Value N/A |
| status | No | String | Task status. The value can be: success: The task is executed successfully. skipped: The task is skipped because some checks fail. failed: The task fails to be executed. running: The task is running. timeout: The task times out. No error occurs during the process, but the running duration of some steps exceeds the system-specified time. waiting: The task is waiting to be executed. |
| vault_id | No | String | Definition ID of the vault associated with the resource. For details about how to obtain the vault ID, see Querying the Vault List. Constraints N/A Range N/A Default Value N/A |
| vault_name | No | String | Definition Name of the vault associated with the resource. For details about how to obtain the vault name, see Querying the Vault List. Constraints N/A Range The value can contain 1 to 64 characters. Only letters, digits, underscores (_), periods (.), and hyphens (-) are allowed. Default Value N/A |
| destination_region | No | String | Destination region. Default value: N/A To obtain the region, see "Regions and Endpoints". |
| destination_project_id | No | String | Project ID of the destination region. Default value: N/A To obtain the project ID, see section "Obtaining a Project ID". |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. You can obtain it by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| operation_logs | Array of OperationLog objects | Definition Task list. Range Maximum number of records that can be returned: N/A |
| count | Integer | Definition Number of tasks. Range An integer greater than or equal to 0 |
| limit | Integer | Number of records displayed on each page |
| offset | Integer | Offset where the query starts |
| Parameter | Type | Description |
|---|---|---|
| checkpoint_id | String | Definition Backup record ID. Range N/A |
| created_at | String | Creation time, for example, 2020-02-23T01:00:32Z |
| ended_at | String | Task end time, for example, 2020-02-23T01:00:32Z |
| error_info | OpErrorInfo object | Task error message |
| extra_info | OpExtraInfo object | Task extension information |
| id | String | Definition Task ID, which is the operation_log ID. Range N/A |
| operation_type | String | Definition Task type. Range |
| policy_id | String | Definition Policy ID. For details about how to obtain the policy ID, see Querying the Policy List. Range N/A |
| project_id | String | Definition Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. Range N/A |
| provider_id | String | Definition Backup provider ID, which indicates what resources are backed up. Range The provider_id value varies depending on the backup type: Cloud server backup: 0daac4c5-6707-4851-97ba-169e36266b66 Cloud disk backup: d1603440-187d-4516-af25-121250c7cc97 Hybrid cloud backup: a13639de-00be-4e94-af30-26912d75e4a2 Cloud database backup: 8466a52f-e22a-4e59-b4c7-802bbe5a4985 SFS Turbo backup: 3f3c3220-245c-4805-b811-758870015881 Cloud desktop backup: 86a80900-71bf-4961-956a-d52df944f84a File system backup: 85b8590b-a942-4667-ac39-8a4ece2292c0 |
| started_at | String | Task start time, for example, 2020-02-23T01:00:32Z |
| status | String | Definition Task status. Range |
| updated_at | String | Modification time, for example, 2020-02-23T01:00:32Z |
| vault_id | String | Definition ID of the vault to which the task resource belongs. Range N/A |
| vault_name | String | Definition Name of the vault to which the task resource belongs. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| code | String | For details, see Error Codes. |
| message | String | Error message |
| Parameter | Type | Description |
|---|---|---|
| backup | OpExtendInfoBckup object | Extended parameters of backup |
| common | OpExtendInfoCommon object | Common parameters |
| delete | OpExtendInfoDelete object | Extended parameters of deletion |
| sync | OpExtendInfoSync object | Extended parameters of synchronization |
| remove_resources | OpExtendInfoRemoveResources object | Extended parameters of removing resources from a vault |
| replication | OpExtendInfoReplication object | Extended parameters of replication |
| resource | Resource object | Resource information |
| restore | OpExtendInfoRestore object | Extended parameters of restoration |
| vault_delete | OpExtendInfoVaultDelete object | Extended parameters of deleting a vault |
| update_expiration_time | Updating the expiration information. |
| Parameter | Type | Description |
|---|---|---|
| app_consistency_error_code | String | Error code returned if application-consistent backup fails. For details, see Error Codes. |
| app_consistency_error_message | String | Error message returned if application-consistent backup fails |
| app_consistency_status | String | Definition Application-consistent backup status. Range |
| backup_id | String | Definition Backup ID. Range N/A For details, see Querying All Backups. |
| backup_name | String | Definition Backup name. Range The value can contain a maximum of 64 characters, including only digits, uppercase letters, lowercase letters, underscores (_), and hyphens (-). Default value: N/A |
| incremental | String | Definition Whether the backup is an incremental backup. Range |
| Parameter | Type | Description |
|---|---|---|
| progress | Integer | Progress of the query task. The value ranges from 0 to 100. |
| request_id | String | Definition Request ID. Range N/A |
| task_id | String | Definition Backup task ID. For details about how to obtain the task ID, see Querying the Task List. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| backup_id | String | Backup ID. Default value: N/A For details, see Querying All Backups. |
| backup_name | String | Backup name. The value can contain a maximum of 64 characters, including digits, uppercase letters, lowercase letters, underscores (_), and hyphens (-). Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| sync_backup_num | Integer | Number of synchronized backups |
| delete_backup_num | Integer | Number of deleted backups |
| err_sync_backup_num | Integer | Number of backups that failed to be synchronized |
| Parameter | Type | Description |
|---|---|---|
| fail_count | Integer | Number of resources that fail to be deleted |
| total_count | Integer | Number of deleted backups |
| resources | Array of Resource objects | Resource information |
| Parameter | Type | Description |
|---|---|---|
| extra_info | ResourceExtraInfo object | Extra information of the resource |
| id | String | ID of the resource to be backed up. The resource must have been associated with the vault and can be backed up. Default value: N/A For details about how to obtain the ID, see Querying Information About the Resources Associated with a Vault and Querying Protectable Resources. |
| name | String | Name of the resource to be backed up. The value can contain a maximum of 255 characters. Default value: N/A |
| type | String | Type of the resource to be backed up: OS::Nova::Server: ECS; OS::Cinder::Volume: EVS disks; OS::Ironic::BareMetalServer: Bare Metal Servers; OS::Sfs::Turbo: SFS Turbo file systems; OS::Workspace::DesktopV2: Workspaces Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| destination_backup_id | String | ID of the backup in the destination region. Default value: N/A For details about how to obtain the backup ID, see Obtaining a Backup ID, where project_id is the project ID of the destination region). |
| destination_checkpoint_id | String | Destination checkpoint ID |
| destination_project_id | String | ID of the project in the destination region. Default value: N/A For details about how to obtain the project ID, see Obtaining a Project ID. |
| destination_region | String | Destination region. Default value: N/A For details about how to obtain the region ID, see Querying Regions and Endpoints. |
| source_backup_id | String | ID of the backup at the source end. Default value: N/A For details about how to obtain the backup ID, see Obtaining a Backup ID, where project_id is the project ID of the source end). |
| source_checkpoint_id | String | Source checkpoint ID |
| source_project_id | String | ID of the project in the source region. Default value: N/A For details about how to obtain the project ID, see Obtaining a Project ID. |
| source_region | String | Source region. Default value: N/A For details about how to obtain the region ID, see Querying Regions and Endpoints. |
| source_backup_name | String | Source backup name |
| destination_backup_name | String | Destination backup name |
| Parameter | Type | Description |
|---|---|---|
| exclude_volumes | Array of strings | Definition IDs of the disks that do not need to be backed up. This parameter is valid only for multi-disk backup to specify disks that do not need to be backed up. When a disk is newly attached to a VM, existing disks that do not need to be backed up can also be excluded. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| backup_id | String | ID of the backup replica. Default value: N/A For details about how to obtain the backup ID, see Obtaining a Backup ID. |
| backup_name | String | Backup name. The value can contain a maximum of 64 characters, including digits, uppercase letters, lowercase letters, underscores (_), and hyphens (-). Default value: N/A |
| target_resource_id | String | Definition ID of the restoration target resource. Range The value is in the UUID format. Default value: N/A |
| target_resource_name | String | Definition Name of the restoration target resource. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| fail_count | Integer | Number of resources that fail to be deleted in this task |
| total_count | Integer | Number of backups deleted in this task |
| Parameter | Type | Description |
|---|---|---|
| affected_backups_count | Integer | Number of affected backups in this task. |
| expiration_day | String | Expected expiration time of this task. The format is YYYY-MM-DD. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| operation_logs | Array of OperationLog objects | Definition Task list. Range Maximum number of records that can be returned: N/A |
| count | Integer | Definition Number of tasks. Range An integer greater than or equal to 0 |
| limit | Integer | Number of records displayed on each page |
| offset | Integer | Offset where the query starts |
| Parameter | Type | Description |
|---|---|---|
| checkpoint_id | String | Definition Backup record ID. Range N/A |
| created_at | String | Creation time, for example, 2020-02-23T01:00:32Z |
| ended_at | String | Task end time, for example, 2020-02-23T01:00:32Z |
| error_info | OpErrorInfo object | Task error message |
| extra_info | OpExtraInfo object | Task extension information |
| id | String | Definition Task ID, which is the operation_log ID. Range N/A |
| operation_type | String | Definition Task type. Range |
| policy_id | String | Definition Policy ID. For details about how to obtain the policy ID, see Querying the Policy List. Range N/A |
| project_id | String | Definition Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. Range N/A |
| provider_id | String | Definition Backup provider ID, which indicates what resources are backed up. Range The provider_id value varies depending on the backup type: Cloud server backup: 0daac4c5-6707-4851-97ba-169e36266b66 Cloud disk backup: d1603440-187d-4516-af25-121250c7cc97 Hybrid cloud backup: a13639de-00be-4e94-af30-26912d75e4a2 Cloud database backup: 8466a52f-e22a-4e59-b4c7-802bbe5a4985 SFS Turbo backup: 3f3c3220-245c-4805-b811-758870015881 Cloud desktop backup: 86a80900-71bf-4961-956a-d52df944f84a File system backup: 85b8590b-a942-4667-ac39-8a4ece2292c0 |
| started_at | String | Task start time, for example, 2020-02-23T01:00:32Z |
| status | String | Definition Task status. Range |
| updated_at | String | Modification time, for example, 2020-02-23T01:00:32Z |
| vault_id | String | Definition ID of the vault to which the task resource belongs. Range N/A |
| vault_name | String | Definition Name of the vault to which the task resource belongs. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| code | String | For details, see Error Codes. |
| message | String | Error message |
| Parameter | Type | Description |
|---|---|---|
| backup | OpExtendInfoBckup object | Extended parameters of backup |
| common | OpExtendInfoCommon object | Common parameters |
| delete | OpExtendInfoDelete object | Extended parameters of deletion |
| sync | OpExtendInfoSync object | Extended parameters of synchronization |
| remove_resources | OpExtendInfoRemoveResources object | Extended parameters of removing resources from a vault |
| replication | OpExtendInfoReplication object | Extended parameters of replication |
| resource | Resource object | Resource information |
| restore | OpExtendInfoRestore object | Extended parameters of restoration |
| vault_delete | OpExtendInfoVaultDelete object | Extended parameters of deleting a vault |
| update_expiration_time | Updating the expiration information. |
| Parameter | Type | Description |
|---|---|---|
| app_consistency_error_code | String | Error code returned if application-consistent backup fails. For details, see Error Codes. |
| app_consistency_error_message | String | Error message returned if application-consistent backup fails |
| app_consistency_status | String | Definition Application-consistent backup status. Range |
| backup_id | String | Definition Backup ID. Range N/A For details, see Querying All Backups. |
| backup_name | String | Definition Backup name. Range The value can contain a maximum of 64 characters, including only digits, uppercase letters, lowercase letters, underscores (_), and hyphens (-). Default value: N/A |
| incremental | String | Definition Whether the backup is an incremental backup. Range |
| Parameter | Type | Description |
|---|---|---|
| progress | Integer | Progress of the query task. The value ranges from 0 to 100. |
| request_id | String | Definition Request ID. Range N/A |
| task_id | String | Definition Backup task ID. For details about how to obtain the task ID, see Querying the Task List. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| backup_id | String | Backup ID. Default value: N/A For details, see Querying All Backups. |
| backup_name | String | Backup name. The value can contain a maximum of 64 characters, including digits, uppercase letters, lowercase letters, underscores (_), and hyphens (-). Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| sync_backup_num | Integer | Number of synchronized backups |
| delete_backup_num | Integer | Number of deleted backups |
| err_sync_backup_num | Integer | Number of backups that failed to be synchronized |
| Parameter | Type | Description |
|---|---|---|
| fail_count | Integer | Number of resources that fail to be deleted |
| total_count | Integer | Number of deleted backups |
| resources | Array of Resource objects | Resource information |
| Parameter | Type | Description |
|---|---|---|
| extra_info | ResourceExtraInfo object | Extra information of the resource |
| id | String | ID of the resource to be backed up. The resource must have been associated with the vault and can be backed up. Default value: N/A For details about how to obtain the ID, see Querying Information About the Resources Associated with a Vault and Querying Protectable Resources. |
| name | String | Name of the resource to be backed up. The value can contain a maximum of 255 characters. Default value: N/A |
| type | String | Type of the resource to be backed up: OS::Nova::Server: ECS; OS::Cinder::Volume: EVS disks; OS::Ironic::BareMetalServer: Bare Metal Servers; OS::Sfs::Turbo: SFS Turbo file systems; OS::Workspace::DesktopV2: Workspaces Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| destination_backup_id | String | ID of the backup in the destination region. Default value: N/A For details about how to obtain the backup ID, see Obtaining a Backup ID, where project_id is the project ID of the destination region. |
| destination_checkpoint_id | String | Destination checkpoint ID |
| destination_project_id | String | ID of the project in the destination region. Default value: N/A For details about how to obtain the project ID, see Obtaining a Project ID. |
| destination_region | String | Destination region. Default value: N/A For details about how to obtain the region ID, see Querying Regions and Endpoints. |
| source_backup_id | String | ID of the backup at the source end. Default value: N/A For details about how to obtain the backup ID, see Obtaining a Backup ID, where project_id is the project ID of the source end. |
| source_checkpoint_id | String | Source checkpoint ID |
| source_project_id | String | ID of the project in the source region. Default value: N/A For details about how to obtain the project ID, see Obtaining a Project ID. |
| source_region | String | Source region. Default value: N/A For details about how to obtain the region ID, see Querying Regions and Endpoints. |
| source_backup_name | String | Source backup name |
| destination_backup_name | String | Destination backup name |
| Parameter | Type | Description |
|---|---|---|
| exclude_volumes | Array of strings | Definition IDs of the disks that do not need to be backed up. This parameter is valid only for multi-disk backup to specify disks that do not need to be backed up. When a disk is newly attached to a VM, existing disks that do not need to be backed up can also be excluded. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| backup_id | String | ID of the backup replica. Default value: N/A For details about how to obtain the backup ID, see Obtaining a Backup ID. |
| backup_name | String | Backup name. The value can contain a maximum of 64 characters, including digits, uppercase letters, lowercase letters, underscores (_), and hyphens (-). Default value: N/A |
| target_resource_id | String | Definition ID of the restoration target resource. Range The value is in the UUID format. Default value: N/A |
| target_resource_name | String | Definition Name of the restoration target resource. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| fail_count | Integer | Number of resources that fail to be deleted in this task |
| total_count | Integer | Number of backups deleted in this task |
| Parameter | Type | Description |
|---|---|---|
| affected_backups_count | Integer | Number of affected backups in this task. |
| expiration_day | String | Expected expiration time of this task. The format is YYYY-MM-DD. |
Example Requests
GET https://{endpoint}/v3/{project_id}/operation-logs Example Responses
Status code: 200
OK
{
"count" : 1,
"limit" : 10,
"offset" : 0,
"operation_logs" : [ {
"status" : "success",
"provider_id" : "0daac4c5-6707-4851-97ba-169e36266b66",
"checkpoint_id" : "b432511f-d889-428f-8b0e-5f47c524c6b6",
"updated_at" : "2019-05-23T14:35:23.584+00:00",
"error_info" : {
"message" : "",
"code" : ""
},
"started_at" : "2019-05-23T14:31:36.007+00:00",
"id" : "4827f2da-b008-4507-ab7d-42d0df5ed912",
"extra_info" : {
"resource" : {
"type" : "OS::Nova::Server",
"id" : "1dab32fa-ebf2-415a-ab0b-eabe6353bc86",
"name" : "ECS-0001"
},
"backup" : {
"backup_name" : "manualbk_backup",
"backup_id" : "0e5d0ef6-7f0a-4890-b98c-cb12490e31c1"
},
"common" : {
"progress" : 100,
"request_id" : "req-cdb98cc4-e87b-4f40-9b4a-57ec036620bc"
}
},
"ended_at" : "2019-05-23T14:35:23.511+00:00",
"created_at" : "2019-05-23T14:31:36.039+00:00",
"operation_type" : "backup",
"project_id" : "04f1829c788037ac2fb8c01eb2b04b95",
"policy_id" : "12a8f292-9b79-4a35-99c1-aad489ae4235",
"vault_id" : "8865eccd-18be-46fd-8b3b-9c93d9b02e55",
"vault_name" : "vault-2b48"
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 404 | Not Found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot