列出当前账号下所有 Deployment,支持游标分页。
请求头
|
头部 |
必选 |
说明 |
|
|
是 |
|
查询参数
|
参数 |
类型 |
必选 |
说明 |
|
|
integer |
否 |
每页最大记录数,默认 20,最大 1000 |
|
|
string |
否 |
游标分页:返回此 ID 之后的记录 |
|
|
string |
否 |
游标分页:返回此 ID 之前的记录 |
|
|
string |
否 |
按状态筛选: |
|
|
boolean |
否 |
是否包含已归档 Deployment,默认 |
|
|
string |
否 |
按 Agent ID 筛选 |
示例请求
curl -X GET "https://api.qoder.com.cn/api/v1/cloud/deployments?limit=2" \
-H "Authorization: Bearer $QODER_PAT"
示例响应
HTTP 200 OK
{
"data": [
{
"agent": {
"id": "agent_019ebb21ef8e7df6a559052c94875160",
"type": "agent",
"version": 1
},
"archived_at": null,
"created_at": "2026-06-14T08:58:01Z",
"description": "Deployment created for API documentation verification",
"environment_id": "env_019e49a1780171daac1e6b01f290ac2b",
"id": "dep_019ec55a2b687b3f94eee77dd77e4b2a",
"initial_events": [
{
"content": "Generate today's status report",
"type": "user.message"
}
],
"metadata": {
"cas_config": {
"config": {
"max_concurrent": 1,
"max_retries": 0,
"timeout_ms": 300000
},
"session_strategy": "new_session",
"stats": {
"consecutive_failures": 0,
"next_trigger_at": "2026-06-15T01:00:00Z",
"total_failures": 0,
"total_runs": 0
}
}
},
"name": "api-doc-verification-deployment",
"paused_reason": null,
"resources": [],
"schedule": {
"expression": "0 9 * * *",
"timezone": "Asia/Shanghai",
"type": "cron",
"upcoming_runs_at": [
"2026-06-15T01:00:00Z",
"2026-06-16T01:00:00Z",
"2026-06-17T01:00:00Z",
"2026-06-18T01:00:00Z",
"2026-06-19T01:00:00Z"
]
},
"status": "active",
"type": "deployment",
"updated_at": "2026-06-14T08:58:01Z",
"vault_ids": []
}
],
"first_id": "dep_019ec55a2b687b3f94eee77dd77e4b2a",
"has_more": true,
"last_id": "dep_019ec53748f7784bac33f208c0f66982",
"next_page": "dep_019ec53748f7784bac33f208c0f66982"
}
响应字段
|
字段 |
类型 |
说明 |
|
|
array |
Deployment 对象列表 |
|
|
string |
当前页第一条记录的 ID |
|
|
string |
当前页最后一条记录的 ID |
|
|
boolean |
是否还有更多记录 |
|
|
string 或 null |
下一页游标值( |
使用 last_id 作为下次请求的 after_id 参数向前翻页。
错误码
|
HTTP |
type |
触发条件 |
|
401 |
|
PAT 无效或过期 |
完整错误信封说明详见错误参考。
该文章对您有帮助吗?