Batch Asset Operations
Function
Performs batch asset operations.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/digital-assets/batch-action
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
User token. This parameter is mandatory when token authentication is used. You can obtain the token by calling the IAM API used to obtain a user token. Value of X-Subject-Token in the response header. |
Authorization |
No |
String |
Authentication information. This parameter is mandatory for AK/SK authentication. |
X-Sdk-Date |
No |
String |
Time when the request is sent. This parameter is mandatory for AK/SK authentication. The format is YYYYMMDD'T'HHMMSS'Z'. |
X-App-UserId |
No |
String |
Third-party user ID, which does not allow Chinese characters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
action |
Yes |
String |
Batch operation command.
|
asset_ids |
Yes |
Array of strings |
Asset IDs |
params |
No |
String |
Operation parameter |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
X-Request-Id |
String |
Request ID. |
Parameter |
Type |
Description |
---|---|---|
results |
Array of AssetActionResult objects |
Batch operation result |
Parameter |
Type |
Description |
---|---|---|
ret_status |
String |
Handling status.
|
asset_ids |
Array of strings |
Asset IDs |
error_info |
ErrorResponse object |
Error message |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Example Requests
POST https://{endpoint}/v1/digital-assets/batch-action { "action" : "DETELTE", "asset_ids" : [ "xxxxx1", "xxxxx2", "xxxxx3", "xxxxx4" ] }
Example Responses
Status code: 200
Succeeded.
{ "results" : [ { "ret_status" : "SUCESS", "asset_ids" : [ "xxxxx1", "xxxxx2" ] }, { "ret_status" : "FAILED", "asset_ids" : [ "xxxx3", "xxxx4" ], "error_info" : { "error_code" : "MSS.xxxxxx", "error_msg" : "Insufficient permissions." } } ] }
Status code: 400
{ "error_code" : "MSS.00000001", "error_msg" : "Unauthorized" }
Status code: 500
{ "error_code" : "MSS.00000004", "error_msg" : "Internal Error" }
Status Codes
Status Code |
Description |
---|---|
200 |
Succeeded. |
400 |
Authentication is not performed or fails. |
500 |
Internal service error. |
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