Skip to main content
Contents

Analytics

Traffic, cache and error reports from the same data as the portal dashboards.

Examples marked as generated are built from the schema with synthetic values.

GET/api/v2/analytics/traffic

Traffic report

Returns traffic series and totals for a period (requests, bytes, cache hits, errors and latency), optionally grouped by site, edge location, country or status and compared with the previous period. Use format=csv to export. Missing data is reported as incomplete, never as zeros.

Authentication
API token or portal session
Required permission
Not declared in the contract

Parameters

Parameters getAnalyticsTraffic
NameInTypeRequiredRules
fromQuerystringYes
  • Format: date-time
toQuerystringYes
  • Format: date-time
granularityQuerystringNo
  • One of: auto, minute, hour, day, month
  • Default: auto
group_byQuerystringNo
  • One of: site, pop, region, country, cache_status, status, status_class, protocol, tls_version
site_idQuerystringNo
pop_idQuerystringNo
regionQuerystringNo
countryQuerystringNo
cache_statusQuerystringNo
status_classQuerystringNo
protocolQuerystringNo
compareQuerystringNo
  • One of: none, previous_period
  • Default: none
include_legacyQuerybooleanNo
  • Default: false
formatQuerystringNo
  • One of: json, csv
  • Default: json

Responses

  • 200OKapplication/json

    Headers: X-CDNify-Data-Complete

    Fields (108)
    Responses getAnalyticsTraffic 200
    FieldTypeRequiredRules
    fromstringNo
    • Format: date-time
    tostringNo
    • Format: date-time
    granularitystringNo
    group_bystringNo
    kindstringNo
    • One of: observed, aggregated
    totalsobjectNo
    totals.requestsintegerNo
    totals.bytes_sentintegerNo
    totals.bytes_receivedintegerNo
    totals.origin_requestsintegerNo
    totals.cached_requestsintegerNo
    totals.cached_bytesintegerNo
    totals.error_requestsintegerNo
    totals.server_error_requestsintegerNo
    totals.hit_rationumberNo
    • Can be null
    totals.byte_hit_rationumberNo
    • Can be null
    totals.error_ratenumberNo
    • Can be null
    totals.latency_avg_msnumberNo
    • Can be null
    totals.latency_p50_msnumberNo
    • Can be null
    totals.latency_p95_msnumberNo
    • Can be null
    totals.latency_p99_msnumberNo
    • Can be null
    totals.origin_latency_p50_msnumberNo
    • Can be null
    totals.origin_latency_p95_msnumberNo
    • Can be null
    totals.origin_latency_p99_msnumberNo
    • Can be null
    totals.latency_kindstringNo
    • One of: estimated
    seriesarray<object>No
    series[].requestsintegerNo
    series[].bytes_sentintegerNo
    series[].bytes_receivedintegerNo
    series[].origin_requestsintegerNo
    series[].cached_requestsintegerNo
    series[].cached_bytesintegerNo
    series[].error_requestsintegerNo
    series[].server_error_requestsintegerNo
    series[].hit_rationumberNo
    • Can be null
    series[].byte_hit_rationumberNo
    • Can be null
    series[].error_ratenumberNo
    • Can be null
    series[].latency_avg_msnumberNo
    • Can be null
    series[].latency_p50_msnumberNo
    • Can be null
    series[].latency_p95_msnumberNo
    • Can be null
    series[].latency_p99_msnumberNo
    • Can be null
    series[].origin_latency_p50_msnumberNo
    • Can be null
    series[].origin_latency_p95_msnumberNo
    • Can be null
    series[].origin_latency_p99_msnumberNo
    • Can be null
    series[].latency_kindstringNo
    • One of: estimated
    series[].bucketstringNo
    • Format: date-time
    series[].groupstringNo
    series[].kindstringNo
    • One of: observed, aggregated, estimated
    series[].sourcestringNo
    • One of: next, legacy
    groupsarray<object>No
    groups[].requestsintegerNo
    groups[].bytes_sentintegerNo
    groups[].bytes_receivedintegerNo
    groups[].origin_requestsintegerNo
    groups[].cached_requestsintegerNo
    groups[].cached_bytesintegerNo
    groups[].error_requestsintegerNo
    groups[].server_error_requestsintegerNo
    groups[].hit_rationumberNo
    • Can be null
    groups[].byte_hit_rationumberNo
    • Can be null
    groups[].error_ratenumberNo
    • Can be null
    groups[].latency_avg_msnumberNo
    • Can be null
    groups[].latency_p50_msnumberNo
    • Can be null
    groups[].latency_p95_msnumberNo
    • Can be null
    groups[].latency_p99_msnumberNo
    • Can be null
    groups[].origin_latency_p50_msnumberNo
    • Can be null
    groups[].origin_latency_p95_msnumberNo
    • Can be null
    groups[].origin_latency_p99_msnumberNo
    • Can be null
    groups[].latency_kindstringNo
    • One of: estimated
    groups[].groupstringNo
    comparisonobjectNo
    comparison.fromstringNo
    • Format: date-time
    comparison.tostringNo
    • Format: date-time
    comparison.totalsobjectNo
    comparison.totals.requestsintegerNo
    comparison.totals.bytes_sentintegerNo
    comparison.totals.bytes_receivedintegerNo
    comparison.totals.origin_requestsintegerNo
    comparison.totals.cached_requestsintegerNo
    comparison.totals.cached_bytesintegerNo
    comparison.totals.error_requestsintegerNo
    comparison.totals.server_error_requestsintegerNo
    comparison.totals.hit_rationumberNo
    • Can be null
    comparison.totals.byte_hit_rationumberNo
    • Can be null
    comparison.totals.error_ratenumberNo
    • Can be null
    comparison.totals.latency_avg_msnumberNo
    • Can be null
    comparison.totals.latency_p50_msnumberNo
    • Can be null
    comparison.totals.latency_p95_msnumberNo
    • Can be null
    comparison.totals.latency_p99_msnumberNo
    • Can be null
    comparison.totals.origin_latency_p50_msnumberNo
    • Can be null
    comparison.totals.origin_latency_p95_msnumberNo
    • Can be null
    comparison.totals.origin_latency_p99_msnumberNo
    • Can be null
    comparison.totals.latency_kindstringNo
    • One of: estimated
    comparison.changeobjectNo
    comparison.change.*numberNo
    projectionobjectNo
    projection.kindstringNo
    • One of: estimated
    projection.requestsintegerNo
    projection.bytes_sentintegerNo
    completenessobjectNo
    completeness.completebooleanNo
    completeness.data_available_fromstringNo
    • Format: date-time
    • Can be null
    completeness.rollup_pending_fromstringNo
    • Format: date-time
    completeness.missingarray<object>No
    completeness.missing[].fromstringNo
    • Format: date-time
    completeness.missing[].tostringNo
    • Format: date-time
    completeness.missing[].reasonstringNo
    • One of: no_data_yet, before_coverage, before_coverage_legacy_included, future, pop_delayed, aggregation_pending
    completeness.missing[].pop_idstringNo
    Example (generated from the schema)
    {
      "from": "2026-01-15T10:00:00Z",
      "to": "2026-01-15T10:00:00Z",
      "granularity": "string",
      "group_by": "string",
      "kind": "observed",
      "totals": {
        "requests": 1,
        "bytes_sent": 1,
        "bytes_received": 1,
        "origin_requests": 1,
        "cached_requests": 1,
        "cached_bytes": 1,
        "error_requests": 1,
        "server_error_requests": 1,
        "hit_ratio": 1,
        "byte_hit_ratio": 1,
        "error_rate": 1,
        "latency_avg_ms": 1,
        "latency_p50_ms": 1,
        "latency_p95_ms": 1,
        "latency_p99_ms": 1,
        "origin_latency_p50_ms": 1,
        "origin_latency_p95_ms": 1,
        "origin_latency_p99_ms": 1,
        "latency_kind": "estimated"
      },
      "series": [
        {
          "requests": 1,
          "bytes_sent": 1,
          "bytes_received": 1,
          "origin_requests": 1,
          "cached_requests": 1,
          "cached_bytes": 1,
          "error_requests": 1,
          "server_error_requests": 1,
          "hit_ratio": 1,
          "byte_hit_ratio": 1,
          "error_rate": 1,
          "latency_avg_ms": 1,
          "latency_p50_ms": 1,
          "latency_p95_ms": 1,
          "latency_p99_ms": 1,
          "origin_latency_p50_ms": 1,
          "origin_latency_p95_ms": 1,
          "origin_latency_p99_ms": 1,
          "latency_kind": "estimated",
          "bucket": "2026-01-15T10:00:00Z",
          "group": "string",
          "kind": "observed",
          "source": "next"
        }
      ],
      "groups": [
        {
          "requests": 1,
          "bytes_sent": 1,
          "bytes_received": 1,
          "origin_requests": 1,
          "cached_requests": 1,
          "cached_bytes": 1,
          "error_requests": 1,
          "server_error_requests": 1,
          "hit_ratio": 1,
          "byte_hit_ratio": 1,
          "error_rate": 1,
          "latency_avg_ms": 1,
          "latency_p50_ms": 1,
          "latency_p95_ms": 1,
          "latency_p99_ms": 1,
          "origin_latency_p50_ms": 1,
          "origin_latency_p95_ms": 1,
          "origin_latency_p99_ms": 1,
          "latency_kind": "estimated",
          "group": "string"
        }
      ],
      "comparison": {
        "from": "2026-01-15T10:00:00Z",
        "to": "2026-01-15T10:00:00Z",
        "totals": {
          "requests": 1,
          "bytes_sent": 1,
          "bytes_received": 1,
          "origin_requests": 1,
          "cached_requests": 1,
          "cached_bytes": 1,
          "error_requests": 1,
          "server_error_requests": 1,
          "hit_ratio": 1,
          "byte_hit_ratio": 1,
          "error_rate": 1,
          "latency_avg_ms": 1,
          "latency_p50_ms": 1,
          "latency_p95_ms": 1,
          "latency_p99_ms": 1,
          "origin_latency_p50_ms": 1,
          "origin_latency_p95_ms": 1,
          "origin_latency_p99_ms": 1,
          "latency_kind": "estimated"
        },
        "change": {
          "key": 1
        }
      },
      "projection": {
        "kind": "estimated",
        "requests": 1,
        "bytes_sent": 1
      },
      "completeness": {
        "complete": false,
        "data_available_from": "2026-01-15T10:00:00Z",
        "rollup_pending_from": "2026-01-15T10:00:00Z",
        "missing": [
          {
            "from": "2026-01-15T10:00:00Z",
            "to": "2026-01-15T10:00:00Z",
            "reason": "no_data_yet",
            "pop_id": "pop_example"
          }
        ]
      }
    }
  • 401Unauthorized

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/unauthenticated",
      "title": "Authentication required",
      "status": 401,
      "code": "unauthenticated",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbidden

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/forbidden",
      "title": "Access denied",
      "status": 403,
      "code": "forbidden",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 404Not found

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/not_found",
      "title": "Not found",
      "status": 404,
      "code": "not_found",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable content

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 503Service unavailable

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/service_unavailable",
      "title": "Service unavailable",
      "status": 503,
      "code": "service_unavailable",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
