---
title: "Get upload statistics"
method: GET
path: "/statistics/uploads"
tags: ["Statistics"]
---

# Get upload statistics

`GET /statistics/uploads`

## Request

- Base URL: `https://api.kontainer.com/jsonapi/v2`
- URL: `https://api.kontainer.com/jsonapi/v2/statistics/uploads`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/kontainer/apis/kontainer-api-documentation/docs/statistics/uploads/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, lt, lte, gt, gte)

**user** (eq)

**file** (eq)

**folder** (eq)

**extension** (eq)

#### Example:
```
{
    "filter": {
        "date": {
            "gte": "2010-04-01",
            "lt": "2010-04-30"
        },
        "user": {
            "eq": 1234
        },
        "file": {
            "eq": 5678
        },
        "folder": {
            "eq": 91011
        },
        "extension": {
            "eq": "pdf"
        }
    }
}
```

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
      - `lt` string, date
    - `user` object
      - `eq` integer
    - `file` object
      - `eq` integer
    - `folder` object
      - `eq` integer
    - `extension` object
      - `eq` string
- `page` Pagination
  - `page` object
    - `number` integer
    - `size` integer
- `sort` 'date' | '-date' | 'user_name' | '-user_name' | 'organization' | '-organization' | 'file_name' | '-file_name' | 'folder_name' | '-folder_name' | 'ip_address' | '-ip_address'

## Response `200`

success

- UploadStatisticsCollection
  - `data` UploadStatistic[]
    - `type` string
    - `id` string
    - `attributes` UploadStatisticAttributes
      - `date` string: Local time of the event as `Y-m-d H:i:s`, without a UTC offset, in the timezone of the authenticated user, falling back to the client timezone and then the application default.
      - `action` string
      - `user_name` string
      - `user_id` string
      - `organization` string
      - `ip_address` string
      - `file_id` integer
      - `file_name` string
      - `file_extension` string
      - `folder_id` integer
      - `folder_name` 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)
