API Reference/api/stats

/api/stats

Info

GET
Get current statistics

Query

Field NameTypeDescription
amountnumberThe amount of stats to get

200
Ok (JSON Array)

Field NameTypeDescription
idnumberid of the stats object
createdAtdateThe date the stats object was created
dataobjectThe stats data
max_timestampdateThe max timestamp of the stats data

Data

Field NameTypeDescription
sizestringHuman readable size of uploads
size_numnumberSize of uploads in bytes
countnumberTotal number of files
count_usersnumberTotal number of users
views_countnumberTotal number of views
types_countobjectCount of each mimetype
count_by_userobjectCount of each user
Types Count
Field NameTypeDescription
mimetypenumberThe mimetype
countnumberThe count of the mimetype
Count By User
Field NameTypeDescription
usernamenumberThe username
countnumberThe count
[
{
"id": 454,
"createdAt": "2022-12-02T00:18:31.955Z",
"data": {
"size": "318.5 MB",
"count": 471,
"size_num": 333996722,
"count_users": 14,
"types_count": [
{
"count": 210,
"mimetype": "image/png"
},
{
"count": 119,
"mimetype": "application/octet-stream"
}
],
"views_count": 5842,
"count_by_user": []
},
"max_timestamp": "2022-12-02T00:18:31.955Z"
},
{
"id": 453,
"createdAt": "2022-12-01T17:41:38.738Z",
"data": {
"size": "318.5 MB",
"count": 470,
"size_num": 333975064,
"count_users": 14,
"types_count": [
{
"count": 209,
"mimetype": "image/png"
},
{
"count": 119,
"mimetype": "application/octet-stream"
}
],
"views_count": 5842,
"count_by_user": []
},
"max_timestamp": "2022-12-01T17:41:38.738Z"
}
]

400
Bad Request (JSON)

  • invalid amount - The amount field is not a number, or couldn't be parsed as one.

POST
Force a stats update

200
Ok (JSON)

Same response as this

403
Unauthorized (JSON)

not an administrator - You are not an administrator, therefore you cannot force a stats update.

Last updated: 3/1/2024
Edit this page on GitHub