版本:202601
查询专辑异步任务
GET/openapi/2026-01/collections/async-task/:id
查询由 AsyncCreateCollection / AsyncUpdateSmartCollectionRule 发起的异步任务的状态与结果。
请求
Path参数
id string必填
由 AsyncCreateCollection / AsyncUpdateSmartCollectionRule 返回的异步任务 ID
Query参数
create_collection:异步创建智能专辑update_smart_collection_rule:异步更新智能专辑规则
source_id string
任务关联的资源 ID(如智能专辑 UUID)。在未知异步任务 ID 时,可与 task_type 联合作为备用查询条件
task_type string
任务类型。可选值:
响应
- 200
OK
- application/json
- 数据结构
- 示例
数据结构
codestring
错误码
messagestring
错误信息
data object
async_task object
异步任务详情
idstring
异步任务 ID
source_idstring
任务关联的资源 ID(如智能专辑的 UUID)
task_typestring
任务类型。可能取值:create_collection(异步创建专辑)、update_smart_collection_rule(异步更新智能专辑规则)
statestring
任务状态。可能取值:pending(排队中)、running(执行中)、succeeded(成功)、failed(失败)
messagestring
可读消息,state=failed 时通常为错误描述
created_atstring
任务创建时间,ISO 8601 格式(如 2026-01-15T10:30:00Z)
updated_atstring
任务最近更新时间,ISO 8601 格式
task_data object
任务负载,具体 schema 由 task_type 决定。包装消息内含 @type 字段供客户端按类型解码
@typestring
The type of the serialized message.
property name*any
任务负载,具体 schema 由 task_type 决定。包装消息内含 @type 字段供客户端按类型解码
{
"code": "string",
"message": "string",
"data": {
"async_task": {
"id": "string",
"source_id": "string",
"task_type": "string",
"state": "string",
"message": "string",
"created_at": "string",
"updated_at": "string",
"task_data": {
"@type": "string"
}
}
}
}