Querying the Storage Usage of Schemas in a Specified Database
Function
This API is used to query the storage usage of schemas in a specified database. Before calling this API:
- Learn how to authenticate this API.
- Obtain the required region and endpoint.
Debugging
You can debug this API in API Explorer.
URI
GET /v3.1/{project_id}/instances/{instance_id}/schema-volume
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID of a tenant in a region. To obtain the value, see Obtaining a Project ID. Constraints N/A Range The value can contain 32 characters. Only letters and digits are allowed. Default Value N/A |
|
instance_id |
Yes |
String |
Definition Instance ID, which uniquely identifies an instance. Constraints N/A Range The value can contain 36 characters. Only letters and digits are allowed. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
database_name |
Yes |
String |
Definition Database name. Constraints N/A Range N/A Default Value N/A |
|
schema_name |
No |
String |
Definition Schema name. Constraints N/A Range N/A Default Value N/A |
|
offset |
No |
Integer |
Definition Index offset. The query starts from the next piece of data indexed by this parameter. Constraints The value must be a non-negative integer. Range 0–10000 Default Value 0 |
|
limit |
No |
Integer |
Definition Number of records returned by a query. Constraints The value cannot be a negative number. Range 1–200 Default Value 100 |
Request 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. After a response is returned, the value of X-Subject-Token in the response header is the token. Constraints N/A Range N/A Default Value N/A |
Response Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
schema_volumes |
Array of objects |
Storage usage of schemas in a database. For details, see Table 5. |
|
total_count |
Integer |
Definition Total number. Range N/A |
Example Request
Querying the storage usage of schemas in a specified database
GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/3d39c18788b54a919bab633874c159dfin14/instances/3d39c18788b54a919bab633874c159dfin01/schema-volume?database_name=test_db
Example Response
{
"schema_volumes": [
{
"schema_size": "28 MB",
"table_count": "161",
"user_name": "rdsAdmin",
"schema_name": "pg_catalog"
}
],
"total_count": 1
}
Status Codes
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot