启动/停止批量配置任务
功能介绍
启动/停止批量配置任务。
调用方法
请参见如何调用API。
URI
PUT /v2/{project_id}/batch-tasks/{id}/action/{command}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
用户项目ID,获取方法参见获取项目ID和名称 |
|
id |
是 |
String |
批量配置ID |
|
command |
是 |
String |
指定该API要对批量任务配置进行的操作,停止或者启动 枚举值:start|stop |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token,获取方法参见认证鉴权 |
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
total_count |
Integer |
作业总数 |
|
failed_count |
Integer |
失败作业数量 |
|
succeed_count |
Integer |
成功作业数量 |
|
id |
String |
批量作业id |
|
error_list |
Array of strings |
错误信息列表 |
状态码: 400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误信息描述 |
|
detail |
String |
错误详情 |
|
params |
Array of strings |
错误参数列举 |
|
reason |
String |
错误原因 |
|
advice |
String |
建议 |
状态码: 500
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
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 |
内部错误 |