All Products
Search
Document Center

Drive and Photo Service:Batch

Last Updated:Aug 04, 2025

Calls multiple operations at a time to improve call efficiency.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /v2/batch HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request parameters.

resourcestringYes

The type of the resource that you want to manage. Valid values:

  • file: a file.
  • drive: an individual drive or a team drive.
  • user: a user.
  • group: a group.
  • membership: a group member.
  • share_link: a share.
  • async_task: an asynchronous task.
file
requestsarray<object>Yes

The child requests.

The number of child requests. Valid value: 1 to 100.

objectNo
idstringYes

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
methodstringYes

The method of a child request. Valid values:

  • POST
  • GET
  • PUT
  • DELETE
  • HEAD
POST
urlstringYes

The API path of a child request. Valid values:

  • /file/get: queries the information about a file.
  • /file/update: modifies the information about a file.
  • /file/search: searches for a file.
  • /file/copy: copies a file or folder.
  • /file/move: moves a file or folder.
  • /file/delete: deletes a file or folder.
  • /file/get_download_url: queries the download URL of a file.
  • /file/get_share_link_download_url: queries the download URL of a file in a share.
  • /recyclebin/trash: moves a file or folder to the recycle bin.
  • /recyclebin/restore: restores a file or folder.
  • /file/put_usertags: adds tags to a user.
  • /file/delete_usertags: removes tags from a user.
  • /drive/get: queries the information about a drive.
  • /user/get: queries the information about a user.
  • /group/get: queries the information about a group.
  • /share_link/create: creates a share.
  • /share_link/update: modifies a share.
  • /share_link/cancel: cancels a share.
  • /share_link/list: queries shares.
  • /share_link/get: queries the information about a share.
  • /share_link/get_share_token: queries an access token of a share.
  • /async_task/get: queries the information about an asynchronous task.
/file/get
bodyobjectNo

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.

stringNo

The request body of a child request.

{"domain_id":"1","drive_id":"1"}
headersobjectNo

The header of a child request, which indicates the type of the data specified in the request body.

stringNo

The header of a child request.

{"Content-Type":"application/json"}

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

responsesarray<object>

All responses of the child requests.

object
idstring

The ID of the child request. The ID is used to associate a child request with a response.

93433894994ad2e1
statusinteger

The returned HTTP status code of a child request. For more information, see the topic of the corresponding child request.

200
bodyobject

The response parameters of a child request. For more information, see the topic of the corresponding child request.

string

The response body of a child request.

{"domain_id":"1","drive_id":"1","file_id":"9520943DC264"}

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.