Retrieve the detailed configuration of a specific template, including resource specifications, instance count, version count, and current build information.
Prerequisites
Configure the endpoint and authentication first. See API overview and authentication.
Endpoint
GET /templates/{templateCode}
Retrieve the detailed configuration of a specific template. Returns 404 if the template does not exist, with the message 沙箱模版不存在 (the sandbox template does not exist).
Path parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
templateCode | Yes | string | Unique template code. |
Request example
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
Response 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. |
imageName | string | Image display name. |
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. |
builds | array<object> | Build information for the current version. Sub-fields: buildID (string, build ID), status (string, build status, for example building, ready, or error), createdAt (string, build creation time), updatedAt (string, build update time), finishedAt (string, build completion time; omitted when an accurate value is unavailable), cpuCount (integer, number of vCPUs), memoryMB (integer, memory size in MB), diskSizeMB (integer, disk size in MB), envdVersion (string, envd version). |