v1

latestOpenAPI 3.0.02026-07-26254134307.1 KB
Analytics

Create a new analytics report

Create a new analytics report for a set of metrics over a specific time span. Different filters (e.g. Inbox v Tag v Teammates) will be joined with AND logic, but the IDs within a filter will be joined with OR logic (e.g. Inbox A or Inbox B, Tag A or Tag B). The report will be executed asynchronously. The response will include a link that can be used to retrieve the report status & result. Refer to the Analytics topic for details about specific metrics.

Required scope: analytics:read

post/analytics/reports

Request body

startnumber required

Start time of the data to include in the export (seconds since 1970-01-01T00:00:00+00). Will be rounded down to the start of the day.

endnumber required

End time of the data to include in the export (seconds since 1970-01-01T00:00:00+00). Will be rounded up to the end of the day.

timezonestring

IANA name of the timezone to format the dates with. If omitted, the export will use Etc/UTC.

metricsAnalyticsMetricId[] required

List of the metrics required.

Response

An analytics report.

uidstring required

The UID of the analytics report

status'running' | 'done' | 'failed' required

Status of the report.

progressinteger required

Number ranging from 0 to 100 corresponding to the percentage of the analytics processed.

Example response

{
  "_links": {
    "self": "https://yourCompany.api.frontapp.com/analytics/reports/b45efa66237cc453252d9019449c7a64f5cfdb491b6c2c1d6df33c1050d60e33"
  },
  "uid": "b45efa66237cc453252d9019449c7a64f5cfdb491b6c2c1d6df33c1050d60e33",
  "status": "done",
  "progress": 100,
  "metrics": [
    {
      "type": "number"
    }
  ]
}