更新时间:2025-11-26 GMT+08:00
分享

启动/停止批量配置任务

功能介绍

启动/停止批量配置任务。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

PUT /v2/{project_id}/batch-tasks/{id}/action/{command}

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

用户项目ID,获取方法参见获取项目ID和名称

id

String

批量配置ID。

command

String

指定该API要对批量任务配置进行的操作,停止或者启动 枚举值:start|stop。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token,获取方法参见认证鉴权

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

total_count

Integer

作业总数。

failed_count

Integer

失败作业数量。

succeed_count

Integer

成功作业数量。

id

String

批量作业id。

error_list

Array of strings

错误信息列表。

状态码:400

表4 响应Body参数

参数

参数类型

描述

error_code

String

错误码。

error_msg

String

错误信息描述。

detail

String

错误详情。

params

Array of strings

错误参数列举。

reason

String

错误原因。

advice

String

建议。

状态码:500

表5 响应Body参数

参数

参数类型

描述

error_code

String

错误码。

error_msg

String

错误信息描述。

detail

String

错误详情。

params

Array of strings

错误参数列举。

reason

String

错误原因。

advice

String

建议。

请求示例

对批量配置ID为{id}做启动/停止动作

 /v2/{project_id}/batch-tasks/{id}/action/{command}

https://{endpoint}/v2/{project_id}/batch-tasks/0d47bbf52962414bb7ae27fb6ea24230/action/{command}?

响应示例

状态码:200

批量操作响应体。

{
  "total_count" : 1,
  "failed_count" : 0,
  "succeed_count" : 1,
  "id" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "error_list" : [ ]
}

状态码

状态码

描述

200

批量操作响应体。

400

请求错误。

500

内部错误。

相关文档