Querying Repository Usage
Function
This API is used to query repository usage.
Calling Method
For details, see Calling APIs.
URI
GET /cloudartifact/v5/storage
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
format_list |
No |
String |
Definition: Repository type list. Constraints N/A. Range maven2, docker, conan, debian, go, nuget, rpm, pypi, npm, cocoapods, and generic. Default value N/A. |
|
in_project |
No |
String |
Definition: Whether it is in project or not. Constraints N/A. Range true: in the project. false: outside the project. Default value N/A. |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
String |
Definition Request status. Range success: The request is successful. error: The request fails. |
|
trace_id |
String |
Definition Request ID, which uniquely identifies the current request. Range A string of digits and hyphens (-). |
|
result |
StorageMap object |
Definition Usage information. Range N/A. |
Example Requests
This API is used to query repository usage.
https://artifact.example.myhuaweicloud.com/cloudartifact/v5/storage?in_project=true&format_list=maven2,npm,go,pypi,rpm,debian,conan,nuget,docker
Example Responses
Status code: 200
OK
{
"status" : "success",
"trace_id" : "143006-1701220621380-265",
"result" : {
"totalStorage" : "549.62 MB",
"totalCount" : 183
}
}
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.