curl
curl 'https://api.cdnify.lat/api/v2/analytics/traffic?from=2026-01-15T10%3A00%3A00Z&to=2026-01-15T10%3A00%3A00Z' \
  -H "Authorization: Bearer $CDNIFY_API_TOKEN"
GET/api/v2/analytics/top-paths

Most requested paths

Returns the most requested paths of a period, without query strings. The counts are approximate.

Authentication
API token or portal session
Required permission
Not declared in the contract

Parameters

Parameters getAnalyticsTopPaths
NameInTypeRequiredRules
fromQuerystringYes
  • Format: date-time
toQuerystringYes
  • Format: date-time
site_idQuerystringNo
limitQueryintegerNo
  • Minimum 1
  • Maximum 20
  • Default: 20

Responses

  • 200OKapplication/json

    Fields (8)
    Responses getAnalyticsTopPaths 200
    FieldTypeRequiredRules
    fromstringNo
    • Format: date-time
    tostringNo
    • Format: date-time
    approximatebooleanNo
    kindstringNo
    pathsarray<object>No
    paths[].pathstringNo
    paths[].requestsintegerNo
    paths[].bytes_sentintegerNo
    Example (generated from the schema)
    {
      "from": "2026-01-15T10:00:00Z",
      "to": "2026-01-15T10:00:00Z",
      "approximate": false,
      "kind": "string",
      "paths": [
        {
          "path": "string",
          "requests": 1,
          "bytes_sent": 1
        }
      ]
    }
