Updated on 2026-01-08 GMT+08:00

Querying Instance Disk Information

API Description

This API is used to query instance disk information.

URI

  • URI format
    GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/disk-usage
    Table 1 Path parameters

    Name

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID of a tenant in a region. Obtain the project ID by following the instructions in Obtaining a Project ID.

    instance_id

    Yes

    String

    Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Response Parameters

Table 3 Response body parameters

Name

Type

Description

volumes

Array of Table 3 objects

Disk information list.

Table 4 DiskVolumes

Name

Type

Description

entity_id

String

Instance ID, group ID, or node ID.

entity_name

String

Instance name, group name, or node name.

group_type

String

Group type. The value can be:

  • mongos: the mongos node type.
  • shard: the shard node type.
  • config: the config node type.
  • replica: the replica set type.
  • readonly: the read replica type.

used

String

Used capacity. The value contains two decimal places. The unit is GB.

size

String

Total size, in GB.

  • Example response
    { 
      "volumes" : [ { 
        "entity_id" : "f04553d9ad2942e7a44facc518dc5699gr02", 
        "entity_name" : "replicaTest", 
        "group_type" : "replica", 
        "used" : "3.18", 
        "size" : "60"
      } ] 
    }

Status Code

For details, see Status Code.

Error Code

For details, see Error Code.