任务管理相关接口
工作流任务管理¶
/api/v1/tasks¶
POST¶
Summary:¶
创建任务
Description:¶
创建任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | data | Yes | dto.TaskInsertReq |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
/api/v1/tasks/{uid}¶
GET¶
Summary:¶
查询任务
Description:¶
查询任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
uid | path | uid | No | string |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "data": [...]} | response.Response & object |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
GET¶
Summary:¶
分页任务列表数据
Description:¶
任务列表
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
displayName | query | displayName | No | string |
type | query | 任务类型 | No | string |
phase | query | 所处阶段 | No | string |
fileId | query | 文件ID | No | string |
workflowId | query | 工作流ID | No | string |
materialId | query | 素材库ID | No | string |
page | query | 页条数 | No | integer |
limit | query | 页码 | No | integer |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "data": [...]} | response.Response & object |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
/api/v1/tasks¶
DELETE¶
Summary:¶
删除任务
Description:¶
删除任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | uids | No | dto.TaskDeleteReq |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
PUT¶
Summary:¶
更新任务
Description:¶
更新任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | body | Yes | dto.TaskUpdateReq |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
/api/v1/tasks/{uid}/resubmit¶
PUT¶
Summary:¶
重新提交任务
Description:¶
重新提交当前任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | body | Yes | dto.TaskResubmitRequest |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
/api/v1/tasks/{uid}/resume¶
PUT¶
Summary:¶
恢复执行任务
Description:¶
恢复中断、暂停的任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | body | Yes | dto.TaskResumeRequest |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
/api/v1/tasks/{uid}/stop¶
PUT¶
Summary:¶
停止任务
Description:¶
停止任务,会执行退出相关调用
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | body | Yes | dto.TaskStopRequest |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
子任务管理¶
/api/v1/tasks/{uid}/subtasks¶
GET¶
Summary:¶
/api/v1/tasks/{uid}/suspend¶
PUT¶
Summary:¶
中断任务
Description:¶
暂停,中断任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | body | Yes | dto.TaskSuspendRequest |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
/api/v1/tasks/{uid}/terminate¶
PUT¶
Summary:¶
终止任务
Description:¶
立即终止任务,不执行任何退出相关处理调用
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | body | Yes | dto.TaskTerminateRequest |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
查询子任务
Description:¶
查询子任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
uid | path | uid | No | string |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "data": [...]} | response.Response & object |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
子任务管理¶
/api/v1/subtasks¶
POST¶
Summary:¶
创建子任务
Description:¶
创建子任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | data | Yes | dto.SubTaskInsertReq |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
DELETE¶
Summary:¶
删除子任务
Description:¶
删除子任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
uids | body | uids | No | [ integer ] |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
GET¶
Summary:¶
分页子任务列表数据
Description:¶
子任务列表
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
displayName | query | 子任务名称 | No | string |
type | query | 子任务类型 | No | string |
page | query | 页条数 | No | integer |
limit | query | 页码 | No | integer |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "data": [...]} | response.Response & object |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
/api/v1/subtasks/{uid}¶
GET¶
Summary:¶
查询子任务
Description:¶
查询子任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
uid | path | uid | No | string |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "data": [...]} | response.Response & object |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
PUT¶
Summary:¶
更新子任务
Description:¶
更新子任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | body | Yes | dto.SubTaskUpdateReq |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
中继任务管理¶
/api/v1/relaytasks¶
POST¶
Summary:¶
创建中继任务
Description:¶
创建中继任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | data | Yes | dto.RelayTaskInsertReq |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
DELETE¶
Summary:¶
删除中继任务
Description:¶
删除中继任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
data | body | uids | No | dto.RelayTaskDeleteReq |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "message": "success"} | response.Response |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
GET¶
Summary:¶
分页中继任务列表数据
Description:¶
中继任务列表
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
displayName | query | 显示名称 | No | string |
type | query | 任务类型 | No | string |
phase | query | 所处阶段 | No | string |
workflowId | query | 工作流ID | No | string |
page | query | 页条数 | No | integer |
limit | query | 页码 | No | integer |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "data": [...]} | response.Response & object |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
/api/v1/relaytasks/{uid}¶
GET¶
Summary:¶
查询中继任务
Description:¶
查询中继任务
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
uid | path | uid | No | string |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "data": [...]} | response.Response & object |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
/api/v1/relaytasks/{uid}/basicid¶
GET¶
Summary:¶
查询中继任务对应的BasicID
Description:¶
查询中继任务的BasicID
Parameters¶
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
uid | path | uid | No | string |
Responses¶
Code | Description | Schema |
---|---|---|
200 | {"code": 200, "data": [...]} | response.Response & object |
Security¶
Security Schema | Scopes |
---|---|
Bearer |
dto.TaskDeleteReq¶
Name | Type | Description | Required |
---|---|---|---|
uids | [ string ] | No |
dto.TaskInsertReq¶
Name | Type | Description | Required |
---|---|---|---|
context | string | 由业务方根据自己需要传入的任务上下文参数,将放在任务透传参数中回传给业务方 | No |
description | string | 任务描述 | No |
displayName | string | 任务名称 | No |
extParam | [ integer ] | 回调内容 JSON Plain Object 格式 | No |
fileId | string | 关联视频id | No |
materialId | string | 关联素材id | No |
outputPath | string | 任务输出文件的路径前缀,UGPC需要指定输出文件前缀,例如:/internettv/c1/2023/08/18/ | No |
phase | string | 任务阶段 | No |
priority | integer | 优先级 | No |
progress | integer | 任务进度 | No |
sourceBasicId | string | 源物料 basic id | No |
sourceType | integer | SourceType 源类型 1=media, 2=material | No |
type | integer | 任务类型 | No |
workCluster | string | 多云子集群 | No |
workflowId | string | 关联工作流id | No |
dto.TaskResubmitRequest¶
Name | Type | Description | Required |
---|---|---|---|
uid | string | No |
dto.TaskResumeRequest¶
Name | Type | Description | Required |
---|---|---|---|
uid | string | No |
dto.TaskStopRequest¶
Name | Type | Description | Required |
---|---|---|---|
uid | string | No |
dto.TaskSuspendRequest¶
Name | Type | Description | Required |
---|---|---|---|
uid | string | No |
dto.TaskTerminateRequest¶
Name | Type | Description | Required |
---|---|---|---|
uid | string | No |
dto.TaskUpdateReq¶
Name | Type | Description | Required |
---|---|---|---|
argonJobId | string | Argon Job UID | No |
cloudProviderType | integer | Cloud Provider Type | No |
createdAt | models.LocalTime | No | |
description | string | 任务描述 | No |
displayName | string | 任务名称 | No |
finishedAt | models.LocalTime | No | |
phase | string | 任务阶段 | No |
priority | integer | 优先级 | No |
progress | integer | 任务阶段 | No |
startedAt | models.LocalTime | No | |
type | integer | 任务类型 | No |
uid | string | No | |
updatedAt | models.LocalTime | No |
models.TaskRecord¶
Name | Type | Description | Required |
---|---|---|---|
FileId | string | 关联media_file表中的uid | No |
argonJobId | string | Backend Argon Job UID | No |
cloudProviderType | integer | Cloud Provider Type | No |
createdAt | models.LocalTime | No | |
description | string | 任务描述 | No |
displayName | string | 任务名称 | No |
extParam | [ integer ] | 回调内容 JSON Plain Object 格式 | No |
finishedAt | models.LocalTime | ArgonJob Finish time | No |
materialId | string | 关联素材id | No |
outputPath | string | No | |
phase | string | Phase of task. 任务阶段 Pending | Running |
priority | integer | Priority of task , 0-100 | No |
progress | integer | Progress of task execution percentage, 0-100 | No |
sourceBasicId | string | SourceBasicId 源素材id或者视频媒资 basic id | No |
sourceType | integer | SourceType 源类型 1=media, 2=material | No |
startedAt | models.LocalTime | ArgonJob Started time | No |
targetBasicId | string | TargetBasicId 生成的目标视频媒资 basic id | No |
targetType | integer | TargetType 目标类型 1=media, 2=material | No |
type | integer | Type of task. 任务类型 | No |
uid | string | 唯一uuid | No |
updatedAt | models.LocalTime | No | |
workCluster | string | No | |
workflowId | string | Workflow ID 关联工作流id | No |
dto.SubTaskInsertReq¶
Name | Type | Description | Required |
---|---|---|---|
displayName | string | 任务名称 | No |
finishedAt | string | 子任务结束时间 | No |
message | string | 任务出错原因 | No |
phase | string | 任务阶段 | No |
progress | integer | 任务进度 | No |
startedAt | string | 子任务开始时间 | No |
taskId | string | 父任务id | No |
templateId | string | 模板id | No |
dto.SubTaskUpdateReq¶
Name | Type | Description | Required |
---|---|---|---|
displayName | string | 任务名称 | No |
finishedAt | string | 子任务结束时间 | No |
message | string | No | |
phase | string | 任务阶段 | No |
progress | integer | 任务进度 | No |
startedAt | string | 子任务开始时间 | No |
taskId | string | 父任务id | No |
templateId | string | 子任务模板id | No |
models.SubTaskRecord¶
Name | Type | Description | Required |
---|---|---|---|
createdAt | models.LocalTime | No | |
displayName | string | 子任务类型 | No |
finishedAt | string | No | |
message | string | 子任务原因 | No |
phase | string | Phase of task. 任务阶段 Pending | Running |
progress | integer | Progress of task execution percentage, 0-100 | No |
runtimeFinishedAt | string | No | |
runtimeStartedAt | string | No | |
startedAt | string | No | |
taskId | string | 任务id | No |
templateId | string | 模板id | No |
uid | string | 唯一uuid | No |
updatedAt | models.LocalTime | No |
dto.RelayTaskDeleteReq¶
Name | Type | Description | Required |
---|---|---|---|
uids | [ string ] | No |
dto.RelayTaskInsertReq¶
Name | Type | Description | Required |
---|---|---|---|
description | string | 任务描述 | No |
displayName | string | 任务名称 | No |
phase | string | 任务阶段 | No |
priority | integer | 优先级 | No |
progress | integer | 任务进度 | No |
projectId | string | 云剪工程id | No |
taskParam | [ integer ] | 回调内容 JSON Plain Object 格式 | No |
type | integer | 任务类型 | No |
workflow | [ integer ] | 回调内容 JSON Plain Object 格式 | No |
models.RelayTaskRecord¶
Name | Type | Description | Required |
---|---|---|---|
argonJobId | string | ArgonJobUID | No |
createdAt | models.LocalTime | No | |
description | string | 任务描述 | No |
displayName | string | 任务名称 | No |
finishedAt | models.LocalTime | ArgonJob Finish time | No |
message | string | No | |
phase | string | 任务阶段 | No |
priority | integer | 优先级 | No |
progress | integer | 任务进度 | No |
projectId | string | 云剪工程id | No |
startedAt | models.LocalTime | ArgonJob Started time | No |
taskParam | [ integer ] | 回调内容 JSON Plain Object 格式 | No |
type | integer | 任务类型 | No |
uid | string | 唯一uuid | No |
updatedAt | models.LocalTime | No | |
workflow | [ integer ] | 回调内容 JSON Plain Object 格式 | No |