Various endpoints retrieve real-time statistics by edge CNAME. These endpoints vary according to how real-time statistics are reported. Determine which endpoint is right for you by cross-referencing your answers to the following questions with the endpoint comparison table.
The response structure varies across these endpoints. This difference does not affect the provided feature set.
Endpoint | Country |
POP |
Timestamp |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
Reports the following real-time statistics
As indicated above, real-time statistics may be reported on a per edge CNAME basis. This type of data is only reported for edge CNAME configurations where the Custom Reports option has been enabled.
The response may be filtered by one or more of the following criteria:
Learn how real-time statistics are calculated.
A request to retrieve real-time statistics is described below.
HTTP Method | Request URI |
---|---|
GET |
https://api.edgecast.com/v2/reporting/customers/AccountNumber/countryrealtimestats/Platform?cname=EdgeCNAME&country=CountryCode |
Define the following variables when submitting the above request:
VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3). | Description |
---|---|
Required |
|
Required |
Replace this variable with the platform for which real-time statistics will be reported. Valid values are:
|
Replace this variable with the name of the edge CNAME for which real-time statistics will be returned. Please verify that the case of the specified value matches the name assigned to the edge CNAME configuration. Example: ?cname=cdn.example.com
|
|
Replace this variable with the ISO 3166 code corresponding to the country for which real-time statistics will be returned. A list of country codes is available from the Country Codes (ISO 3166) article in the CDN Help Center. Example: &country=US
|
This endpointIdentifies a request's connection point to our REST API service. only takes advantage of common request headers.
Request body parameters are not required by this endpoint.
The response to the above request includes an HTTP status code, response headers, and a response body.
A status code indicates whether the request was successfully performed.
The response for this endpoint only includes standard HTTP response headers.
The response body for a successful request that does not filter data contains response parameters that report statistics for:
Total real-time statistics
Find a Countries object whose Country member is set to a blank value. In this object, look for a RTStats object whose Cname member is set to "Total."
{
"Timestamp": "01\/28\/2024 22:00:29",
"Countries": [{
"CountryCode": "",
"Country": "",
"RTStats": [{
"ReportCode": "",
"CName": "Total",
...
Total real-time statistics for each edge CNAME
Find a Countries object whose Country member is set to a blank value. In this object, look for each RTStats object whose Cname member is set to a value other than "Total" (e.g., cdn.example.com).
{
"Timestamp": "01\/28\/2024 22:00:29",
"Countries": [{
"CountryCode": "",
"Country": "",
"RTStats": [{
"ReportCode": "10001",
"CName": "cdn.example.com",
...
Total real-time statistics for each country
Find a Countries object whose Country member is set to a value (e.g., United States). In this object, look for a RTStats object whose Cname member is set to "Total."
{
"Timestamp": "01\/28\/2024 22:00:29",
"Countries": [{
"CountryCode": "US",
"Country": "United States",
"RTStats": [{
"ReportCode": "",
"CName": "Total",
...
Country-specific real-time statistics broken down by edge CNAME
Find a Countries object whose Country member is set to a value (e.g., United States). In this object, look for each RTStats object whose Cname member is set to a value other than "Total" (e.g., cdn.example.com).
{
"Timestamp": "01\/28\/2024 22:00:29",
"Countries": [{
"CountryCode": "US",
"Country": "United States",
"RTStats": [{
"ReportCode": "10001",
"CName": "cdn.example.com",
...
Countries or edge CNAMEs through which traffic is not being served will be omitted from the response.
Name | Data Type | Description |
---|---|---|
Timestamp |
String |
Identifies the date and time for which real-time statistics was reported. Format: MM\/DD\/YYYY hh:mm:ss Time is indicated using 24-hour clock notation in UTC. |
Countries |
Array |
Contains real-time statistics for each country through which traffic was served. |
CountryCode |
String |
Countries array Indicates the scope for the RTStats array. Valid values are:
|
Country |
String |
Countries array Indicates the scope for the RTStats array. Valid values are:
|
RTStats |
Array |
Countries array This response parameter contains summarized and country-specific real-time statistics for each qualifying edge CNAME. The scope for these statistics is determined by the Country response parameter. |
ReportCode |
String |
Countries array > RTStats array Determines the scope for which real-time statistics will be reported. Valid values are:
|
CName |
String |
Countries array > RTStats array Determines the scope for which real-time statistics will be reported. Valid values are:
|
BW |
Number floating-point |
Countries array > RTStats array Indicates bandwidth, in bytes per second, for the scope defined by the Country and CName response parameters. |
CONN |
Number floating-point |
Countries array > RTStats array Indicates the number of new connections per second for the scope defined by the Country and CName response parameters. |
HITS |
Number floating-point |
Countries array > RTStats array Indicates the number of hits per second for the scope defined by the Country and CName response parameters. |
CacheStats |
Array |
Countries array > RTStats array This response parameter contains real-time statistics for cache status codes. |
Key |
String |
Countries array > RTStats array > CacheStats array Identifies a cache status code for which real-time statistics will be reported. Valid values are:
|
Value |
Number floating-point |
Countries array > RTStats array > CacheStats array Indicates the number of requests per second that resulted in the cache status code identified by the Key response parameter for the scope defined by the Country and CName response parameters. |
HttpStatuses |
Array |
Countries array > RTStats array This response parameter contains real-time statistics for HTTP status codes. |
Key |
String |
Countries array > RTStats array > HTTPStatuses array Identifies a HTTP status code for which real-time statistics will be reported. Valid values are:
|
Value |
Number floating-point |
Countries array > RTStats array > HTTPStatuses array Indicates the number of requests per second that resulted in the HTTP status code identified by the Key response parameter for the scope defined by the Country and CName response parameters. |
The response body for an unsuccessful request may contain an error parameter that provides additional information.
A sample JSON request is provided below.
GET https://api.edgecast.com/v2/reporting/customers/0001/countryrealtimestats/adn?cname=cdn.example.com&country=us/1.1
Authorization: TOK:12345678-1234-1234-1234-1234567890ab
Accept: application/json
Host:api.edgecast.com
A sample JSON response is provided below.
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Date: Thu, 15 Apr 2021 12:00:00 GMT
Content-Length: 942
{
"Timestamp": "01\/18\/2024 22:00:29",
"Countries": [{
"CountryCode": "US",
"Country": "United States",
"RTStats": [{
"ReportCode": "10012",
"CName": "cdn.example.com",
"BW": 57137424356.900772,
"CONN": 6256.201794999999,
"HITS": 103441.41254399999,
"CacheStats": [{
"Key": "cache.hit",
"Value": 103055.56026999999
}, {
"Key": "cache.miss",
"Value": 4.2333339999999993
}, {
"Key": "cache.none",
"Value": 329.719241
}, {
"Key": "cache.xphit",
"Value": 0.650001
}, {
"Key": "cache.xpmiss",
"Value": 0.016667
}
],
"HttpStatuses": [{
"Key": "http.2xx",
"Value": 103306.54617099995
}, {
"Key": "http.403",
"Value": 134.166676
}, {
"Key": "http.304",
"Value": 0.7
}
]
}
]
}
]
}