All Products
Search
Document Center

Edge Security Acceleration:DescribeKvUsageData

Last Updated:Oct 17, 2024

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 granularityTime range to queryHistorical data availableData latency
1 hour31 days90 days3 to 4 hours

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
NamespaceIdstringNo

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****
StartTimestringNo

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
EndTimestringNo

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
FieldstringYes

The type of the request data. Set the value to acc.

acc
AccessTypestringNo

The request method. If the parameter is empty, data about all methods is returned. Valid values:

  • get
  • put
  • list
  • delete
get
ResponseTypestringNo

The type of the response data. Valid values:

  • detail: detailed data
  • total: summary data

Default value: detail.

detail
SplitBystringNo

The key that is used to group data. Valid values: type and namespace.

  • type: Data is grouped by time. The data in the last 5 minutes is returned.
  • namespace: Data is grouped by namespace and is not padded with zeros.
  • Default value: type.

If ResponseType is set to total, data to return is not grouped by namespace but by type.

type

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

9732E117-8A37-49FD-A36F-ABBB87556CA7
StartTimestring

The beginning of the time range during which data was queried.

2022-11-06T16:00:00Z
EndTimestring

The end of the time range during which data was queried.

2022-11-18T15:59:59Z
KvUsageDataarray<object>

The usage details.

KvUsageDataItemobject
TimeStampstring

The timestamp of the data returned.

2022-11-14T15:00:03Z
NamespaceIdstring

The namespace ID. This parameter is available only when the SplitBy parameter is set to namespace.

534167033424646144
AccessTypestring

The request method. This parameter is available only when the SplitBy parameter is set to type.

get
Acclong

The number of visits.

1340000

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidStartTime.MalformedThe 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.
400InvalidEndTime.MalformedThe 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.
400InvalidEndTime.MismatchThe specified EndTime is earlier than the StartTime.The end time is earlier than the start time.
400InvalidTimeSpanThe time span exceeds the limit.The time span exceeds the limit. Configure a valid time span as described in API documentation.
400InvalidStartTime.ValueNotSupportedThe specified StartTime is invalid.The specified start time is invalid.
400InvalidParameterFieldThe specified Field is invalid.The Field parameter is set to an invalid value.

For a list of error codes, visit the Service error codes.