/api/stats

Get metrics and statistics of the current Zipline instance.

Info

This endpoint requires authentication.

GET
Request

Get metrics within a specific date range, or all metrics.

Query Parameters

NameTypeDescription
fromstringStart date (ISO string). Defaults to 7 days ago if omitted.
tostringEnd date (ISO string). Defaults to now if omitted.
allstringIf present, returns all metrics (ignores from/to).

Response

Status: 200 OK

Content-Type: application/json

PropertyTypeDescription
idstringUnique identifier for this metric record.
createdAtstringISO timestamp when the metric was recorded.
updatedAtstringISO timestamp when the metric was updated.
dataMetricMetric data payload (see below).

Metric Type

PropertyTypeDescription
usersnumberNumber of new users created in this period.
filesnumberNumber of files uploaded in this period.
fileViewsnumberNumber of file views in this period.
urlsnumberNumber of short URLs created in this period.
urlViewsnumberNumber of URL views in this period.
storagenumberTotal file storage used (in bytes) for this period.
filesUsersFilesUser[]Breakdown of file uploads by user.
urlsUsersUrlsUser[]Breakdown of URL usage by user.
typesTypeStat[]Breakdown of file types uploaded.

FilesUser Type

PropertyTypeDescription
usernamestringThe user's username.
sumnumberNumber of files uploaded.
storagenumberTotal storage used by this user.
viewsnumberTotal views of this user's files.

UrlsUser Type

PropertyTypeDescription
usernamestringThe user's username.
sumnumberNumber of URLs created.
viewsnumberTotal views of this user's URLs.

TypeStat Type

PropertyTypeDescription
typestringThe file MIME type.
sumnumberNumber of files of this type.

Example

[
{
"id": "cmb7bi1gv0000vcat8moi9zhr",
"createdAt": "2025-05-28T02:19:56.528Z",
"updatedAt": "2025-05-28T02:19:56.528Z",
"data": {
"users": 2,
"files": 1,
"fileViews": 0,
"urls": 0,
"urlViews": 0,
"storage": 1275067,
"filesUsers": [
{
"username": "admin",
"sum": 1,
"storage": 1275067,
"views": 0
}
],
"urlsUsers": [],
"types": [
{
"type": "image/png",
"sum": 1
}
]
}
},
{
"id": "cmb6163y800049kenhkvumzdd",
"createdAt": "2025-05-27T04:42:57.537Z",
"updatedAt": "2025-05-27T04:42:57.537Z",
"data": {
"users": 1,
"files": 1,
"fileViews": 0,
"urls": 0,
"urlViews": 0,
"storage": 1275067,
"filesUsers": [
{
"username": "admin",
"sum": 1,
"storage": 1275067,
"views": 0
}
],
"urlsUsers": [],
"types": [
{
"type": "image/png",
"sum": 1
}
]
}
},
{
"id": "cmb603j1l00019ken7zi0acbk",
"createdAt": "2025-05-27T04:12:57.514Z",
"updatedAt": "2025-05-27T04:12:57.514Z",
"data": {
"users": 0,
"files": 0,
"fileViews": 0,
"urls": 0,
"urlViews": 0,
"storage": 0,
"filesUsers": [],
"urlsUsers": [],
"types": []
}
}
]

Error Responses

  • 400 Bad Request

    Invalid date format or range, the dates are messed up.

  • 403 Forbidden

    Metrics disabled for the user.



Last updated: 5/30/2025
Edit this page on GitHub