读取方法
GET
/meta/v1/methods/{name}● 支持请求参数
namestring必填path: Exact method name from the search results, for example
praxis.database.databases.tables.create.
返回
200
name 取自搜索结果,必须与方法名完全一致。声明不会被截断,字段名和枚举值请直接从中复制。未知名称返回 404 METHOD_NOT_FOUND,hint 列出最多三个相近的名称。
错误按 problem+json 格式返回,参见 错误码
请求示例
curl
curl https://api.deepraxis.com/meta/v1/methods/praxis.agent.agents.listPython
import requests
opts = dict(
base_url="https://api.deepraxis.com/meta",
)
resp = requests.get(f"{opts['base_url']}/v1/methods/praxis.agent.agents.list")
print(resp.json())TypeScript
const opts = {
baseURL: "https://api.deepraxis.com/meta",
};
const resp = await fetch(`${opts.baseURL}/v1/methods/praxis.agent.agents.list`);
console.log(await resp.json());响应示例 200
{
"name": "praxis.agent.agents.list",
"summary": "List agents",
"description": "List the agents of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Use it to find an agent id before creating a session; to read one agent use agents.retrieve, to see its history use agents.versions.list. Archived agents are hidden unless include_archived is true. Filter kind=personal for durable-computer agents or kind=service for per-session environments. Pass next_page from the response as page to read the next page; a null next_page means the end.",
"http": "GET",
"path": "/agent/v1/agents",
"declaration": "praxis.agent.agents.list(args?:{query?:{/** Return agents created at or after this time (inclusive). */ \"created_at[gte]\"?:string;/** Return agents created at or before this time (inclusive). */ \"created_at[lte]\"?:string;/** Include archived agents in results. */ include_archived?:false|true;/** Number of items per page. */ limit?:number;page?:null|string;/** Personal agents use a durable computer; service agents use a clean environment per session. e.g. \"service\" */ kind?:\"personal\"|\"service\"}}):Promise<{/** Items of this page, in the order requested by the call. */ data:Array<{/** Agent id (…(采样时截断:原文共 31139 字符,此处保留前 600)",
"parameters": [
{
"name": "created_at[gte]",
"in": "query",
"required": false,
"description": "Return agents created at or after this time (inclusive).",
"type": "string"
},
{
"name": "created_at[lte]",
"in": "query",
"required": false,
"description": "Return agents created at or before this time (inclusive).",
"type": "string"
},
{
"name": "include_archived",
"in": "query",
"required": false,
"description": "Include archived agents in results. Defaults to false.",
"type": "false | true"
},
{
"name": "limit",
"in": "query",
"required": false,
"description": "Number of items per page.",
"type": "number"
},
{
"name": "page",
"in": "query",
"required": false,
"description": "Opaque pagination cursor: pass the next_page value of the previous response unchanged. Omit it for the first page. A cursor from a different query or a malformed one returns 400.",
"type": "null | string"
},
{
"name": "kind",
"in": "query",
"required": false,
"description": "Filter agents by their immutable kind, including agents created before kind was recorded.",
"type": "\"personal\" | \"service\""
}
],
"request_body": null,
"responses": [
{
"status": "200",
"description": "Successful response",
"content_types": [
"application/json"
]
},
{
"status": "400",
"description": "include_archived is not true or false, kind is not personal or service, a created_at bound is not an RFC 3339 timestamp, or INVALID_PARAMS when limit is not an integer from 1 to 100 (limit must be an integer between 1 and 100), or INVALID_PAGE_TOKEN when page is not a cursor from this same query (restart from the first page). Pass next_page unchanged, with the same filters, to continue.",
"content_types": [
"application/json"
]
},
{
"status": "401",
"description": "UNAUTHENTICATED (or INVALID_API_KEY, API_KEY_DISABLED, API_KEY_EXPIRED, INVALID_API_TOKEN, API_TOKEN_EXPIRED, API_TOKEN_REVOKED): the API key is missing, invalid or revoked. Send a valid key as X-API-Key or as a Bearer token.",
"content_types": [
"application/json"
]
},
{
"status": "403",
"description": "permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.",
"content_types": [
"application/json"
]
}
]
}响应
HTTP 200
The method with its complete declaration.
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| name | string | Method name, for example praxis.agent.agents.list. |
| summary | string | One-line statement of what the method does. |
| description | string | Full guidance for the method from the API reference, including when to use it, limits and error behaviour. May be empty for methods documented only by summary. |
| http | string | HTTP verb the method sends. |
| path | string | Public API path template with {param} placeholders. |
| declaration | string | Complete TypeScript signature, name(args): Promise<Result>. args carries path, query, headers and body members exactly as declared. Never truncated. |
| parameters | array<object> | Path, query and header parameters of the operation. |
| parameters[].name | string | Parameter name as sent on the wire. |
| parameters[].in | string | Where the parameter goes, one of path, query or header; maps to the matching member of args. |
| parameters[].required | boolean | Whether the call is rejected when the parameter is missing. |
| parameters[].description | string | Meaning, format and allowed values of the parameter. |
| parameters[].type | string | TypeScript type of the parameter value. |
| request_body | object | Request body expectations; null when the method takes no body. |
| request_body.required | boolean | Whether args.body must be supplied. |
| request_body.description | string | What the body carries. |
| request_body.content_types | array<string> | Media types the body may use; the first is the default. |
| responses | array<object> | Documented responses, successful and failed. |
| responses[].status | string | HTTP status code or default. |
| responses[].description | string | What the response means and what to do next. |
| responses[].content_types | array<string> | Media types the response may use. |