Stopping or Deleting Tasks in Batches

Function

This API is used to stop tasks in batches or delete real-time migration, real-time synchronization, and real-time DR tasks.

Constraints

URI

DELETE /v3/{project_id}/jobs/batch-jobs

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

The content type.

The default value is application/json.

X-Auth-Token

Yes

String

User token obtained from IAM.

X-Language

No

String

Request language type

Default value: en-us

Values:

  • en-us
  • zh-cn
Table 3 Request body parameters

Parameter

Mandatory

Type

Description

jobs

Yes

Array of DeleteJobReq objects

List of requests for stopping or deleting tasks in batches.

Table 4 DeleteJobReq

Parameter

Mandatory

Type

Description

delete_type

Yes

String

The value can be terminate, force_terminate, or delete. terminate indicates that the migration task is stopped, force_terminate indicates that the migration task is forcibly stopped, and delete indicates that the migration task is deleted.

Values:

  • terminate
  • force_terminate
  • delete

job_id

Yes

String

Task ID.

Response Parameters

Status code: 202

Table 5 Response body parameters

Parameter

Type

Description

results

Array of DeleteJobResp objects

Response body set for stopping or deleting tasks in batches.

count

Integer

Total number.

Table 6 DeleteJobResp

Parameter

Type

Description

id

String

Task ID.

status

String

Status Values:

  • success
  • failed

error_code

String

Error code, which is optional and indicates the returned information about the failure status.

error_msg

String

Error message, which is optional and indicates the returned information about the failure status.

Example Request

Example Response

Status code: 202

Accepted

Status Code

Status Code

Description

202

Accepted

400

Bad Request

Error Code

For details, see Error Code.