---
title: "Get Cdn usages statistics"
method: GET
path: "/statistics/cdn-usages"
tags: ["Statistics"]
---

# Get Cdn usages statistics

`GET /statistics/cdn-usages`

## Request

- Base URL: `https://api.kontainer.com/jsonapi/v2`
- URL: `https://api.kontainer.com/jsonapi/v2/statistics/cdn-usages`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/kontainer/apis/kontainer-api-documentation/docs/statistics/cdn-usages/get.ts> (a function with typed inputs; its response is checked against the schema)

### 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.

## Query parameters

- `filter` object
  - `filter` object
    - `date` object
      - `gte` string, date
    - `file` object
      - `eq` integer
- `page` Pagination
  - `page` object
    - `number` integer
    - `size` integer
- `sort` 'date' | '-date' | 'referer' | '-referer' | 'file' | '-file' | 'file_name' | '-file_name' | 'folder_name' | '-folder_name'

## Response `200`

success

- CdnStatisticsCollection
  - `data` CdnStatistic[]
    - `type` 'cdn_statistics'
    - `attributes` CdnStatisticAttributes
      - `referer` string
      - `date` string, date: Day the requests were logged on, as `Y-m-d`, in the timezone of the authenticated user, falling back to the client timezone and then the application default.
      - `file_id` integer
      - `file_name` string
      - `folder_name` string
      - `folder_id` integer
      - `request_count` integer
      - `log_type` string
  - `links` PaginatedCollectionLinks
    - `self` string, uri, required
    - `first` string, uri, required
    - `last` string, uri, required
    - `prev` string, uri, nullable, required
    - `next` string, uri, nullable, required
  - `meta` PaginatedCollectionMeta
    - `total` integer, required
    - `count` integer, required
    - `per_page` integer, required
    - `current_page` integer, required
    - `total_pages` integer, required
    - `filter` union, required: The `filter` query parameter echoed back as sent; an empty array when none was sent
      - object
      - unknown[]
        - unknown
    - `sort` string, nullable, required

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/kontainer/apis/kontainer-api-documentation.md) - [All operations](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/revisions/b80a5167e09a?raw)
