Media Acceleration VoD,Dynamic Web Acceleration,Content Acceleration
Query the number of requests for multiple domain names in each country and region. (Statistics by visitor IP)
Single user trigger frequency: 300/5min
| Name | Description |
|---|---|
dateFromString | Start time:
1. The time format is yyyy-MM-ddTHH:mm:ss±HH:mm. Please note: ±HH:mm is the time zone offset, which can be adjusted according to your data needs, for example, +00:00 represents UTC time, +08:00 represents East 8th District, and -05:00 represents West 5th District. 2024-01-15T10:30:45+00:00 means UTC time January 15, 2024 10:30:45 AM;
2. Can not exceed the current time;
3. The latest half year (183 days) data can be obtained at most. |
dateToString | End time:
1. The time format is yyyy-MM-ddTHH:mm:ss±HH:mm. Please note: ±HH:mm is the time zone offset, which can be adjusted according to your data needs, for example, +00:00 represents UTC time, +08:00 represents East 8th District, and -05:00 represents West 5th District. 2024-01-15T10:30:45+00:00 means UTC time January 15, 2024 10:30:45 AM;
2. The end time is greater than the start time;
3. If the end time is greater than the current time, the current time is taken.
4. DateFrom and dateTo are not uploaded, defaulting to query the past 24 hours; if only one is not uploaded, throw an exception;
5. The default query interval is 7 days, Maximum query interval allowed: 31 days, that is, the difference between dateFrom and dateTo can not exceed 31 days. |
domainList | Domains:
1. Domain is not uploaded: Query all domain names of the account (More than 20 domains will error,you can contact technical support for adjustment);
2. Domain is uploaded: Up to 20 domains are supported(you can contact technical support for adjustment). |
areaCodeList | Acceleration area:
1. Acceleration areaCode is not uploaded: Query all acceleration areas by default. |
dataIntervalString | Data granularity:
5m: 5 minute granularity;
1h: 1 hour granularity;
1d: 1 day granularity; Default value is 1d. |
countryCodeList | Country area:
1. countryCode is not uploaded: Query all country areas by default;
2. countryCode is uploaded: Multiple can be uploaded, such as cn, in. Please refer to the appendix description section of the overview page. |
groupByList | Grouped dimension:
1. The optional values are domain, countryCode;Multiple values can be uploaded;
2. If no value is uploaded: Aggregate all data by default. |
| Name | Description |
|---|---|
resultList | |
domainString | Domain |
countryDataList | |
countryCodeString | Country area |
totalRequestString | Total number of requests. |
requestDataList | |
timestampString | Time:
1. When the data query granularity is 5m, then the format is yyyy-MM-dd HH:mm; ach time slice value represents the value within the previous time granularity range. The first time slice of the day is yyyy-MM-dd 00:05, and the last one is (yyyy-MM-dd+1) 00:00;
2. When the data query granularity is 1h, the format is yyyy-MM-dd HH; Each time slice value represents the value within the previous time granularity range. The first time slice of the day is yyyy-MM-dd 01, and the last one is (yyyy-MM-dd+1) 00;
3. When the data query granularity is 1d, the format is yyyy-MM-dd; Each time slice value represents the value of the day;
4. Return the time slices that contained in start time and in end time. |
requestString | Number of requests. |
| Error code(code) | Description(message) | HTTP status | Semantic |
|---|---|---|---|
| NotAcceptable | The accept header specified in your request is not acceptable. | 400 | The accept header specified in your request is not acceptable. |
| InvalidHTTPRequest | There was an error in the body of your HTTP request. | 400 | There was an error in the body of your HTTP request. |
| InvalidDatePeriod | dateFrom or dateTo does not conform to the specification | 400 | dateFrom or dateTo does not conform to the specification |
| DateSpanError | The difference between dateFrom and dateTo exceeds the limit | 400 | The difference between dateFrom and dateTo exceeds the limit |
| DomainsExcessive | The number of domain is excessive once. | 403 | The number of domain is excessive once. |
| PARAM_INVALID | Parameter domain does not comply with the specification | 400 | Parameter domain does not comply with the specification |
| PARAM_INVALID | Parameter dataInterval does not comply with the specification | 400 | Parameter dataInterval does not comply with the specification |
| PARAM_INVALID | Parameter province does not comply with the specification | 400 | Parameter province does not comply with the specification |
| PARAM_INVALID | Parameter isp does not comply with the specification\n | 400 | Parameter isp does not comply with the specification\n |
| PARAM_INVALID | Parameter groupBy does not comply with the specification\n | 400 | Parameter groupBy does not comply with the specification\n |
| InternalError | We encountered an internal error. Please try again. | 500 | We encountered an internal error. Please try again. |
#!/bin/bash
# Please remember to change the param (-H "X-Time-Zone") in this demo to the TimeZone you want in response
username='example_username'
apiKey='example_apiKey'
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.atomile.com/api/report/request/country" \
-X "POST" \
-H "X-Time-Zone:GMT+00:00" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
"dateFrom": "2022-05-19T00:00:00+00:00",
"dateTo": "2022-05-19T20:00:00+00:00",
"domain":["www.test1.com"],
"dataInterval": "5m",
"groupBy": ["domain","countryCode"],
"countryCode": ["cn"]
}'{
"code":"0",
"data":[
{
"countryData":[
{
"countryCode":"cn",
"requestData":[
{
"request":"892668",
"timestamp":"2022-05-19 12:00"
},
{
"request":"1526643",
"timestamp":"2022-05-19 12:05"
},
{
"request":"368738",
"timestamp":"2022-05-19 12:10"
}
],
"totalRequest":"2788049"
}
],
"domain":"www.test1.com"
}
],
"message":"success"
}