List the views of a folder
/folders/{folder_id}/viewsLists the views and downloads of the live documents in a folder and its sub-folders that the token can read, newest first, one page at a time. Without filter[created_at] only the last 30 days are returned; any created_at filter replaces that window, which is relative to each request. Needs the permission to manage user documents, else 403 missing_permission. Add totals=true or group_by for counts per user or document. Use GET /documents/{document_id}/views for one document. It changes nothing.
Path parameters
The folder's id.
Query parameters
- Default:
Page size (1–100). Defaults to 25; values are clamped to the range.
25 Opaque pagination cursor taken from a prior response's
meta.next_cursor.Comma-separated top-level fields to return.
idis always returned.Comma-separated fields to sort by: created_at. Prefix a field with
-for descending. Defaults to-created_at. The id is always the final tiebreak.Send true to add view and download counts, distinct users and the last access, across every match, to
meta.totals. Sendinggroup_byalso turns totals on.Comma-separated fields to split the totals by, giving one row per combination that has views. Any of user_id and document_id.
Views by this user. Takes
[in]and[not_in]with a comma-separated list.- One of:
Only views, or only downloads. Takes
[in]and[not_in]with a comma-separated list.view,download Only accesses in a range, written
filter[created_at][gte]=2026-10-01. Takes gt, gte, lt and lte. Sending any of them replaces the default 30-day window.- One of:
Only accesses by users of this kind:
investor,internal(staff) orentrepreneur. Sendinvestorfor investor-only figures. Takes[in]and[not_in]with a comma-separated list; users who no longer exist match only[not_in].investor,internal,entrepreneur
Responses
{
"data": [
{}
],
"meta": {
"totals": [
{}
]
}
}Authorization failed. error.code is one of org_disabled,
ip_blocked, missing_scope, scope_disabled, user_disabled.
The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per
problem, or a code documented on the operation.
Examples
curl https://your-org-domain/kong/core/api/v2/folders/{folder_id}/views\
-H "Authorization: Bearer $HELM_API_KEY"\
-H "Content-Type: application/json"