Querying the Lite Server Image List
Function
This API is used to obtain information about all available Lite Server images in the system. It is used when you need to know the available Lite Server images so that you can select a proper image when creating or adjusting a Lite Server instance. Before using this API, ensure that you have logged in to the system and have the permission to query images. After the query, the API returns information about all available Lite Server images, including the image ID, name, and architecture type. If you do not have the permission to perform the operation or no image is available in the system, the API returns an error message.
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, no identity policy-based permission required for calling this API.
URI
GET /v1/{project_id}/dev-servers/images
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
current |
Integer |
Definition: Current page number. Range: N/A |
|
data |
Array of ServerImageResponse objects |
Definition: Lite Server image list. |
|
pages |
Integer |
Definition: Total number of pages. Range: N/A |
|
size |
Integer |
Definition: Number of records on each page. Range: N/A |
|
total |
Long |
Definition: Total number of records. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
arch |
String |
Definition: Architecture type of a server image. Range: |
|
image_id |
String |
Definition: Server image ID. Range: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ |
|
name |
String |
Definition: Server image name. Constraints: N/A Range: 1 to 256 characters Default Value: N/A |
|
server_type |
String |
Definition: Server type. Range: |
|
status |
String |
Definition: Server image status. Range: |
Example Requests
GET http://{endpoint}/v1/{project_id}/dev-servers/images
Example Responses
Status code: 200
OK
{
"current" : 1,
"data" : [ {
"arch" : "ARM",
"image_id" : "d7811cdb-b0c6-44fe-9931-1f3b2b6ef477",
"name" : "ModelArts_Lite Server-Euler2.8_aarch64_CPU-20220913175531",
"server_type" : "ECS",
"status" : "ACTIVE"
}, {
"arch" : "X86",
"image_id" : "83f4aa72-53ec-4806-85b5-3f84082ba964",
"name" : "ModelArts_Lite Server-custom_x86_64_NPU-20230207093857",
"server_type" : "ECS",
"status" : "ACTIVE"
} ],
"pages" : 1,
"size" : 2,
"total" : 21
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
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