Restoring Multiple Packages in the Recycle Bin
Function
This API is used to restore multiple packages in the recycle bin.
Calling Method
For details, see Calling APIs.
URI
PUT /cloudartifact/v5/trashes
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
[items] |
Yes |
Array of IDETrashArtifactModel 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 |
|
status |
Yes |
String |
Definition Current repository status. Constraints N/A. Range active: Normal. trash: Deprecated. delete: Deleted. Default value None |
|
uri |
Yes |
String |
Definition Repository path to be restored. 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 restore multiple packages in the recycle bin.
/v5/trashes
[ {
"id" : "xx-xxxxx-x_5a775fdcb14f4431b6c0015618140bc3_go_4",
"format" : "go",
"uri" : "xx-xxxxx-x_5a775fdcb14f4431b6c0015618140bc3_go_4/",
"status" : "active"
}, {
"id" : "xx-xxxxx-x_5a775fdcb14f4431b6c0015618140bc3_maven_2_23",
"format" : "maven2",
"uri" : "xx-xxxxx-x_5a775fdcb14f4431b6c0015618140bc3_maven_2_23/",
"status" : "active"
} ]
Example Responses
Status code: 200
OK
{
"status" : "success",
"trace_id" : "143002-1701173929284-59",
"result" : null
}
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.