Queries the byte and request hit ratios of an accelerated domain name. You can query data that is collected within the previous 90 days.

Note
  • If you do not specify the StartTime and EndTime parameters, the data within the last 24 hours is queried by default. If you specify the StartTime and EndTime parameters, the data within the specified time range is queried.
  • You can specify multiple domain names and separate them with commas (,).
  • The maximum number of times that each user can call this operation per second is 100.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No DescribeDcdnDomainHitRateData

The operation that you want to perform. Set the value to DescribeDcdnDomainHitRateData.

DomainName String No example.com

The accelerated domain name. You can specify only one domain name.

If you leave this parameter empty, all domain names are queried.

StartTime String No 2018-03-02T12:00:00Z

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.

EndTime String No 2018-03-02T15:00:00Z

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.

The end time must be later than the start time.

Interval String No 300

The resolution of the queried data. Unit: seconds. The value of this parameter varies based on the values of the StartTime and EndTime parameters. Valid values:

  • If the time range between StartTime and EndTime is less than three days, the valid values are 300, 3600, and 86400. If you do not specify a value for this parameter, 300 is used.
  • If the time range between StartTime and EndTime is greater than or equal to three days and less than 31 days, the valid values are 3600 and 86400. If you do not specify a value for this parameter, 3600 is used.
  • If the time range between StartTime and EndTime is 31 days or more, the valid value is 86400. If you do not specify a value for this parameter, 86400 is used.

Response parameters

Parameter Type Example Description
DataInterval String 3600

The resolution of the queried data. Unit: seconds.

DomainName String example.com

The accelerated domain name.

EndTime String 2018-03-02T15:00:00Z

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

HitRatePerInterval Array of DataModule

The hit ratio at each specified interval.

DataModule
ByteHitRate Float 0

The byte hit ratio.

ReqHitRate Float 0

The request hit ratio.

TimeStamp String 2018-03-02T13:00:00Z

The timestamp when the data was returned.

RequestId String 4D07ABFE-4737-4834-B1B9-A661308C47B4

The ID of the request.

StartTime String 2018-03-02T12:00:00Z

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

Examples

Sample requests

http://dcdn.aliyuncs.com?Action=DescribeDcdnDomainHitRateData
&DomainName=example.com
&StartTime=2018-03-02T12:00:00Z
&EndTime=2018-03-02T15:00:00Z
&<Common request parameters>

Sample success responses

XML format

<DescribeDcdnDomainHitRateDataResponse>
      <DomainName>example.com</DomainName>
      <DataInterval>3600</DataInterval>
      <HitRatePerInterval>
            <DataModule>
                  <ByteHitRate>0</ByteHitRate>
                  <TimeStamp>2018-03-02T15:00:00Z</TimeStamp>
                  <ReqHitRate>0</ReqHitRate>
            </DataModule>
            <DataModule>
                  <ByteHitRate>0</ByteHitRate>
                  <TimeStamp>2018-03-02T14:00:00Z</TimeStamp>
                  <ReqHitRate>0</ReqHitRate>
            </DataModule>
            <DataModule>
                  <ByteHitRate>0</ByteHitRate>
                  <TimeStamp>2018-03-02T13:00:00Z</TimeStamp>
                  <ReqHitRate>0</ReqHitRate>
            </DataModule>
            <DataModule>
                  <ByteHitRate>0</ByteHitRate>
                  <TimeStamp>2018-03-02T12:00:00Z</TimeStamp>
                  <ReqHitRate>0</ReqHitRate>
            </DataModule>
      </HitRatePerInterval>
      <RequestId>4D07ABFE-4737-4834-B1B9-A661308C47B4</RequestId>
      <EndTime>2018-03-02T15:00:00Z</EndTime>
      <StartTime>2018-03-02T12:00:00Z</StartTime>
</DescribeDcdnDomainHitRateDataResponse>

JSON format

{
    "DomainName": "example.com",
    "DataInterval": 3600,
    "HitRatePerInterval": {
        "DataModule": [
            {
                "ByteHitRate": 0,
                "TimeStamp": "2018-03-02T15:00:00Z",
                "ReqHitRate": 0
            },
            {
                "ByteHitRate": 0,
                "TimeStamp": "2018-03-02T14:00:00Z",
                "ReqHitRate": 0
            },
            {
                "ByteHitRate": 0,
                "TimeStamp": "2018-03-02T13:00:00Z",
                "ReqHitRate": 0
            },
            {
                "ByteHitRate": 0,
                "TimeStamp": "2018-03-02T12:00:00Z",
                "ReqHitRate": 0
            }
        ]
    },
    "RequestId": "4D07ABFE-4737-4834-B1B9-A661308C47B4",
    "EndTime": "2018-03-02T15:00:00Z",
    "StartTime": "2018-03-02T12:00:00Z"
}

Error codes

HTTP status code Error code Error message Description
400 MissingTimeParameter The StartTime and EndTime must be both specified. The error message returned because the StartTime or EndTime parameter is not configured.
400 InvalidEndTime.Malformed The specified EndTime is invalid. The error message returned because the format of the 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 error message returned because the end time is earlier than the start time.
400 InvalidStartTime.ValueNotSupported The specified StartTime is invalid. The error message returned because the start time is invalid. Specify a valid value.

For a list of error codes, visit the API Error Center.