Calls multiple operations at a time to improve call efficiency.
Try it now
Test
RAM authorization
Request syntax
POST /v2/batch HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request parameters. |
|
| resource |
string |
Yes |
The type of the resource that you want to manage. Valid values:
Valid values:
|
file |
| requests |
array<object> |
Yes |
The child requests. The number of child requests. Valid value: 1 to 100. |
|
|
array<object> |
No |
|||
| id |
string |
Yes |
The ID of the child request. The ID is used to associate a child request with a response. The ID of a child request must be unique. |
93433894994ad2e1 |
| method |
string |
Yes |
The method of a child request. Valid values:
Valid values:
|
POST |
| url |
string |
Yes |
The API path of a child request. Valid values:
Valid values:
|
/file/get |
| body |
object |
No |
The request parameters of a child request. The parameter value must be a JSON string. For more information, see the topic of the corresponding child request. Before you specify the request body, you must specify a header by using Content-Type. Content-Type can only be set to application/json. |
|
|
any |
No |
The request body of a child request. |
{"domain_id":"1","drive_id":"1"} |
|
| headers |
object |
No |
The header of a child request, which indicates the type of the data specified in the request body. |
|
|
string |
No |
The header of a child request. |
{"Content-Type":"application/json"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| responses |
array<object> |
All responses of the child requests. |
|
|
array<object> |
|||
| id |
string |
The ID of the child request. The ID is used to associate a child request with a response. |
93433894994ad2e1 |
| status |
integer |
The returned HTTP status code of a child request. For more information, see the topic of the corresponding child request. |
200 |
| body |
object |
The response parameters of a child request. For more information, see the topic of the corresponding child request. |
|
|
any |
The response body of a child request. |
{"domain_id":"1","drive_id":"1","file_id":"9520943DC264"} |
Examples
Success response
JSON format
{
"responses": [
{
"id": "93433894994ad2e1",
"status": 200,
"body": {
"key": "{\"domain_id\":\"1\",\"drive_id\":\"1\",\"file_id\":\"9520943DC264\"}"
}
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.