curl
curl 'https://api.cdnify.lat/api/v2/analytics/top-paths?from=2026-01-15T10%3A00%3A00Z&to=2026-01-15T10%3A00%3A00Z' \
  -H "Authorization: Bearer $CDNIFY_API_TOKEN"
GET/api/v2/analytics/usage

Usage of a period

Returns the bytes sent and the requests of a period, from the same data as the dashboards.

Authentication
API token or portal session
Required permission
Not declared in the contract

Parameters

Parameters getAnalyticsUsage
NameInTypeRequiredRules
fromQuerystringYes
  • Format: date-time
toQuerystringYes
  • Format: date-time

Responses

  • 200OKapplication/json

    Fields (6)
    Responses getAnalyticsUsage 200
    FieldTypeRequiredRules
    fromstringNo
    • Format: date-time
    tostringNo
    • Format: date-time
    bytes_sentintegerNo
    requestsintegerNo
    non_cached_bytesintegerNo
    completenessobjectNo
    Example (generated from the schema)
    {
      "from": "2026-01-15T10:00:00Z",
      "to": "2026-01-15T10:00:00Z",
      "bytes_sent": 1,
      "requests": 1,
      "non_cached_bytes": 1,
      "completeness": {}
    }
curl
curl 'https://api.cdnify.lat/api/v2/analytics/usage?from=2026-01-15T10%3A00%3A00Z&to=2026-01-15T10%3A00%3A00Z' \
  -H "Authorization: Bearer $CDNIFY_API_TOKEN"