Queries the usage data of KV storage.
Operation description
Note* You can call this operation up to 5 times per second per account.
- The usage data indicates the number of requests.
Time granularity: This operation supports only the time granularity of 1 hour.
Time granularity | Time range to query | Historical data available | Data latency |
---|---|---|---|
1 hour | 31 days | 90 days | 3 to 4 hours |
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
NamespaceId | string | No | The namespace ID. If the parameter is empty, data about all namespaces is returned. You can specify a maximum number of 30 namespace IDs and separate them with commas (,). | 12423131231**** |
StartTime | string | No | The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. The minimum data granularity is 1 hour. If you do not specify this parameter, the data in the last seven days is returned. | 2022-08-10T00:00:00Z |
EndTime | string | No | The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. | 2022-08-10T23:59:59Z |
Field | string | Yes | The type of the request data. Set the value to acc. | acc |
AccessType | string | No | The request method. If the parameter is empty, data about all methods is returned. Valid values:
| get |
ResponseType | string | No | The type of the response data. Valid values:
Default value: detail. | detail |
SplitBy | string | No | The key that is used to group data. Valid values: type and namespace.
If ResponseType is set to total, data to return is not grouped by namespace but by type. | type |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "9732E117-8A37-49FD-A36F-ABBB87556CA7",
"StartTime": "2022-11-06T16:00:00Z",
"EndTime": "2022-11-18T15:59:59Z",
"KvUsageData": [
{
"TimeStamp": "2022-11-14T15:00:03Z",
"NamespaceId": "534167033424646144",
"AccessType": "get",
"Acc": 1340000
}
]
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidStartTime.Malformed | The specified StartTime parameter is invalid. | The format of the specified start time is invalid. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
400 | InvalidEndTime.Malformed | The specified EndTime is invalid. | The format of the specified end time is invalid. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
400 | InvalidEndTime.Mismatch | The specified EndTime is earlier than the StartTime. | The end time is earlier than the start time. |
400 | InvalidTimeSpan | The time span exceeds the limit. | The time span exceeds the limit. Configure a valid time span as described in API documentation. |
400 | InvalidStartTime.ValueNotSupported | The specified StartTime is invalid. | The specified start time is invalid. |
400 | InvalidParameterField | The specified Field is invalid. | The Field parameter is set to an invalid value. |
For a list of error codes, visit the Service error codes.