Querying the User Image List
Function
This API is used to obtain the overview of user image information. Image names are used for aggregation.
This API applies to the following scenario: When you need to manage multiple images or learn basic information about each image, you can use this API to obtain the image list and overview information. Before using this API, ensure that you have the image management permission and the image exists. After a query operation is complete, you can obtain a list of all images. Details about the images can be obtained, including the image name, version, and status. If the image does not exist or you do not have the access permission, the API will return an error message.
Constraints
No constraints
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v1/{project_id}/images/group
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Description: Image name Constraints: N/A Range: The name can contain a maximum of 512 characters. Lowercase letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. Default Value: N/A |
name_fuzzy_match |
No |
Boolean |
Definition: Whether the image name is used for fuzzy match Constraints: N/A Range: The value is of the Boolean type.
Default Value: true |
namespace |
No |
String |
Definition: Organization to which the image belongs. You can create and view an organization on the Organization Management page of the SWR console. Constraints: N/A Range: The value can contain a maximum of 64 characters and must start with a lowercase letter. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. Default Value: N/A |
type |
No |
String |
Definition: Image type Constraints: N/A Range: Enums:
Default Value: N/A |
workspace_id |
No |
String |
Definition: Workspace ID. If no workspaces are available, the default value is 0. If a workspace is created and used, use the actual value. For details about how to obtain the ID, see Querying the Workspace List. Constraints: N/A Range: This value contains 0 or 32 characters. Only digits (0 to 9) or lowercase letters (a to z) are allowed. Default Value: 0 |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
current |
Integer |
Definition: Current page number. Range: Positive integers |
data |
Array of ImageGroup objects |
Definition: Image information overview. |
pages |
Integer |
Definition: Total number of pages. Range: Positive integers |
size |
Integer |
Definition: Number of records on each page Range: Positive integers |
total |
Long |
Definition: Total number of records. Range: Non-negative integers |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Definition: Image name. Range: N/A |
create_at |
Long |
Definition: UTC time when the image is created, accurate to millisecond. Range: N/A |
namespace |
String |
Definition: SWR organization to which the image belongs. Range: N/A |
update_at |
Long |
Definition: Time (UTC) when the image was last updated, accurate to millisecond. Range: N/A |
version_count |
Integer |
Definition: Number of image versions. Range: N/A |
Example Requests
GET https://{endpoint}/v1/{project_id}/images/group
Example Responses
Status code: 200
OK
{ "current" : 1, "data" : [ { "create_at" : 1652878011643, "name" : "123", "namespace" : "cnnorth7-infer-model-dev", "update_at" : 1652878531791, "version_count" : 1 }, { "create_at" : 1671708630448, "name" : "pytorch_1_8", "namespace" : "op_svc_modelarts_container2", "update_at" : 1671708630448, "version_count" : 1 }, { "create_at" : 1671093486722, "name" : "mock-service-python", "namespace" : "mock-service1", "update_at" : 1671093486722, "version_count" : 1 } ], "pages" : 1, "size" : 3, "total" : 3 }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not found |
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