部署运行
列出部署运行
通过 OMA API 列出部署运行。
GET
/
v1
/
deployment_runs
列出部署运行
curl --request GET \
--url http://localhost:38080/v1/deployment_runs \
--header 'X-Api-Key: <api-key>' \
--header 'anthropic-beta: <anthropic-beta>' \
--header 'anthropic-version: <anthropic-version>'import requests
url = "http://localhost:38080/v1/deployment_runs"
headers = {
"anthropic-version": "<anthropic-version>",
"anthropic-beta": "<anthropic-beta>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'anthropic-version': '<anthropic-version>',
'anthropic-beta': '<anthropic-beta>',
'X-Api-Key': '<api-key>'
}
};
fetch('http://localhost:38080/v1/deployment_runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:38080/v1/deployment_runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("anthropic-version", "<anthropic-version>")
req.Header.Add("anthropic-beta", "<anthropic-beta>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"type": "deployment_run",
"id": "<string>",
"deployment_id": "<string>",
"trigger_context": {
"type": "schedule",
"scheduled_at": "2023-11-07T05:31:56Z"
},
"session_id": "<string>",
"error": {
"type": "environment_archived_error",
"message": "<string>"
},
"agent": {
"type": "agent",
"id": "agent_011CZkYqphY8vELVzwCUpqiQ",
"version": 1
},
"created_at": "2023-11-07T05:31:56Z"
}
],
"next_page": "<string>"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}每个请求都必须发送
?beta=true、anthropic-version: 2023-06-01 与 anthropic-beta: managed-agents-2026-04-01。授权
omaApiKeyomaBearer
OMA 工作区 API 密钥。
查询参数
为此接口启用 Beta API 合同,必须为 true。
可用选项:
true 每页最大结果数。默认 20,上限 1000。
不透明的分页游标。传入上一个响应中的 next_page。无效或过期的游标返回 400。
过滤到特定部署。省略时列出工作区中的所有部署。按不存在的 deployment_id 过滤会返回 200 和空数据。
按触发方式过滤运行。省略则返回所有运行。 触发部署运行的因素。
可用选项:
schedule, manual 过滤条件:true 表示 error 非 null 的 run,false 表示 session_id 非 null 的 run。省略则返回全部。
返回在此时间或之后创建的运行(含该时间)。 RFC 3339 格式的时间戳
返回在此时间或之前创建的运行(含该时间)。 RFC 3339 格式的时间戳
返回严格在此时间之后创建的运行(不含该时间)。 RFC 3339 格式的时间戳
返回严格在此时间之前创建的运行(不含该时间)。 RFC 3339 格式的时间戳
此页面对您有帮助吗?
⌘I
列出部署运行
curl --request GET \
--url http://localhost:38080/v1/deployment_runs \
--header 'X-Api-Key: <api-key>' \
--header 'anthropic-beta: <anthropic-beta>' \
--header 'anthropic-version: <anthropic-version>'import requests
url = "http://localhost:38080/v1/deployment_runs"
headers = {
"anthropic-version": "<anthropic-version>",
"anthropic-beta": "<anthropic-beta>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'anthropic-version': '<anthropic-version>',
'anthropic-beta': '<anthropic-beta>',
'X-Api-Key': '<api-key>'
}
};
fetch('http://localhost:38080/v1/deployment_runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:38080/v1/deployment_runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("anthropic-version", "<anthropic-version>")
req.Header.Add("anthropic-beta", "<anthropic-beta>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"type": "deployment_run",
"id": "<string>",
"deployment_id": "<string>",
"trigger_context": {
"type": "schedule",
"scheduled_at": "2023-11-07T05:31:56Z"
},
"session_id": "<string>",
"error": {
"type": "environment_archived_error",
"message": "<string>"
},
"agent": {
"type": "agent",
"id": "agent_011CZkYqphY8vELVzwCUpqiQ",
"version": 1
},
"created_at": "2023-11-07T05:31:56Z"
}
],
"next_page": "<string>"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}