All Products
Search
Document Center

Drive and Photo Service:Batch

Last Updated:May 26, 2026

Combine multiple API calls into a single request to improve 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

domain_id

string

Yes

body

object

No

Contains the request body parameters.

resource

string

Yes

The resource type of the subrequests. Supported resource types include:

  • file: A file.

  • drive: A drive.

  • user: A user.

  • group: A group.

  • membership: A group membership.

  • share_link: A share link.

  • async_task: An asynchronous task.

Valid values:

  • share_link :

    share link

  • file :

    file

  • async_task :

    asynchronous task

  • membership :

    group membership

  • drive :

    drive

  • user :

    user

  • group :

    group

file

requests

array<object>

Yes

A collection of subrequests.

A batch request can contain 1 to 100 subrequests.

array<object>

No

A subrequest object.

id

string

Yes

The unique ID of the subrequest. This ID is used to correlate the subrequest with its response. IDs must be unique within a batch request.

93433894994ad2e1

method

string

Yes

The HTTP method of the subrequest. Supported methods include:

  • 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 the subrequest. Supported paths include:

  • /file/get: Get file details.

  • /file/update: Update file information.

  • /file/search: Search for files.

  • /file/copy: Copy a file or folder.

  • /file/move: Move a file or folder.

  • /file/delete: Delete a file or folder.

  • /file/get_download_url: Get the download URL for a file.

  • /file/get_share_link_download_url: Get the download URL from a share link.

  • /recyclebin/trash: Move a file or folder to the recycle bin.

  • /recyclebin/restore: Restore a file or folder from the recycle bin.

  • /file/put_usertags: Set user tags.

  • /file/delete_usertags: Delete user tags.

  • /drive/get: Get drive information.

  • /user/get: Get user information.

  • /group/get: Get group information.

  • /share_link/create: Create a share link.

  • /share_link/update: Update a share link.

  • /share_link/cancel: Cancel a share link.

  • /share_link/list: List share links.

  • /share_link/get: Get share link information.

  • /share_link/get_share_token: Get a share token.

  • /async_task/get: Get asynchronous task information.

Valid values:

  • /file/copy :

    Copy file or folder

  • /file/get_share_link_download_url :

    Get share link download URL

  • /file/move :

    Move file or folder

  • /share_link/create :

    Create share link

  • /share_link/update :

    Update share link

  • /async_task/get :

    Get asynchronous task information

  • /drive/get :

    Get drive information

  • /group/get :

    Get group information

  • /share_link/list :

    List share links

  • /file/delete :

    Delete file or folder

  • /share_link/get :

    Get share link information

  • /file/get :

    Get file details

  • /file/get_download_url :

    Get file download URL

  • /recyclebin/restore :

    Restore 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 link

/file/get

body

object

No

The request body for the subrequest. For details, refer to the documentation for the specific API operation.

If you specify the body parameter, you must also set the Content-Type request header to application/json.

any

No

The request body of the subrequest.

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

headers

object

No

The request headers for the subrequest.

string

No

The request headers of the subrequest.

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

Response elements

Element

Type

Description

Example

object

The response parameters.

responses

array<object>

A collection of responses to the subrequests.

array<object>

A response object for a single subrequest.

id

string

The ID of the subrequest that this response corresponds to.

93433894994ad2e1

status

integer

The HTTP status code of the subrequest. For details, refer to the documentation for the specific API operation.

200

body

object

The response body of the subrequest. For details, refer to the documentation for the specific API operation.

any

The response body of the subrequest.

{"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.