Folders

List the views of a folder

GET/folders/{folder_id}/views

Lists 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

  • folder_idstring (uuid)Required#

    The folder's id.

Query parameters

  • limitinteger#

    Page size (1–100). Defaults to 25; values are clamped to the range.

    Default: 25
  • cursorstring#

    Opaque pagination cursor taken from a prior response's meta.next_cursor.

  • fieldsstring#

    Comma-separated top-level fields to return. id is always returned.

  • sortstring#

    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.

  • totalsboolean#

    Send true to add view and download counts, distinct users and the last access, across every match, to meta.totals. Sending group_by also turns totals on.

  • group_bystring#

    Comma-separated fields to split the totals by, giving one row per combination that has views. Any of user_id and document_id.

  • filter[user_id]string (uuid)#

    Views by this user. Takes [in] and [not_in] with a comma-separated list.

  • filter[intent]string#

    Only views, or only downloads. Takes [in] and [not_in] with a comma-separated list.

    One of: view, download
  • filter[created_at]string#

    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.

  • filter[user_type]string#

    Only accesses by users of this kind: investor, internal (staff) or entrepreneur. Send investor for investor-only figures. Takes [in] and [not_in] with a comma-separated list; users who no longer exist match only [not_in].

    One of: investor, internal, entrepreneur

Responses

{
  "data": [
    {}
  ],
  "meta": {
    "totals": [
      {}
    ]
  }
}
401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
404

Resource not found (error.code = not_found).

Error
422

The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per problem, or a code documented on the operation.

Error
429

Rate limit exceeded (error.code = rate_limited).

Error

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"