获取 Deployment
curl --request GET \
--url https://agent-api.bigmodel.cn/api/agent/managed/v1/deployments/{deploymentId} \
--header 'Authorization: Bearer <token>' \
--header 'zai-beta: <zai-beta>' \
--header 'zai-version: <zai-version>'import requests
url = "https://agent-api.bigmodel.cn/api/agent/managed/v1/deployments/{deploymentId}"
headers = {
"zai-version": "<zai-version>",
"zai-beta": "<zai-beta>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'zai-version': '<zai-version>',
'zai-beta': '<zai-beta>',
Authorization: 'Bearer <token>'
}
};
fetch('https://agent-api.bigmodel.cn/api/agent/managed/v1/deployments/{deploymentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://agent-api.bigmodel.cn/api/agent/managed/v1/deployments/{deploymentId}")
.header("zai-version", "<zai-version>")
.header("zai-beta", "<zai-beta>")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://agent-api.bigmodel.cn/api/agent/managed/v1/deployments/{deploymentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("zai-version", "<zai-version>")
req.Header.Add("zai-beta", "<zai-beta>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agent-api.bigmodel.cn/api/agent/managed/v1/deployments/{deploymentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"zai-beta: <zai-beta>",
"zai-version: <zai-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"type": "deployment",
"name": "<string>",
"agent": {
"type": "agent",
"id": "<string>",
"version": 1
},
"environment_id": "<string>",
"description": "<string>",
"metadata": {},
"resources": [
{
"type": "memory_store",
"memory_store_id": "<string>",
"access": "read_write",
"instructions": "<string>"
}
],
"schedule": {
"type": "cron",
"expression": "<string>",
"timezone": "Asia/Shanghai",
"last_run_at": "<string>",
"upcoming_runs_at": [
"2023-11-07T05:31:56Z"
]
},
"initial_events": [
{
"type": "user.message",
"content": [
{
"type": "text",
"text": "<string>"
}
]
}
],
"status": "active",
"paused_reason": {
"type": "manual"
},
"vault_ids": [
"<string>"
],
"archived_at": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"details": {}
},
"request_id": "req_01J..."
}Deployment
获取 Deployment
获取指定 Deployment 的当前配置和运行状态,包括固定的 Agent 版本、Environment、资源、Vault、调度计划及初始事件。已归档状态通过 archived_at 返回。点击 Try it 按钮可快速试用。
GET
/
agent
/
managed
/
v1
/
deployments
/
{deploymentId}
获取 Deployment
curl --request GET \
--url https://agent-api.bigmodel.cn/api/agent/managed/v1/deployments/{deploymentId} \
--header 'Authorization: Bearer <token>' \
--header 'zai-beta: <zai-beta>' \
--header 'zai-version: <zai-version>'import requests
url = "https://agent-api.bigmodel.cn/api/agent/managed/v1/deployments/{deploymentId}"
headers = {
"zai-version": "<zai-version>",
"zai-beta": "<zai-beta>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'zai-version': '<zai-version>',
'zai-beta': '<zai-beta>',
Authorization: 'Bearer <token>'
}
};
fetch('https://agent-api.bigmodel.cn/api/agent/managed/v1/deployments/{deploymentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://agent-api.bigmodel.cn/api/agent/managed/v1/deployments/{deploymentId}")
.header("zai-version", "<zai-version>")
.header("zai-beta", "<zai-beta>")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://agent-api.bigmodel.cn/api/agent/managed/v1/deployments/{deploymentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("zai-version", "<zai-version>")
req.Header.Add("zai-beta", "<zai-beta>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agent-api.bigmodel.cn/api/agent/managed/v1/deployments/{deploymentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"zai-beta: <zai-beta>",
"zai-version: <zai-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"type": "deployment",
"name": "<string>",
"agent": {
"type": "agent",
"id": "<string>",
"version": 1
},
"environment_id": "<string>",
"description": "<string>",
"metadata": {},
"resources": [
{
"type": "memory_store",
"memory_store_id": "<string>",
"access": "read_write",
"instructions": "<string>"
}
],
"schedule": {
"type": "cron",
"expression": "<string>",
"timezone": "Asia/Shanghai",
"last_run_at": "<string>",
"upcoming_runs_at": [
"2023-11-07T05:31:56Z"
]
},
"initial_events": [
{
"type": "user.message",
"content": [
{
"type": "text",
"text": "<string>"
}
]
}
],
"status": "active",
"paused_reason": {
"type": "manual"
},
"vault_ids": [
"<string>"
],
"archived_at": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"details": {}
},
"request_id": "req_01J..."
}Headers
Managed Agents API 协议版本,固定为 2026-05-26。
Available options:
2026-05-26 Example:
"2026-05-26"
必须包含 managed-agents-2026-05-26;可与其他 beta 标识用逗号分隔。
Example:
"managed-agents-2026-05-26"
Path Parameters
deploymentId 资源标识。
Response
请求成功。
Available options:
deployment Show child attributes
Show child attributes
Deployment 绑定的 Environment ID。旧数据缺失该字段时可能返回内部兼容值 env_default。
用途说明。
客户端自定义元数据;省略时默认为空对象。最多 16 个键,键名长度不超过 64 字符,值必须是长度不超过 512 字符的字符串。
Show child attributes
Show child attributes
- memory_store
- file
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
active, paused 暂停原因。手动暂停返回 manual;因资源失效自动暂停时返回对应错误类型。
- manual
- error
Show child attributes
Show child attributes
归档时间。
创建时间。
更新时间。
Was this page helpful?