列出批量任务 (V2)
本接口用于列出与 Zilliz Cloud 集群关联的批量任务。
GET/v2/jobs
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com.cn
📘说明
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
shell
export BASE_URL="https://api.cloud.zilliz.com.cn"
参数
Authorizationstringheader必填项
认证令牌,应为具备适当权限的 API 密钥。
示例值:Bearer {{TOKEN}}
Acceptstringheader
使用 application/json。
示例值:application/json
typestringquery
要列出的任务类型。请将该参数设置为 SPARK。
示例值:SPARK
clusterIdstringquery必填项
要列出批量任务的 Zilliz Cloud 集群。
示例值:in01-xxxxxxxxxxxxxxx
regionIdstringquery必填项
Zilliz Cloud 集群所在云地域。如指定,必须与 clusterId 的地域一致。
示例值:aws-us-west-2
currentPageintegerquery
页码。默认值为 1。
示例值:1
pageSizeintegerquery
每页返回的批量任务数量。默认值为 20,最大值为 100。
示例值:20
bash
export TOKEN="YOUR_API_KEY"
curl --request GET \
--url "${BASE_URL}/v2/jobs?clusterId=in01-xxxxxxxxxxxxxxx®ionId=aws-us-west-2" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Accept: application/json" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json"
响应200 OK - application/json
返回批量任务列表。
响应体可能采用的备选对象结构之一;每次响应仅适用一种结构。
codeinteger<int32>
响应码。
dataobject
分页列出 Spark 任务的响应。
totalinteger<int64>
Spark 任务的总数量。
itemsarray
当前页的 Spark 任务列表。
[]itemsobject
Spark 批处理任务的摘要信息。
jobIdstring
任务 ID。
projectIdstring
任务所属的项目 ID。
typestring
任务类型。
descriptionstring
任务描述。
statusstring
任务状态。
regionIdstring
云地域 ID。
clusterIdstring
集群 ID。
createdAtstring
创建时间(ISO 8601)。
startedAtstring
开始时间(ISO 8601)。
finishedAtstring
结束时间(ISO 8601)。
durationSecondsinteger<int64>
持续时间(秒)。
nextPageTokenstring
用于获取下一页结果的令牌。
返回错误消息。
codeinteger
响应码。
messagestring
错误描述。
Successjson
{
"code": 0,
"data": {
"total": 1,
"items": [
{
"jobId": "job-xxxxxxxxxxxxxxxxxx",
"type": "SPARK",
"description": "daily-vector-etl",
"status": "RUNNING",
"regionId": "ali-cn-hangzhou",
"clusterId": "in01-xxxxxxxxxxxxxxx",
"createdAt": "2026-05-20T10:00:00Z",
"startedAt": "2026-05-20T10:01:00Z",
"finishedAt": null,
"durationSeconds": 300,
"projectId": "proj-xxxxxxxxxxxxxxxxxxxx"
}
]
}
}