All Products
Search
Document Center

Drive and Photo Service:GetDefaultDrive

Last Updated:Aug 04, 2025

Queries the default drive of a user.

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/drive/get_default_drive HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request parameters.

user_idstringNo

The user ID. If you use an AccessKey pair for authentication, you must specify this parameter. If you use an access token for authentication, this parameter is optional. By default, the user ID associated with the access token is used.

c9b7a5aa04d14ae3867fdc886fa01da4

Response parameters

ParameterTypeDescriptionExample
Drive

The response parameters.

Examples

Sample success responses

JSONformat

{
  "domain_id": "bj1",
  "drive_id": 1,
  "drive_name": "drv1",
  "description": "vipdrive",
  "owner": "c9b7a5aa04d14ae3867fdc886fa01da4",
  "owner_type": "user",
  "drive_type": "normal",
  "status": "enabled",
  "used_size": 20480,
  "total_size": 204800,
  "created_at": "2019-08-20T06:51:27.292Z",
  "creator": "c9b7a5aa04d14ae3867fdc886fa01da4"
}

Error codes

For a list of error codes, visit the Service error codes.