Skip to main content

List templates

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

ParameterRequiredTypeDescription
limitNointegerNumber of items per page. Default: 100. Maximum: 100.
cursorNostringPagination 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.
FieldTypeDescription
templateIDstringTemplate ID.
templateNamestringTemplate name.
cpuCountintegerNumber of vCPUs.
memoryMBintegerMemory size in MB.
publicbooleanWhether the template is public.
aliasesarray<string>Alias list.
namesarray<string>Template name list.
createdAtstringCreation time in date-time format.
updatedAtstringUpdate time in date-time format.
spawnCountintegerNumber of instances of the template.
buildCountintegerNumber of template versions.
envdVersionstringenvd version.
Managed Agent API
Flow Agent API
RAG API
Long-term Memory
ParseX API
Security API
Framework Integration