List templates
Updated at:
List the sandbox templates in the current workspace, with cursor-based pagination.
Prerequisites
Configure the endpoint and authentication first. See API overview and authentication.
Endpoint
GET /v2/templates
List the templates in the current workspace. The route GET /templates is also supported.
Query parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
limit | No | integer | Number of items per page. Default: 100. Maximum: 100. |
cursor | No | string | Pagination position marker. |
Request example
curl -X GET "$BASE_URL/v2/templates?limit=100" \
-H "Authorization: Bearer $BAILIAN_API_KEY"
BASE_URL is https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/agentstudio/sandbox, and BAILIAN_API_KEY is your Alibaba Cloud Model Studio API key.
Response example
The response body is an array of templates rather than a paginated object.
[
{
"templateID": "your-template-id",
"templateName": "my-template",
"cpuCount": 1,
"memoryMB": 2048,
"public": false,
"aliases": [],
"names": ["my-template"],
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"spawnCount": 2,
"buildCount": 1,
"envdVersion": "your-envd-version"
}
]
Response fields
Each array element contains the following fields.
| Field | Type | Description |
|---|---|---|
templateID | string | Template ID. |
templateName | string | Template name. |
cpuCount | integer | Number of vCPUs. |
memoryMB | integer | Memory size in MB. |
public | boolean | Whether the template is public. |
aliases | array<string> | Alias list. |
names | array<string> | Template name list. |
createdAt | string | Creation time in date-time format. |
updatedAt | string | Update time in date-time format. |
spawnCount | integer | Number of instances of the template. |
buildCount | integer | Number of template versions. |
envdVersion | string | envd version. |
Is this page helpful?