Analytics

Create a new analytics report

Changed on

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

  • Base URL
    https://api2.frontapp.com
  • URL
    https://api2.frontapp.com/analytics/reports
  • Auth
    HTTP bearer

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"
    }
  ]
}

Changes

    • breaking

      request body became required

    • warning

      added the new avg_first_reaction_time enum value to the // response property for the response status

    • warning

      added the new avg_reaction_time enum value to the // response property for the response status

    • warning

      added the new avg_tag_duration enum value to the // response property for the response status

    • warning

      added the new num_active_accounts enum value to the // response property for the response status

    • warning

      added the new num_active_teammates enum value to the // response property for the response status

    • warning

      added the new num_assigned_segments enum value to the // response property for the response status

    • warning

      added the new num_new_tasks enum value to the // response property for the response status

    • warning

      added the new num_non_replies_sent enum value to the // response property for the response status

    • warning

      added the new num_replies_sent enum value to the // response property for the response status

    • warning

      added the new num_segments_with_outbounds enum value to the // response property for the response status

    • warning

      added the new num_segments_with_tag_changes enum value to the // response property for the response status

    • warning

      added the new num_tags_added enum value to the // response property for the response status

    • warning

      added the new num_tags_removed enum value to the // response property for the response status

    • warning

      added the new num_touched_segments enum value to the // response property for the response status

    • warning

      added the new pct_messages_with_message_templates enum value to the // response property for the response status

    • info

      added the new avg_first_reaction_time enum value to the request property /

    • info

      added the new avg_reaction_time enum value to the request property /

    • info

      added the new avg_tag_duration enum value to the request property /

    • info

      added the new num_active_accounts enum value to the request property /

    • info

      added the new num_active_teammates enum value to the request property /

    • info

      added the new num_assigned_segments enum value to the request property /

    • info

      added the new num_new_tasks enum value to the request property /

    • info

      added the new num_non_replies_sent enum value to the request property /

    • info

      added the new num_replies_sent enum value to the request property /

    • info

      added the new num_segments_with_outbounds enum value to the request property /

    • info

      added the new num_segments_with_tag_changes enum value to the request property /

    • info

      added the new num_tags_added enum value to the request property /

    • info

      added the new num_tags_removed enum value to the request property /

    • info

      added the new num_touched_segments enum value to the request property /

    • info

      added the new pct_messages_with_message_templates enum value to the request property /