Retrieves usage information for an account in the KV service, including a list of all namespaces.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Status |
string |
The account status.
|
online |
| RequestId |
string |
The request ID. |
EEEBE525-F576-1196-8DAF-2D70CA3F4D2F |
| NamespaceUsed |
integer |
The number of namespaces created under the account. |
1 |
| NamespaceQuota |
integer |
The maximum number of namespaces allowed for the account. |
10 |
| CapacityString |
string |
The total capacity of all namespaces under the account, in human-readable format. |
1 GB |
| CapacityUsedString |
string |
The used capacity of all namespaces under the account, in human-readable format. |
100 MB |
| Capacity |
integer |
The total capacity of all namespaces under the account, in bytes. |
1073741824 |
| CapacityUsed |
integer |
The used capacity of all namespaces under the account, in bytes. |
10048576 |
| NamespaceList |
array<object> |
The list of namespaces for the account. |
|
|
object |
|||
| Status |
string |
The namespace status. Valid values:
|
online |
| Namespace |
string |
The namespace name. |
test_namespace |
| NamespaceId |
string |
The namespace ID. |
643355322374688768 |
| Description |
string |
The namespace description. |
the first namespace |
| Capacity |
integer |
The namespace capacity, in bytes. |
1073741824 |
| CapacityUsed |
integer |
The used capacity of the namespace, in bytes. |
100048576 |
| CapacityString |
string |
The namespace capacity, in human-readable format. |
1 GB |
| CapacityUsedString |
string |
The used capacity of the namespace, in human-readable format. |
100 MB |
Examples
Success response
JSON format
{
"Status": "online",
"RequestId": "EEEBE525-F576-1196-8DAF-2D70CA3F4D2F",
"NamespaceUsed": 1,
"NamespaceQuota": 10,
"CapacityString": "1 GB",
"CapacityUsedString": "100 MB",
"Capacity": 1073741824,
"CapacityUsed": 10048576,
"NamespaceList": [
{
"Status": "online",
"Namespace": "test_namespace",
"NamespaceId": "643355322374688768",
"Description": "the first namespace",
"Capacity": 1073741824,
"CapacityUsed": 100048576,
"CapacityString": "1 GB",
"CapacityUsedString": "100 MB"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidAccount.Malformed | The specified account is invalid. | The account is invalid, for example, the value is empty. |
| 400 | InvalidNameSpace.Malformed | The specified namespace is invalid. | The namespace is invalid, for example, the value is empty. |
| 400 | InvalidKey.Malformed | The specified key is invalid. | The key is invalid, for example, the value is empty. |
| 400 | InvalidKey.ExceedsMaximum | The size of the key cannot exceed 512 bytes. | The key exceeds the maximum allowed size. |
| 400 | InvalidValue.ExceedsMaximum | The size of the value cannot exceed 2,000,000 bytes. | The value exceeds the maximum allowed size. |
| 403 | InvalidKey.ExceedsCapacity | The maximum capacity of a single namespace cannot exceed 1 GB. | The namespace capacity exceeds the limit. |
| 403 | Unauthorized.InvalidParameters | The specified authentication parameters are invalid. | The authentication parameters are invalid. |
| 403 | Unauthorized.InvalidTime | The specified authentication time is invalid. | The authentication time parameter is invalid. Check the value and try again. |
| 403 | Unauthorized.InvalidToken | Token authentication failed. | The token is invalid. Verify the token and try again. |
| 404 | InvalidAccount.NotFound | The specified account does not exist. | The specified account does not exist. |
| 404 | InvalidNameSpace.NotFound | The specified namespace does not exist. | |
| 404 | InvalidKey.NotFound | The specified key does not exist. | The specified key-value pair does not exist. |
| 406 | InvalidNameSpace.Duplicate | The specified namespace already exists. | The specified namespace already exists. |
| 406 | InvalidNameSpace.QuotaFull | The maximum number of namespaces is exceeded. | The number of namespaces exceeds the quota. |
| 429 | TooManyRequests | Too many requests are submitted. | Too many requests. Try again later. |
| 429 | TooQuickRequests | Request for putting or deleting keys are frequently submitted. | Key put or delete requests are too frequent. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.