Listing Compute Resource Operation Records
Function
This API is used to list compute resource operation records. This API is synchronous.
Calling Method
For details, see Calling APIs.
URI
GET /v2/workspaces/{workspace_id}/computes/versions
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| workspace_id | Yes | String | Definition: Workspace ID, which can be obtained by calling the Obtaining a Workspace ID API. Constraints: N/A Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| compute_id | No | String | Definition: Compute resource ID. You can obtain the compute resource ID by calling the Listing Compute Resources API. Constraints: N/A Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A |
| operation_result | No | String | Definition: Operation result. If not specified, operation records of all statuses are queried. Constraints: N/A Range Default Value: N/A |
| offset | No | Integer | Definition: Page offset. Constraints: N/A Range: 0 to 10000. Default Value: 0. |
| limit | No | Integer | Definition: Page size. Constraints: N/A Range: 1 to 1000. Default Value: 100. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition: User token. It is obtained by calling the Obtaining an IAM User Token API. Constraints: N/A Range: Up to 65,534 characters. Only letters, digits, and special characters are allowed. The token format is defined by IAM. For details about the character set, see the IAM documentation. Default Value: N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total | Integer | Definition: Total number of records. Range: 0 to 10000. |
| compute_versions | Array of ShowV2ComputeVersionResponseBody objects | Definition: Compute resource operation history list, where each element is a compute resource operation history details object. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition: ID of a compute resource record. Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. |
| compute_id | String | Definition: Compute resource ID. Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. |
| name | String | Definition: Compute resource name. Range: 1 to 63 characters. Only lowercase letters, digits, and hyphens (-) are allowed. It must start with a letter and end with a letter or digit. |
| capacity | CapacityVersion object | Definition: Compute resource capacity configuration. |
| create_time | String | Definition: Resource creation time, in UTC format, ISO 8601: yyyy-MM-dd'T'HH:mm:ss.SSSXXX. Example: 2025-01-10T03:37:12.000+00:00. Range: N/A |
| update_time | String | Definition: Resource update time, in UTC, in ISO 8601 format, for example, 2025-01-10T03:37:12.000+00:00. Range: N/A |
| creator | Creator object | Definition: Resource owner information. |
| error | Error object | Definition: Text message content returned on failure, including the error code and error description. |
| operation | Operation object | Definition: Compute resource operation records, including the operation type and operation result. |
| Parameter | Type | Description |
|---|---|---|
| type | String | Definition: Resource type. Range |
| capacity | Integer | Definition: Number of resources. The unit for CPU resources is cores, and the unit for GPU/NPU resources is instances. Range: 0 to 48,000 |
| target_capacity | Integer | Definition: Number of target resources. The unit for CPU resources is cores, and the unit for GPU/NPU resources is instances. Range: 0 to 48,000 |
| spec_code | String | Definition: Resource specification. Range: 1 to 64 characters. Only letters, digits, periods (.), and hyphens (-) are allowed. |
| Parameter | Type | Description |
|---|---|---|
| domain_name | String | Definition: Tenant name. Range: 1 to 64 characters. Only letters, digits, and special characters are allowed. |
| domain_id | String | Definition: Tenant ID. Range: 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed. |
| user_name | String | Definition: Username. Range: 1 to 64 characters. Only letters, digits, and underscores (_) are allowed. |
| user_id | String | Definition: User ID. Range: 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code on failure. Range: 0 to 36 characters. Only letters, digits, periods (.), and underscores (_) are allowed. |
| error_msg | String | Definition: Error message on failure. Range: 0 to 1,024 characters. Only letters, digits, and special characters are allowed. |
| Parameter | Type | Description |
|---|---|---|
| operation_type | String | Definition: Operation type. Range |
| operation_result | String | Definition: Operation result. Range |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 512 characters. |
| solution_msg | String | Definition: Solution. Range: 0 to 4,096 characters. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 512 characters. |
| solution_msg | String | Definition: Solution. Range: 0 to 4,096 characters. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 512 characters. |
| solution_msg | String | Definition: Solution. Range: 0 to 4,096 characters. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 512 characters. |
| solution_msg | String | Definition: Solution. Range: 0 to 4,096 characters. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 512 characters. |
| solution_msg | String | Definition: Solution. Range: 0 to 4,096 characters. |
Example Requests
Query the compute resource operation records in a specified workspace. The workspace ID is 8b1bfea1-24ce-48b4-9083-2a41b2847157.
GET /v2/workspaces/{workspace_id}/computes/versions Example Responses
Status code: 200
{
"total" : 1,
"compute_versions" : [ {
"id" : "46d2d3aa-b28d-43da-b5b8-d7c1e9f46b9b",
"compute_id" : "61eb192a-74de-416b-88d0-66eab567fec7",
"name" : "compute-id-test",
"capacity" : {
"type" : "CPU",
"capacity" : 1000,
"target_capacity" : 500,
"spec_code" : "aidatalake.cpu.x86.general.1c4g"
},
"create_time" : "2025-01-10T03:37:12.000+00:00",
"update_time" : "2025-01-10T03:37:12.000+00:00",
"creator" : {
"domain_name" : "test_domain",
"domain_id" : "test610f3a0a4c2c80c50bea7ddf18c1",
"user_name" : "test39176",
"user_id" : "test523342614e3e984e8b854a401ac4"
},
"error" : {
"error_code" : "00011030",
"error_msg" : "task execute failed."
},
"operation" : {
"operation_type" : "SCALEIN",
"operation_result" : "FAILED"
}
} ]
} Status code: 400
{
"error_code" : "AIDataLake.00010151",
"error_msg" : "Parameter value is invalid.",
"solution_msg" : "Please input valid parameter value."
} Status code: 401
{
"error_code" : "APIGW.0301",
"error_msg" : "Incorrect IAM authentication information: decrypt token fail.",
"solution_msg" : "Check whether the IAM authentication information is correct."
} Status code: 403
{
"error_code" : "AIDataLake.00010150",
"error_msg" : "The operation is not allowed.",
"solution_msg" : "Check whether the operation is allowed in the current status."
} Status code: 404
{
"error_code" : "AIDataLake.00010009",
"error_msg" : "No resources found.",
"solution_msg" : "Ensure the requested resource exists and the parameters are correct."
} Status code: 500
{
"error_code" : "AIDataLake.00011001",
"error_msg" : "Internal error.",
"solution_msg" : "Contact technical support or try again later."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
| 400 | Invalid request parameters. |
| 401 | Unauthorized. |
| 403 | Access denied. |
| 404 | Resource not found. |
| 500 | Internal server error. |
What is your overall rating for this page?
Thank 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