universal
Query minute-level back-to-origin bandwidth for multiple domains. Users must provide start and end times, domain(s), and data granularity.The results include bandwidth peak, total back-to-origin traffic, and per-minute back-to-origin bandwidth for each domain.
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. Not later than the current time;
3. Up to 6 months (183 days) of data are available. |
*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 should be greater than the start time. if the end time is greater than the current time, take the current time;
3. dateFrom, dateTo, both are not sent, default query past 24 hours; If only one is not sent, throw exception;
4. Allow maximum query interval: 7 days, i.e., 7 days between dateFrom and dateTo. Do not exceed 7 days. |
*dataIntervalString | Data granularity:
1. Support for 1m (1 minute), 5m (5 minutes), 1h (1 hour);
2. do not pass default 5m.
Data granularity, default to 5m |
*domainList | Domain name:
1. the maximum number of transitive domain names is 50 by default;
2. Automatically filter out illegal domain names (e.g. passing illegal domain names will be filtered out, and the search results will only return the legal domain name data)
3. If left blank, all domain names will be obtained. If the total number of domain names exceeds the upper limit, an error will be reported. |
*regionString | Acceleration Region:
1. If omitted, all regions are queried by default;
2. Currently, only a single region can be specified;
3. Optional values can be found in the appendix section of the Overview page. |
*groupByString | grouped dimension:
1. the optional value is domain;
2. If incoming data is shown in accordance with the dimension. |
| Name | Description |
|---|---|
codeString | Request result status code |
messageString | Request result information |
dataList | Detailed data on request results |
domainString | Domain |
peakValueString | Peak bandwidth Mbps, example (931556.21 Mbps) |
peakTimeString | Peak Time, Example (2019-02-13 18:01) |
totalString | Total return flow, example ( 74099.92 MB ) |
originBandwidthDataList | |
timestampString | The granularity of data is 1 minute, and the format is yyyy-MM-dd HH:MM. |
valueString | Return the source bandwidth value, in Mbps, 2 decimal places reserved. |
| Error code(code) | Description(message) | HTTP status | Semantic |
|---|---|---|---|
| 24102014 | Request body not passed | 400 | Request body not passed |
| 24102013 | Accept request headers are not supported, interfaces only support json and xml formats, default to json format | 400 | Accept request headers are not supported, interfaces only support json and xml formats, default to json format |
| 24102002 | Request Physical Error | 400 | Request Physical Error |
| 24102006 | DateFrom or dateTo non-conformance or illegal time interval | 400 | DateFrom or dateTo non-conformance or illegal time interval |
| 24102007 | DateFrom and dateTo differ by more than the limit | 400 | DateFrom and dateTo differ by more than the limit |
| 24102008 | Parameter domain does not conform to specification | 400 | Parameter domain does not conform to specification |
| 24102008 | Parameter dataInterval does not conform to specification | 400 | Parameter dataInterval does not conform to specification |
| 24102008 | Parameter region does not conform to specification | 400 | Parameter region does not conform to specification |
| 24102008 | Parameter groupBy does not conform to specification | 400 | Parameter groupBy does not conform to specification |
| 24102019 | Number of domain names passed over account limit | 400 | Number of domain names passed over account limit |
| 24102500 | System error occurred | 500 | System error occurred |
#!/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/bandwidth/multi-domain/real-time/origin" \
-X "POST" \
-H "X-Time-Zone:GMT+00:00" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
"dateFrom": "2019-01-01T23:55:00+00:00",
"dateTo": "2019-01-02T00:05:00+00:00",
"domain": ["www.test1.com","www.test2.com"],
"dataInterval": "5m",
"groupBy": "domain"
}'{
"code": "0",
"message": "success",
"data": [
{
"domain": "www.test1.com",
"peakValue": "237.03",
"peakTime": "2019-01-02 00:05",
"total": "33491.47",
"originBandwidthData": [
{
"timestamp": "2019-01-01 23:55",
"value": "212.07"
},
{
"timestamp": "2019-01-02 00:00",
"value": "210.03"
},
{
"timestamp": "2019-01-02 00:05",
"value": "237.03"
}
]
},
{
"domain": "www.test2.com",
"peakValue": "237.03",
"peakTime": "2019-01-02 00:05",
"total": "33491.47",
"originBandwidthData": [
{
"timestamp": "2019-01-01 23:55",
"value": "212.07"
},
{
"timestamp": "2019-01-02 00:00",
"value": "210.03"
},
{
"timestamp": "2019-01-02 00:05",
"value": "237.03"
}
]
}
]
}