Calls multiple operations at a time to improve call efficiency.
Debugging
Authorization information
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:
| file |
| requests | array<object> | Yes | The child requests. The number of child requests. Valid value: 1 to 100. | |
| 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:
| POST |
| url | string | Yes | The API path of a child request. 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. | |
| string | 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 parameters
Examples
Sample success responses
JSONformat
{
"responses": [
{
"id": "93433894994ad2e1",
"status": 200,
"body": {
"key": {
"domain_id": 1,
"drive_id": 1,
"file_id": "9520943DC264"
}
}
}
]
}Error codes
For a list of error codes, visit the Service error codes.
