/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
Name | Type | Description |
---|---|---|
from | string | Start date (ISO string). Defaults to 7 days ago if omitted. |
to | string | End date (ISO string). Defaults to now if omitted. |
all | string | If present, returns all metrics (ignores from /to ). |
Response
Status: 200 OK
Content-Type: application/json
Property | Type | Description |
---|---|---|
id | string | Unique identifier for this metric record. |
createdAt | string | ISO timestamp when the metric was recorded. |
updatedAt | string | ISO timestamp when the metric was updated. |
data | Metric | Metric data payload (see below). |
Metric Type
Property | Type | Description |
---|---|---|
users | number | Number of new users created in this period. |
files | number | Number of files uploaded in this period. |
fileViews | number | Number of file views in this period. |
urls | number | Number of short URLs created in this period. |
urlViews | number | Number of URL views in this period. |
storage | number | Total file storage used (in bytes) for this period. |
filesUsers | FilesUser[] | Breakdown of file uploads by user. |
urlsUsers | UrlsUser[] | Breakdown of URL usage by user. |
types | TypeStat[] | Breakdown of file types uploaded. |
FilesUser Type
Property | Type | Description |
---|---|---|
username | string | The user's username. |
sum | number | Number of files uploaded. |
storage | number | Total storage used by this user. |
views | number | Total views of this user's files. |
UrlsUser Type
Property | Type | Description |
---|---|---|
username | string | The user's username. |
sum | number | Number of URLs created. |
views | number | Total views of this user's URLs. |
TypeStat Type
Property | Type | Description |
---|---|---|
type | string | The file MIME type. |
sum | number | Number 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.
/api/setup
Perform a first time setup of Zipline, or retrieve the current setup s...
/api/upload
Upload one or more files. Supports both regular and chunked ("partial"...
Last updated: 5/30/2025
Edit this page on GitHub