Obtaining the Deployment Versions of a Real-Time Service
Function
This API is used to obtain the version list of a specified service deployed. It is applicable to scenarios where you need to know the available versions of the current service deployment, for example, selecting a version or confirming the current version information. If the request contains a valid service ID and deployment ID, you can use the sorting parameter to sort the list. You must have the permission to view the target service deployment. After the request is successful, all real-time version information about the service deployment is returned, including the version number, release time, and status. If the service ID or deployment ID is invalid or the user does not have the permission, "400 Bad Request" or "403 Forbidden" is returned. If the service deployment does not have a real-time version, an empty list is returned.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
modelarts:service:listDeploymentVersions
Read
service *
-
-
-
URI
GET /v2/{project_id}/services/{service_id}/deployments/{deployment_id}/versions
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
| service_id | Yes | String | Definition Service ID, which can be obtained from the response body during service creation or by querying the services owned by the current user. The service_id field is the service ID. Constraints N/A Range N/A Default Value N/A |
| deployment_id | Yes | String | Definition Deployment ID, which you can obtain from the response body when adding the deployment or by obtaining service deployments. The deployment_id field indicates the deployment ID. Constraints N/A Range Deployment ID. Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. For details about how to obtain the token, see Obtaining a User Token Through Password Authentication. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| data | Array of InferDeploymentVersionItemResp objects | Definition: Real-time service deployment data. |
| current | Integer | Definition Current page number, starting from 0. Range N/A |
| size | Integer | Definition Number of records on the current page. Range N/A |
| pages | Integer | Definition Number of records on the current page. Range N/A |
| total | Integer | Definition Total number of records. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| infer_name | String | Definition Deployment ID. Range N/A |
| version | String | Definition Deployment version. Range N/A |
| version_status | String | Definition Version status Range N/A |
| description | String | Definition Version description Range N/A |
| create_at | String | Definition Creation Time Range N/A |
| update_at | String | Definition Update time Range N/A |
| deploy_type | String | Definition Deployment type. Range |
Example Requests
Obtain the version information list of deployment_id and sort the information in descending order of creation time.
GET https://{end_point}/v2/{project_id}/services/{service_id}/deployments/{deployment_id}/versions Example Responses
Status code: 200
All historical versions of the deployment are returned.
{
"current" : 0,
"data" : [ {
"create_at" : "2025-12-01 16:37:24",
"description" : "",
"infer_name" : "a07f5c03-547c-40cc-814b-312284779ebf",
"update_at" : "2025-12-01 16:37:24",
"version" : "1.0.0",
"version_status" : "ACTIVE"
}, {
"create_at" : "2025-12-01 16:37:24",
"description" : "",
"infer_name" : "a07f5c03-547c-40cc-814b-312284779ebf",
"update_at" : "2025-12-01 16:37:24",
"version" : "1.0.1",
"version_status" : "INACTIVE"
} ],
"pages" : 1,
"size" : 10,
"total" : 2
} Status Codes
| Status Code | Description |
|---|---|
| 200 | All historical versions of the deployment are returned. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot