Statistics
Get upload 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, 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.
get/statistics/uploads
Request
- Base URLhttps://api.kontainer.com/jsonapi/v2
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Search filters to be applied
{
"filter": {
"date": {
"gte": "2010-04-01",
"lt": "2010-04-30"
},
"user": {
"eq": 1234
},
"file": {
"eq": 5678
},
"folder": {
"eq": 91011
},
"extension": {
"eq": "pdf"
}
}
}Pagination
{
"page": {
"number": 1,
"size": 30
}
}sort'date' | '-date' | 'user_name' | '-user_name' | 'organization' | '-organization' | 'file_name' | '-file_name' | 'folder_name' | '-folder_name' | 'ip_address' | '-ip_address'
Sorting options { field_name } or { -field_name } for descending order
Response
success
Example response
{
"data": [
{
"type": "upload_statistic",
"id": "1234",
"attributes": {
"date": "2024-01-31 09:55:41",
"action": "user_login",
"user_name": "Luca Brasi",
"user_id": "220",
"organization": "Corleone Group",
"ip_address": "127.0.0.1",
"file_id": 1799,
"file_name": "godfather.png",
"file_extension": "png",
"folder_id": 2544,
"folder_name": "Corleone"
}
}
],
"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.