All Products
Search
Document Center

Drive and Photo Service:Batch

Last Updated:Mar 26, 2026

Calls multiple operations at a time to improve call efficiency.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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: 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.

Valid values:

  • share_link :

    Share

  • file :

    File

  • async_task :

    Asynchronous task

  • membership :

    Group member

  • drive :

    Personal/Team drive

  • user :

    User

  • group :

    Group

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:

  • POST

  • GET

  • PUT

  • DELETE

  • HEAD

Valid values:

  • HEAD :

    HEAD

  • DELETE :

    DELETE

  • POST :

    POST

  • GET :

    GET

  • PUT :

    PUT

POST

url

string

Yes

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.

Valid values:

  • /file/copy :

    Copy a file or folder

  • /file/get_share_link_download_url :

    Get a share download URL

  • /file/move :

    Move a file or folder

  • /share_link/create :

    Create a share

  • /share_link/update :

    Update a share

  • /async_task/get :

    Get asynchronous task information

  • /drive/get :

    Get drive information

  • /group/get :

    Get group information

  • /share_link/list :

    List shares

  • /file/delete :

    Delete a file or folder

  • /share_link/get :

    Get share information

  • /file/get :

    Get file details

  • /file/get_download_url :

    Get a file download URL

  • /recyclebin/restore :

    Restore a file or folder

  • /file/update :

    Update file information

  • /recyclebin/trash :

    Move to recycle bin

  • /file/search :

    Search files

  • /user/get :

    Get user information

  • /share_link/get_share_token :

    Get share token

  • /share_link/cancel :

    Cancel share

/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.