> ## Documentation Index
> Fetch the complete documentation index at: https://docs.curator.interworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Activity

> Activity API endpoints that return the same figures as the Activity page, as JSON or CSV

Every endpoint below returns one panel from the [Activity page](/site_administration/activity/activity_overview)
and accepts the same filters. The Activity page's **API** button copies a ready-made URL for the panel you are
looking at, with the current filters applied; add your API key as the `apikey` parameter before you use it.

Example:

```text theme={null}
https://your-curator-site/api/v1/activity/topContent?start=2026-08-01&end=2026-08-31&apikey=YOUR_KEY
```

## Common parameters

All parameters are optional.

* `start`: first day of the range as `YYYY-MM-DD`. Defaults to 29 days before today.
* `end`: last day of the range as `YYYY-MM-DD`. Defaults to today. An end before the start is moved to the
  start day. A range longer than 731 days is trimmed to the 731 days ending on `end`.
* `range`: one of `7d`, `30d`, `90d`, or `12m`. A shortcut for a range that ends today; it overrides `start`
  and `end`.
* `content_type`: a content model class name, for example `InterWorks\TableauViz\Models\Dashboard` or
  `InterWorks\Content\Models\Page`. Narrows the figures to that platform.
* `content`: a single item as `ClassName|id`, for example `InterWorks\Content\Models\Page|7`. Takes
  precedence over `content_type`.
* `user_id`: a frontend user id. Narrows the figures to that person.
* `format`: `csv` to receive the table as a CSV download. Omit it to receive JSON.

## Response

A JSON response carries the panel key, its title, the filters that reproduce the request, the column names,
and one object per row keyed by column name:

```json theme={null}
{
    "result": "Success",
    "panel": "topContent",
    "title": "Most viewed content",
    "filters": { "start": "2026-08-01", "end": "2026-08-31" },
    "columns": ["Content", "Type", "Views"],
    "rows": [
        { "Content": "Sales Overview", "Type": "Tableau Dashboard", "Views": 412 }
    ]
}
```

A CSV response has the column names on the first line and one line per row.

## /activity/summary

Views, viewers, logins, and access denied counts for the range and the previous period of the same length,
with the percent change. Logins and access denied ignore `content_type` and `content`.

## /activity/trend

Views per period for the range and for the previous period, aligned day for day. Accepts **aggregation**:
`daily` (default), `weekly`, or `monthly`.

## /activity/heatmap

Raw view totals for every weekday and hour slot, one row per weekday (Sunday first) and one column per hour.

## /activity/topContent

The 25 most viewed content items with their type and view count.

## /activity/contentTypes

View counts grouped by content type.

## /activity/unviewed

Content items that received no views in the range, with the last time each was ever viewed. Honors
`content_type` only.

## /activity/topUsers

The 10 most active signed-in viewers. Ignores `user_id`.

## /activity/viewsPerViewer

Signed-in viewers grouped by how many views they made, with each group's share of all signed-in views.
Ignores `user_id`.

## /activity/audience

New, returning, dormant, and never viewed account counts, the eligible account count, the active share, and
the number of accounts created in the range. Ignores `user_id`.

## /activity/denialsTrend

Access denied events per day. Ignores `content_type` and `content`.

## /activity/topDenials

The 10 most frequent requested path and user pairs that were sent to the Access Denied page. Ignores
`content_type` and `content`.
