Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Homepage Overview/ Collecting Instance Status Statistics
Updated on 2025-10-20 GMT+08:00

Collecting Instance Status Statistics

Function

This API is used to collect instance status statistics. Before calling this API:

Debugging

You can debug this API in API Explorer.

URI

GET /v3/instances-statistics

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

The value of X-Subject-Token in the response header is the token value.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Language.

Constraints

N/A

Range

  • zh-cn
  • en-us

Default Value

en-us

Response Parameters

Table 2 Response body parameters

Parameter

Type

Description

total_count

Integer

Definition

Total number of instances.

Range

N/A

instances_statistics

Array of Table 3 objects

Definition

Instance statistics.

Table 3 instances_statistics

Parameter

Type

Description

status

String

Definition

Instance status.

Range

  • normal: The instance is normal.
  • abnormal: The instance is abnormal.
  • creating: The instance is being created.
  • createfail: The instance failed to be created.
  • shutdown: The instance has been stopped.
  • deleted: The instance has been deleted.

count

Integer

Definition

Number of instances.

Range

N/A

Example Request

Collecting instance status statistics

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/instances-statistics

Example Response

Instance status statistics collected.

{ 
  "total_count" : "10", 
  "instances_statistics" : [ { 
    "status" : "normal", 
    "count" : 1 
  }, { 
    "status" : "abnormal", 
    "count" : 2 
  }, { 
    "status" : "creating", 
    "count" : 3 
  }, { 
    "status" : "createfail", 
    "count" : 4 
  } ] 
}

Status Codes

Error Codes

For details, see Error Codes.