Statistics

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

Get stats

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

Request parameters

typerequiredstring in path

Available values: bandwidth,costs,headers,headers-detail,hit-miss,hit-miss-detail,traffic,traffic-detail,traffic-miss,

Request bodyrequired

// example of the request body
{
  "cdn_ids": [
    1234567890
  ],
  "location_ids": [
    "prague"
  ],
  "aggregation": "7-d",
  "from": 1625097600,
  "to": 1625097600
}
cdn_idsarray 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_idsarray of strings

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

aggregationstring

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)

fromrequiredinteger

UNIX Timestamp

torequiredinteger

UNIX Timestamp

Responses

200Sizes of cached and non-cached served content.

// example of the 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

// example of the request body
{
  "cdn_ids": [
    1234567890
  ],
  "location_ids": [
    "prague"
  ],
  "from": 1625097600,
  "to": 1625097600
}
cdn_idsarray 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_idsarray of strings

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

fromrequiredinteger

UNIX Timestamp

torequiredinteger

UNIX Timestamp

Responses

200Bandwidth 95th percentile returned.

// example of the response
{
  "percentile": 12346
}

404Could not get Statistics. For specific error message check the request response.

Get stats per CDN Resource

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

Request parameters

typerequiredstring in path

Available values: bandwidth,costs,headers,headers-detail,hit-miss,hit-miss-detail,traffic,traffic-detail,traffic-miss,

Request bodyrequired

// example of the request body
{
  "cdn_ids": [
    1234567890
  ],
  "location_ids": [
    "prague"
  ],
  "aggregation": "7-d",
  "from": 1625097600,
  "to": 1625097600
}
cdn_idsarray 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_idsarray of strings

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

aggregationstring

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)

fromrequiredinteger

UNIX Timestamp

torequiredinteger

UNIX Timestamp

Responses

200Statistics grouped by resource returned.

// example of the response
{
  "1234567890": {
    "1599436800": {
      "sizeCached": 443741901,
      "sizeNonCached": 1004.1212242332124
    }
  }
}

404Could not get statistics grouped by resource.

Get sum per CDN Resource

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

Request parameters

typerequiredstring in path

Available values: headers,traffic,hit-miss,costs,

Request bodyrequired

// example of the request body
{
  "cdn_ids": [
    1234567890
  ],
  "location_ids": [
    "prague"
  ],
  "from": 1625097600,
  "to": 1625097600
}
cdn_idsarray 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_idsarray of strings

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

fromrequiredinteger

UNIX Timestamp

torequiredinteger

UNIX Timestamp

Responses

200Statistics sum per CDN Resource returned.

// example of the response
{
  "1234567890": {
    "sum": 0
  }
}

404Could not get statistics sum per CDN Resource.

Get stats per data center

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

Request parameters

typerequiredstring in path

Available values: bandwidth,costs,headers,headers-detail,hit-miss,hit-miss-detail,traffic,traffic-detail,traffic-miss,

Request bodyrequired

// example of the request body
{
  "cdn_ids": [
    1234567890
  ],
  "location_ids": [
    "prague"
  ],
  "aggregation": "7-d",
  "from": 1625097600,
  "to": 1625097600
}
cdn_idsarray 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_idsarray of strings

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

aggregationstring

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)

fromrequiredinteger

UNIX Timestamp

torequiredinteger

UNIX Timestamp

Responses

200Statistics by type grouped by datacenters returned.

// example of the response
{
  "NA": {
    "los angeles": {
      "1234567890": {
        "sizeCached": 443741901,
        "sizeNonCached": 1004.1212242332124
      }
    }
  }
}

404Could not get Statistics. For specific error message check the request response.

Get sum per data center

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

Request parameters

typerequiredstring in path

Available values: headers,traffic,hit-miss,costs,

Request bodyrequired

// example of the request body
{
  "cdn_ids": [
    1234567890
  ],
  "location_ids": [
    "prague"
  ],
  "from": 1625097600,
  "to": 1625097600
}
cdn_idsarray 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_idsarray of strings

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

fromrequiredinteger

UNIX Timestamp

torequiredinteger

UNIX Timestamp

Responses

200Statistics sum per datacenter returned.

// example of the response
{
  "NA": {
    "los angeles": {
      "sum": 0
    }
  }
}

404Could not get statistics sum per datacenter.

Get sum

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

Request parameters

typerequiredstring in path

Available values: headers,traffic,hit-miss,costs,

Request bodyrequired

// example of the request body
{
  "cdn_ids": [
    1234567890
  ],
  "location_ids": [
    "prague"
  ],
  "from": 1625097600,
  "to": 1625097600
}
cdn_idsarray 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_idsarray of strings

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

fromrequiredinteger

UNIX Timestamp

torequiredinteger

UNIX Timestamp

Responses

200Statistics sum returned.

// example of the response
{
  "sum": 0
}

404Could not get statistics sum.