Updated on 2024-12-20 GMT+08:00

Querying Capacity Statistics

Function

Querying Capacity Statistics

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

GET /v3/{project_id}/storage_usage

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Number of records to be queried

offset

No

Integer

Offset value

resource_id

No

String

Support for filtering by backup object resource ID

resource_type

No

String

Filtering based on the backup object type is supported.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

resource_count

Integer

Number of resources that meet the filter criteria

storage_usage

Array of StorageUsage objects

Capacity statistics

Table 4 StorageUsage

Parameter

Type

Description

backup_count

Integer

Number of backups

backup_size

Integer

Backup capacity

resource_id

String

Resource ID

resource_name

String

Resource name

resource_type

String

Resource type

backup_size_multiaz

Integer

Multi-AZ backup size

Example Requests

None

Example Responses

Status code: 200

OK

{
  "storage_usage" : [ {
    "resource_name" : "ECS_name",
    "resource_id" : "89d466e5-b7f9-4e45-807a-d5f17f44fc84",
    "backup_size" : 0,
    "backup_count" : 1,
    "resource_type" : "OS::Nova::Server",
    "backup_size_multiaz" : 0
  } ],
  "resource_count" : 1
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.