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 [above](#list-the-predefined-metrics-used-in-activity-reports)) 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.
Authentication
AuthorizationBasic
Basic authentication of the form Basic <base64(username:)>.
OR
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects any.
Response
Successful response
Errors
400
Bad Request Error
401
Unauthorized Error
404
Not Found Error