Statistics

Get Cdn usages statistics

Filtering

Filters can be applied to limit the results that are returned. Filters are applied using the "filter" query parameter. Available filters are:

date (eq, lte, gte)

file (eq)

Example:

{
    "filter": {
        "date": {
            "gte": "2010-04-01",
            "lte": "2010-04-30"
        },
        "file": {
            "eq": 5678
        },
    }
}

The date filter accepts Y-m-d and ISO-8601. Statistics are aggregated per day, so an ISO-8601 value carrying a UTC designator or a UTC offset is converted to the application timezone and reduced to its date.

get/statistics/cdn-usages

Request

Query parameters

Search filters to be applied

{
  "filter": {
    "date": {
      "gte": "2010-04-01"
    },
    "file": {
      "eq": 5678
    }
  }
}

Pagination

{
  "page": {
    "number": 1,
    "size": 30
  }
}
sort'date' | '-date' | 'referer' | '-referer' | 'file' | '-file' | 'file_name' | '-file_name' | 'folder_name' | '-folder_name'

Sorting options { field_name } or { -field_name } for descending order

Response

success

Example response

{
  "data": [
    {
      "type": "cdn_statistics",
      "attributes": {
        "referer": "https://tacos.com",
        "date": "2024-01-31",
        "file_id": 1799,
        "file_name": "godfather.png",
        "folder_name": "Corleone",
        "folder_id": 2544,
        "request_count": 223,
        "log_type": "CDN"
      }
    }
  ],
  "links": {
    "self": "https://example.kontainer.com/jsonapi/v2/statistics/logins?page%5Bnumber%5D=2",
    "first": "https://example.kontainer.com/jsonapi/v2/statistics/logins?page%5Bnumber%5D=1",
    "last": "https://example.kontainer.com/jsonapi/v2/statistics/logins?page%5Bnumber%5D=30",
    "prev": "https://example.kontainer.com/jsonapi/v2/statistics/logins?page%5Bnumber%5D=1",
    "next": "https://example.kontainer.com/jsonapi/v2/statistics/logins?page%5Bnumber%5D=3"
  },
  "meta": {
    "total": 870,
    "count": 30,
    "per_page": 30,
    "current_page": 2,
    "total_pages": 29,
    "sort": "-date"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.