Querying the Image Repository List (V3)
Function
List the image repositories.
Calling Method
For details, see Calling APIs.
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
swr:repo:listRepos
List
repo *
-
-
-
URI
GET /v3/manage/repos
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| namespace | No | String | Organization name. The name contains 1 to 64 characters, starting with a lowercase letter and ending with a lowercase letter or digit. Only lowercase letters, digits, periods (.), underscores (_), and hyphens (-) are allowed. Periods, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed. |
| name | No | String | Image repository name. Fuzzy match is supported. |
| category | No | String | Image repository type. The value can be app_server, linux, framework_app, database, lang, other, windows, or arm. |
| limit | No | Integer | The maximum number of image repositories on each page. The default value is 100. A maximum of 1,000 image repositories can be returned. |
| marker | No | Integer | Start marker of the pagination query. The value of nextMarker returned by the API is the start marker of the next query. |
| is_public | No | Boolean | Whether a repository is public or private. The value true indicates a public repository, and false indicates a private repository. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Message body type (format). The value can be: application/json;charset=utf-8 application/json |
| X-Auth-Token | Yes | String | User token. You can obtain the token by calling the IAM API used to obtain a user token. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| nextMarker | Integer | Start ID for the next pagination query. If this parameter is not returned, the data query is complete. |
| repos | Array of ShowRepoRespV3 objects |
| Parameter | Type | Description |
|---|---|---|
| id | Long | Repository ID. |
| name | String | Repository name. |
| category | String | Repository type. |
| description | String | Repository description. |
| size | Long | Repository size. |
| is_public | Boolean | Whether a repository is a public repository. |
| num_images | Long | Number of images in a repository, ranging from 0 to 9,223,372,036,854,775,807. |
| num_download | Long | The number of downloads. |
| created_at | String | Time when a repository was created. It is the UTC standard time. You need to calculate the offset based on the local time, for example, UTC+8:00 for the East 8th Time Zone. |
| updated_at | String | Time when a repository was updated. It is the UTC standard time. You need to calculate the offset based on the local time, for example, UTC+8:00 for the East 8th Time Zone. |
| domain_name | String | Tenant name of a repository. |
| namespace_name | String | Name of the organization that a repository belongs to. |
| status | Boolean | Whether the image shared by others has expired. This field is not returned when the repository information of the current user is obtained. |
Example Requests
None
Example Responses
Status code: 200
{
"repos" : [ {
"id" : 1,
"name" : "nginx",
"category" : "linux",
"size" : 200977474,
"is_public" : false,
"num_images" : 2,
"num_download" : 0,
"created_at" : "2017-01-01T00:00:00Z",
"updated_at" : "2017-09-11T03:00:02.542841141Z",
"domain_name" : "root",
"namespace_name" : "root"
} ],
"nextMarker" : 1
} Status Codes
| Status Code | Description |
|---|---|
| 200 | The repository list has been queried. |
| 400 | Request error. |
| 401 | Authorization failed. |
| 403 | Access denied. |
| 404 | Resource not found. |
| 500 | Internal error. |
Error Codes
See Error Codes.
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