latestOpenAPI 3.1.02026-08-233001841.3 MB

0dcf3303e9d7

reporting

Get an activity report

The activity report returns the organization's metrics per time period (overview report) or user (comparison report).

Every report accepts the following parameters:

  • datetime_range: a time range to fetch data for. Either this field or relative_range needs to be specified.
  • relative_range: a relative time range to fetch data for. The allowed values are: today, this-week, this-month, this-quarter, this-year, yesterday, last-week, last-month, last-quarter, last-year, and all-time. Either this field or datetime_range needs to be specified.
  • query: a query to apply to the report to filter out data. The value of the field is a dictionary with the key type and any type-specific keys. For now only the type saved_search is allowed which takes the extra key saved_search_id to specify the ID of a saved search. This parameter is optional.
  • users: a list of user IDs to limit the report results to. This parameter is optional.
  • type: the type of the report. The available values are overview and comparison. This parameter is mandatory.
  • metrics: a list of metrics (see List Activity Metrics) to fetch for the report. This parameter is mandatory.

The report can be requested either in a JSON format or in a CSV file. The format can be specified with the accept header.

post/report/activity/

Response

Successful response