Query the image build status of a template. You can create an instance from the template only after the build status becomes ready.
Prerequisites
Configure the endpoint and authentication first. See API overview and authentication.
Endpoint
GET /templates/{templateCode}/builds/{buildID}/status
Query the image build status of a template. The route GET /templates/{templateCode}/builds/{buildID} is also supported. buildID comes from the response of the create or update template operation. You can create an instance from the template only after the build status becomes ready.
Path parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
templateCode | Yes | string | Unique template code, that is, the templateID. |
buildID | Yes | string | Build ID, from the response of the create or update template operation. |
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
If the build fails, the response includes a reason object that explains the failure.
Response fields
| Field | Type | Description |
|---|---|---|
templateID | string | Template ID. |
buildID | string | Build ID. |
status | string | Build status. Valid values: building, ready, error. The final status is ready, or error on failure. |
logs | array<string> | Build logs. |
logEntries | array<object> | Structured build log entries. |
reason | object | Reason for the build failure; omitted on success. Sub-fields: code (string, failure reason code, for example InvalidArgument), message (string, failure description). |