Querying the Docker Registry List and Account Password of a Tenant
Function
Query the Docker registry list and account password of a tenant. Cross-tenant Docker registry list and account password are supported.
Calling Method
For details, see Calling APIs.
URI
GET /cloudartifact/v5/docker/info
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
No |
String |
Definition: Project ID. It can be obtained by calling an API or from the console. For details about how to obtain the project ID, see Obtaining a Project ID (CloudArtifact_api_0015.xml). Constraints: The value can contain 32 characters. Only letters and digits are supported. Value range: N/A Default value: None |
policy |
No |
String |
Definition: Repository type. The options are snapshot or release. Constraints: N/A Value range: snapshot and release Default value: N/A |
access |
No |
String |
Definition: Permission filtering setting, which allows read (r) and read-write (rw) permissions. Constraints: N/A Value range: r and rw. Default value: r. |
default |
No |
String |
Definition: Whether to return the default repository. Constraints: N/A Value range: true and false. Default value: false |
ids |
No |
String |
Definition: Repository IDs. Use commas (,) to separate multiple repository IDs. The repository ID is in the format of {region}{domainId}{format}_{sequence}. You can find the repository ID on the general page of your self-hosted repos. It is the string located between the last two slashes (/) in the repository URL. Constraints: N/A Value range: Maximum length: 512 characters. Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition: User token. The token 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. Constraints: N/A Value range: A string of 1 to 100,000 characters. Default value: N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
status |
String |
Definition: Request status. Value range: success: The request is successful. error: The request fails. |
trace_id |
String |
Definition: Request ID, which uniquely identifies the current request. Value range: A string of digits and hyphens (-). |
result |
Array of objects |
Definition: The API response varies depending on the request. Value range: The value range varies according to the API. |
Example Requests
Query the Docker registry list and account password of a tenant.
https://artifact.cn-south-1.myhuaweicloud.com/cloudartifact/v5/docker/info?project_id=e2ee90487d6349dd944a5767225f6f55&access=rw&default=true
Example Responses
Status code: 200
OK
{ "status" : "success", "trace_id" : "1de49b2d886e4a2e9e7f333a298a3fc6", "result" : [ { "status" : "active", "domainId" : "09d2ca2f5080d5b60f51c00ae5bad0a0", "region" : "xx-xxxxx-x", "createdTime" : "2023-10-09 14:43:36", "modifiedTime" : "2024-04-01 10:50:52", "createdUserId" : "09d2ca2ffd00d3c21ff8c00a4dd1e080", "createdUserName" : "devcloud_devcloud_y00226182_05", "modifiedUserId" : null, "modifiedUserName" : null, "name" : "xx-xxxxx-x_09d2ca2f5080d5b60f51c00ae5bad0a0_docker2_0", "disable" : false, "format" : "docker2", "type" : "hosted", "policy" : null, "tabId" : null, "repositoryName" : "docker2_test", "displayName" : null, "description" : "ccc", "snapshot" : null, "release" : null, "npm" : null, "snapshotStatus" : null, "releaseStatus" : null, "projectId" : "b98504a5be234fb7b47238c47ca4bb51", "includesPattern" : "aaaa/**/*", "excludesPattern" : null, "repositoryIds" : null, "uri" : null, "deploymentPolicy" : null, "repositories" : null, "parentRepoName" : null, "userName" : null, "password" : "Su=4Nm9--5", "remoteUrl" : null, "pyPIRegistryUrl" : null, "defaultDeployRepository" : null, "remoteType" : null, "proxy" : null, "allowAnonymous" : null, "autoCleanSnapshot" : null, "snapshotAliveDays" : null, "maxUniqueSnapshots" : null, "shareRight" : "PROJECT", "nexuRepo" : false, "migrateFlag" : 0, "obsSpeedBucket" : null, "associateProject" : null, "username" : "xx-xxxxx-x_09d2ca2f5080d5b60f51c00ae5bad0a0_09d2ca2ffd00d3c21ff8c00a4dd1e080", "url" : "artgalaxy/xx-xxxxx-x_09d2ca2f5080d5b60f51c00ae5bad0a0_docker2_0/", "packageType" : "docker" } ] }
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