跳到主要内容

列出批量任务 (V2)

本接口用于列出与 Zilliz Cloud 集群关联的批量任务。

GET/v2/jobs
连接端点

该 API 的 Base URL 格式如下:

https://api.cloud.zilliz.com

📘说明

控制面接口速率限制为单用户单接口每秒最多 20 个请求。

shell
export BASE_URL="https://api.cloud.zilliz.com"
参数
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?type=SPARK&clusterId=in01-xxxxxxxxxxxxxxx" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Accept: application/json" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json"
响应

返回批量任务列表。

响应体可能采用的备选对象结构之一;每次响应仅适用一种结构。

codeinteger

响应码。

dataobject

响应载荷,包含批量任务和总数。

totalinteger

批量任务总数。

示例值:1
itemsarray

批量任务摘要。

[]itemsobject

批量任务的摘要信息。

jobIdstring必填项

任务 ID。

projectIdstring必填项

任务所属的项目 ID。

typestring必填项

任务类型。

descriptionstring

任务描述。

statusstring必填项

任务状态。

regionIdstring必填项

云地域 ID。

clusterIdstring

集群 ID。

createdAtstring

创建时间(ISO 8601)。

startedAtstring

开始时间(ISO 8601)。

finishedAtstring

结束时间(ISO 8601)。

durationSecondsinteger<int64>

持续时间(秒)。

返回错误消息。

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"
}
]
}
}