获取批量配置任务列表
功能介绍
获取批量配置任务列表
调用方法
请参见如何调用API。
URI
GET /v2/{project_id}/batch-tasks
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
用户项目ID,获取方法参见获取项目ID和名称 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
is_paged |
否 |
Boolean |
是否分页 |
|
page_size |
否 |
Integer |
每页显示的条目数量 |
|
page_num |
否 |
Integer |
页号 |
|
order_by |
否 |
String |
升序或降序,枚举值:asc|desc。 |
|
sort_name |
否 |
String |
排序字段,枚举值:task_count|created_at。 |
|
video_group |
否 |
String |
视频源分组列表,多个以逗号分隔,需要满足正则:^[a-zA-Z0-9\u4e00-\u9fa5,-_]{1,1000}$ |
|
task_state |
否 |
String |
任务状态,需要枚举值:pending|recovering|starting|upgrading|create_failed|start_failed|running|stopping|stopped|abnormal|succeeded|failed|deleting|freezing|frozen|stopped_no_service|scheduling|lack_of_resources |
|
type_like |
否 |
String |
模糊查询字段,枚举值: batch_task_name|publish_service_name |
|
name_like |
否 |
String |
模糊查询名称,需要与type_like搭配使用来实现是通过batch_task_name还是publish_service_name进行模糊查询 |
|
manufacturer |
否 |
String |
根据厂商字段筛选,需要满足正则表达式 ^[a-zA-Z0-9\u4e00-\u9fa5,-_]{2,64}$ |
|
title |
否 |
String |
算法中文名,需要满足正则表达式 ^[a-zA-Z0-9\u4e00-\u9fa5,-_]{2,64}$ |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token,获取方法参见认证鉴权 |
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
count |
Integer |
条目总数 |
|
batch_task_list |
Array of BatchTaskDto objects |
批量作业列表 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
id |
String |
批量作业ID |
|
batch_task_name |
String |
批量作业名称 |
|
video_source_name |
String |
视频源名称 |
|
video_group_name |
String |
分组名称 |
|
alg_name |
String |
算法名称 |
|
company |
String |
厂商名 |
|
type |
String |
作业类型 |
|
num_task |
Integer |
批量作业总数 |
|
created_at |
Long |
创建时间 |
|
batch_task_status_info |
BatchTaskStatusInfoDto object |
批量作业状态基本信息 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
pending |
Integer |
等待中作业数量 |
|
recovering |
Integer |
恢复中作业数量 |
|
starting |
Integer |
启动中作业数量 |
|
upgrading |
Integer |
升级中作业数量 |
|
create_failed |
Integer |
创建失败作业数量 |
|
start_failed |
Integer |
启动失败作业数量 |
|
running |
Integer |
运行中作业数量 |
|
stopping |
Integer |
停止中作业数量 |
|
stopped |
Integer |
已停止作业数量 |
|
abnormal |
Integer |
异常作业数量 |
|
succeeded |
Integer |
运行成功作业数量 |
|
failed |
Integer |
运行失败作业数量 |
|
deleting |
Integer |
删除中作业数量 |
|
freezing |
Integer |
冻结中作业数量 |
|
frozen |
Integer |
已冻结作业数量 |
|
stopped_no_service |
Integer |
无服务的任务数量 |
|
scheduling |
Integer |
调度中 |
|
lack_of_resources |
Integer |
资源不足,创建失败 |
状态码: 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 |
建议 |
请求示例
获取批量配置任务列表,展示批量配置名称,视频源分组,算法服务名称,配置类型,配置任务数量,创建时间,配置下任务状态。
https://xxx/v2/xxx/batch-tasks?page_num=1&page_size=10
响应示例
状态码: 200
批量操作响应体
{
"count" : 2,
"batch_task_list" : [ {
"id" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"batch_task_name" : "qqqq",
"video_group_name" : "2312,1889,927,914",
"alg_name" : "testwjh",
"type" : "0",
"priority" : "low",
"num_task" : 3,
"created_at" : 1685667905165,
"batch_task_status_info" : {
"stopped" : 3
}
}, {
"id" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"batch_task_name" : "qqq",
"video_group_name" : "2312",
"alg_name" : "testwjh",
"type" : "0",
"priority" : "low",
"num_task" : 1,
"created_at" : 1685667856283,
"batch_task_status_info" : {
"running" : 1
}
} ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
批量操作响应体 |
|
400 |
请求错误 |
|
500 |
内部错误 |