Statistics

Available endpoints:
NameMethodPath
post/v3/stats/{type}
post/v3/stats/bandwidth/percentile
post/v3/stats/cdns/{type}
post/v3/stats/datacenters/{type}
post/v3/stats/sum/{type}

Get stats

posthttps://api.cdn77.com/v3/stats/{type}

Request parameters

type
requiredstring in path

Available values:

bandwidth
,
costs
,
headers
,
headers-detail
,
hit-miss
,
hit-miss-detail
,
traffic
,
traffic-detail
,
traffic-miss
,

Request bodyrequired

// request body
{
  "cdn_ids": [
    1234567890
  ],
  "location_ids": [
    "prague"
  ],
  "aggregation": "7-d",
  "from": 1625097600,
  "to": 1625097600
}
cdn_ids
array of integers

List of CDN Resource IDs. Use if you want statistics only for specific CDN Resources. More information in our CDN Resources API documentation.

location_ids
array of strings

List of Datacenters. Use if you want statistics only for specific Datacenters. Example values: "chicago", "los angeles"

aggregation
string

Accepts values in minutes, hours, days or months in the following formatting: 5-m, 1-h, 1-d, 1-month (minutes must be divisible by five)

from
requiredinteger

UNIX Timestamp

to
requiredinteger

UNIX Timestamp

Responses

200Sizes of cached and non-cached served content grouped by CDN IDs (e.g. 1599436800).
// response
{
  "1599436800": {
    "sizeCached": 443741901,
    "sizeNonCached": 1004.1212242332124
  }
}
404Could not get statistics by type without grouping.

Get bandwidth 95th percentile

posthttps://api.cdn77.com/v3/stats/bandwidth/percentile

Request bodyrequired

// request body
{
  "cdn_ids": [
    1234567890
  ],
  "location_ids": [
    "prague"
  ],
  "from": 1625097600,
  "to": 1625097600
}
cdn_ids
array of integers

List of CDN Resource IDs. Use if you want statistics only for specific CDN Resources. More information in our CDN Resources API documentation.

location_ids
array of strings

List of Datacenters. Use if you want statistics only for specific Datacenters. Example values: "chicago", "los angeles"

from
requiredinteger

UNIX Timestamp

to
requiredinteger

UNIX Timestamp

Responses

200Bandwidth 95th percentile returned.
// response
{
  "percentile": 12346
}
404Could not get Statistics. For specific error message check the request response.

Get stats by CDN Resource

posthttps://api.cdn77.com/v3/stats/cdns/{type}

Request parameters

type
requiredstring in path

Available values:

bandwidth
,
costs
,
headers
,
headers-detail
,
hit-miss
,
hit-miss-detail
,
traffic
,
traffic-detail
,
traffic-miss
,

Request bodyrequired

// request body
{
  "cdn_ids": [
    1234567890
  ],
  "location_ids": [
    "prague"
  ],
  "aggregation": "7-d",
  "from": 1625097600,
  "to": 1625097600
}
cdn_ids
array of integers

List of CDN Resource IDs. Use if you want statistics only for specific CDN Resources. More information in our CDN Resources API documentation.

location_ids
array of strings

List of Datacenters. Use if you want statistics only for specific Datacenters. Example values: "chicago", "los angeles"

aggregation
string

Accepts values in minutes, hours, days or months in the following formatting: 5-m, 1-h, 1-d, 1-month (minutes must be divisible by five)

from
requiredinteger

UNIX Timestamp

to
requiredinteger

UNIX Timestamp

Responses

200Statistics grouped by resource returned.
// response
{
  "1234567890": {
    "1599436800": {
      "sizeCached": 443741901,
      "sizeNonCached": 1004.1212242332124
    }
  }
}
404Could not get statistics grouped by resource.

Get stats by datacenter

posthttps://api.cdn77.com/v3/stats/datacenters/{type}

Request parameters

type
requiredstring in path

Available values:

bandwidth
,
costs
,
headers
,
headers-detail
,
hit-miss
,
hit-miss-detail
,
traffic
,
traffic-detail
,
traffic-miss
,

Request bodyrequired

// request body
{
  "cdn_ids": [
    1234567890
  ],
  "location_ids": [
    "prague"
  ],
  "aggregation": "7-d",
  "from": 1625097600,
  "to": 1625097600
}
cdn_ids
array of integers

List of CDN Resource IDs. Use if you want statistics only for specific CDN Resources. More information in our CDN Resources API documentation.

location_ids
array of strings

List of Datacenters. Use if you want statistics only for specific Datacenters. Example values: "chicago", "los angeles"

aggregation
string

Accepts values in minutes, hours, days or months in the following formatting: 5-m, 1-h, 1-d, 1-month (minutes must be divisible by five)

from
requiredinteger

UNIX Timestamp

to
requiredinteger

UNIX Timestamp

Responses

200Statistics by type grouped by datacenters returned.
// response
{
  "NA": {
    "los angeles": {
      "1234567890": {
        "sizeCached": 443741901,
        "sizeNonCached": 1004.1212242332124
      }
    }
  }
}
404Could not get Statistics. For specific error message check the request response.

Get sum

posthttps://api.cdn77.com/v3/stats/sum/{type}

Request parameters

type
requiredstring in path

Available values:

bandwidth
,
costs
,
headers
,
headers-detail
,
hit-miss
,
hit-miss-detail
,
traffic
,
traffic-detail
,
traffic-miss
,

Request bodyrequired

// request body
{
  "cdn_ids": [
    1234567890
  ],
  "location_ids": [
    "prague"
  ],
  "aggregation": "7-d",
  "from": 1625097600,
  "to": 1625097600
}
cdn_ids
array of integers

List of CDN Resource IDs. Use if you want statistics only for specific CDN Resources. More information in our CDN Resources API documentation.

location_ids
array of strings

List of Datacenters. Use if you want statistics only for specific Datacenters. Example values: "chicago", "los angeles"

aggregation
string

Accepts values in minutes, hours, days or months in the following formatting: 5-m, 1-h, 1-d, 1-month (minutes must be divisible by five)

from
requiredinteger

UNIX Timestamp

to
requiredinteger

UNIX Timestamp

Responses

200Statistics sum returned.
// response
{
  "sum": 0
}
404Could not get statistics sum.