Batch Moving Packages to the Recycle Bin
Function
This API is used to move packages to the recycle bin in batches.
Calling Method
For details, see Calling APIs.
URI
DELETE /cloudartifact/v5/trashes
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
[items] |
Yes |
Array of TrashArtifactModelForDelete objects |
Recycle bin information. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
id |
Yes |
String |
Definition Repository ID. The format is {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 The region and domainId in the repository ID must be valid values. The valid values of format are npm, go, pypi, rpm, composer, maven, debian, conan, nuget, docker2, cocoapods, and ohpm. The upper limit of sequence varies depending on the package. Range N/A. Default value None |
|
format |
Yes |
String |
Definition Package type. Constraints N/A. Range maven2, docker, npm, go, pypi, rpm, composer, debian, conan, nuget, docker2, cocoapods, ohpm, and generic. Default value None |
|
uri |
Yes |
String |
Definition Repository path to be deleted. Constraints N/A. Range N/A. Default value None |
|
status |
Yes |
String |
Definition Status. Constraints N/A. Range active: Normal. trash: Deprecated. delete: Deleted. Default value None |
|
include_pattern |
No |
String |
Definition Include Patterns. Constraints N/A. Range N/A. Default value 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 |
TrashcanResultData object |
Definition Batch operation result. Range N/A. |
Example Requests
This API is used to move packages to the recycle bin in batches.
https://artifact.example.myhuaweicloud.com/cloudartifact/v5/trashes
[ {
"id" : "xx-xxxxx-x_5a775fdcb14f4431b6c0015618140bc3_debian_43",
"format" : "debian",
"uri" : "xx-xxxxx-x_5a775fdcb14f4431b6c0015618140bc3_debian_43/",
"status" : "active"
}, {
"id" : "xx-xxxxx-x_5a775fdcb14f4431b6c0015618140bc3_go_4",
"format" : "go",
"uri" : "xx-xxxxx-x_5a775fdcb14f4431b6c0015618140bc3_go_4/",
"status" : "active"
} ]
Example Responses
Status code: 200
OK
{
"status" : "success",
"trace_id" : "143002-1701173929284-59",
"result" : "success"
}
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.