List the views of a document
/documents/{document_id}/viewsLists who viewed or downloaded a document, newest first, one page at a time. Each row is one access: a download or image link issued through the API, or the file added to a zip download. Needs the permission to manage user documents on the token's user, else 403 missing_permission; a document the token cannot read returns 404. Add totals=true or group_by=user_id for counts, and filter[user_type]=investor for investor-only figures. It changes nothing.
Path parameters
The document'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.
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.- 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/documents/{document_id}/views\
-H "Authorization: Bearer $HELM_API_KEY"\
-H "Content-Type: application/json"