Publish the beta draft as a new version, with the version number auto-incremented.
Prerequisites
Obtain an Alibaba Cloud Model Studio API Key and workspace ID first. For authentication, see API Authentication. Deploying an Agent requires the Knowledge Base - Modify permission, which is determined by the user's role in Workspace Member Management. See Permissions.
Endpoint
POST /api/v1/indices/rag/app/deploy
Publish the beta version of the specified Agent as a formal version. After publishing, the Agent status becomes deployed and the version number is incremented to a number (e.g. 1, 2, etc.).
Concurrent publishing is safe (backed by a DB unique index plus conflict retry as a fault-tolerance mechanism).
Request body
| Field | Required | Type | Description |
|---|---|---|---|
agent_id | Yes | string | Agent ID. |
agent_version_desc | No | string | Version description for this deployment. |
Request example
BASE_URL is https://{workspace_id}.cn-beijing.maas.aliyuncs.com ({workspace_id} is the workspace ID), and BAILIAN_API_KEY is your Alibaba Cloud Model Studio API Key.
Response example
Returns 200 on success.
Response fields
| Field | Type | Description |
|---|---|---|
request_id | string | Unique request identifier. Provide this ID when troubleshooting issues. |
status_code | integer | HTTP status code. |
code | string | Response code. Success on success. |
message | string | Informational message. |
status | string | Request status: SUCCESS or FAILED. |
success | boolean | Whether the request succeeded. |
data.agent_id | string | Agent ID. |
data.agent_version | string | Version number after deployment, e.g. 1, 2. |
data.agent_status | string | Agent status. deployed after deployment. |
Error codes
| HTTP status code | Error code | Description |
|---|---|---|
| 400 | Index.InvalidParameter | Invalid request parameters. Please check that all parameters are complete and correctly typed. |