列出模板。
接口说明
获取当前用户的所有模板列表,支持按模板类型过滤,支持分页查询。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
GET /2025-09-10/templates HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| templateType |
string |
否 |
模板类型 |
Browser |
| pageNumber |
integer |
否 |
页码 |
1 |
| pageSize |
integer |
否 |
页面大小 |
20 |
| status |
string |
否 |
状态 |
READY |
| templateName |
string |
否 |
模板名称 |
temp-abc |
| workspaceId |
string |
否 |
工作空间 Id |
aaa |
| workspaceIds |
string |
否 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
| ListTemplatesResult |
返回列表结构体的结果 |
示例
正常返回示例
JSON格式
{
"code": "SUCCESS",
"requestId": "C0595DB0-D1EE-55C3-8DDD-790872C7EC2F",
"data": {
"pageNumber": 1,
"pageSize": 10,
"total": 10,
"items": [
{
"templateId": "996ffd5e-003f-4700-9f24-9e2a1c19019b.schema",
"templateName": "browser-1767874121726",
"templateVersion": "预留",
"cpu": 4,
"memory": 4096,
"templateArn": "acs:agentrun:cn-hangzhou:12345678:templates/efb6de2f-1814-42a2-b7f3-474a0e0b3a48",
"createdAt": "2026-01-15T17:12:59.375168+08:00",
"lastUpdatedAt": "2026-01-15T17:12:59.375168+08:00",
"status": "READY",
"statusReason": "SDK Error",
"executionRoleArn": "acs:agentrun:cn-hangzhou:12345678:templates/efb6de2f-1814-42a2-b7f3-474a0e0b3a48",
"templateType": "Browser",
"containerConfiguration": {
"image": "registry.cn-hangzhou.aliyuncs.com/my-namespace/agent-runtime:latest",
"imageRegistryType": "ACR",
"acrInstanceId": "cri-xxxxx",
"command": [
"/usr/local/bin/entrypoint.sh"
],
"registryConfig": {
"authConfig": {
"userName": "admin",
"password": "abc***"
},
"certConfig": {
"insecure": false,
"rootCaCertBase64": "cm9vdF9jYV9jZXJ0X2Jhc2U2NA=="
},
"networkConfig": {
"vpcId": "vpc-xxxxxxxxxxxxx",
"vSwitchId": "vsw-xxxxxxxxxxxxx",
"securityGroupId": "sg-xxxxxxxxxxxxx"
}
},
"port": 5000
},
"networkConfiguration": {
"networkMode": "PRIVATE",
"vpcId": "vpc-1234567890abcdef0",
"securityGroupId": "sg-1234567890abcdef0",
"vswitchIds": [
"vsw-sg-1234567890abcdef0"
]
},
"credentialConfiguration": {
"credentialName": "deepagent-key"
},
"logConfiguration": {
"project": "agent-runtime-logs",
"logstore": "agent-runtime-logs"
},
"sandboxIdleTimeoutInSeconds": "1800",
"sandboxTTLInSeconds": "已弃用",
"resourceName": "agentrun-f2570dd4-c8a2-452c-8bd5-4ef74b0a69b5",
"mcpOptions": {
"transport": "streamable-http",
"enabledTools": [
"execute_code"
]
},
"mcpState": {
"status": "CREATING",
"statusReason": "SDK Error",
"accessEndpoint": "/mcp"
},
"diskSize": 10240,
"description": "template描述",
"allowAnonymousManage": true,
"nasConfig": {
"groupId": 100,
"mountPoints": [
{
"enableTLS": true,
"mountDir": "/home/test",
"serverAddr": "***-uni85.cn-hangzhou.nas.com:/"
}
],
"userId": 100
},
"enableAgent": true,
"workspaceId": "",
"scalingStatus": {
"minInstances": 1,
"targetInstances": 2,
"currentInstances": 2,
"scheduledPolicies": [
{
"name": "scale-up-morning",
"startTime": "2024-01-01T08:00:00",
"endTime": "2024-01-01T08:00:00",
"scheduleExpression": "cron(0 8 * * ? *)",
"timeZone": "Asia/Shanghai",
"target": 20
}
],
"currentError": "error"
},
"environmentVariables": {
"key": "{'FCTEST_IDE_ENV': 'IDE'}"
},
"templateConfiguration": {
"key": "{\"example\":\"test\"}"
},
"ossConfiguration": [
{
"bucketName": "a-test-oss",
"prefix": "/",
"mountPoint": "/mnt/oss1",
"permission": "READ_WRITE",
"region": "ch-hangzhou",
"endpoint": ""
}
],
"enablePreStop": true,
"preStopTimeoutInSeconds": 0
}
]
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。
该文章对您有帮助吗?