Ticket metrics API

Ticket metrics API

The Ticket metrics API provides ticket metric data as well as a list of tickets found in Ticket log.

Permissions

Users calling the Ticket metrics API must have the Metrics API permission as well as a valid and unique API key. To enable API permissions for users, you must have the Manage User Permissions permission. Learn more about administrative permissions and API keys in Flow.

If a user does not have both the Metrics API permission and an API key, they can't use the Ticket metrics API. If your user can't call the Ticket metrics API, verify they have both the permission and a valid API key.

To enable the Metrics API permission for a user, make sure the permission is added to at least one role they are assigned to.

Calling the API

Call the API endpoint over standard HTTPS. Use any tool or programming language that can add the authorization: bearer <API Key> header.

The base URL for the API is https://api.appfireflow.com/ticket-delivery.

Supported parameters

The /metrics endpoints for the Ticket metrics API all require a date_range to specify the date range. The /ticket-log endpoints have no required parameters.

When inputting the date range, it must be in the form: ["YYYY-MM-DDTHH:mm:ss+TZ_offset","YYYY-MM-DDTHH:mm:ss+TZ_offset"].

Learn more about additional parameters for this API in the Swagger documentation (opens in new tab).

Tip: You can also use the Swagger documentation to receive responses from the API. To do this:

  1. Click Authorize.

  2. Put Bearer <Flow API key> in the value field. Click Authorize. You must include Bearer in the field.

  3. Click Try it out. Input parameters as desired.

  4. Click Execute.

Endpoints

This API contains six endpoints in two categories.

The /metrics endpoints contain ticket metric data as displayed in Retrospective.

  • /metrics: Lists values for each of the main ticket metrics on Retrospective, including: Tickets completed, Velocity, Cycle time, Backflow rate, Queue time, and Jitter.

  • /metrics/backflow-sources: Lists the sources of Backflow, along with the number of backflows and their associated tickets.

  • /metrics/jitter-sources: Lists the sources of Jitter, along with the number of incidents of each source and their associated tickets.

  • /metrics/queuetime-sources: Lists the sources of Queue time, as well as the number of incidents, median Queue time and total Queue time for each source, as well as the associated tickets.

The /ticket-log endpoints contain ticket lists as displayed in Ticket log.

  • /ticket-log: Lists all tickets as well as their associated ticket-level data.

  • /ticket-log/ticket-by-status: Gives the total number of tickets as well as the number of tickets in each state: unmapped, active, waiting, done, canceled, and not started.

/metrics

Parameter

Description

Example

Parameter

Description

Example

date_range

Specifies the date range to look for tickets in. Tickets moved to a Done state during this date range are included.

date_range=["2024-06-24T09:00:00-6:00","2024-07-24T09:00:00-6:00"]

periods

Specifies the number and length of periods to compare the date_range to for trend calculation. For accuracy, these periods must all be the same length as the date_range.

periods=[["2024-05-24T09:00:00-6:00","2024-06-24T09:00:00-6:00"],[“2024-04-24T09:00:00-6:00”,”2024-05-24T09:00:00-6:00”]]

team_id

Flow-created team ID. The API response only includes tickets where the apex user is a member of the team and was an assignee on the ticket while it was in an active state.

team_id=123456

team_id__in

Comma separated list of team IDs.

team_id__in=123456,234567

Include_nested_team

Determines whether data associated with nested teams and team members of the selected team are included in the response. Defaults to false.

include_nested_teams=true

apex_user_id

Flow-created user ID. The API response only includes tickets where the apex user was an assignee on the ticket while it was in an active state.

apex_user_id=1234567

apex_user_id__in

Comma separated list of apex user IDs.

apex_user_id__in=1234567,2345678

project_ids

Determines which specific ticket projects to include data from.

project_ids=1234567

/metrics/backflow-sources

Parameter

Description

Example

Parameter

Description

Example

date_range

Specifies the date range to look for tickets in. Tickets moved to a Done state during this date range are included.

date_range=["2024-06-24T09:00:00-6:00","2024-07-24T09:00:00-6:00"]

periods

Specifies the number and length of periods to compare the date_range to for trend calculation. For accuracy, these periods must all be the same length as the date_range.

periods=[["2024-05-24T09:00:00-6:00","2024-06-24T09:00:00-6:00"],[“2024-04-24T09:00:00-6:00”,”2024-05-24T09:00:00-6:00”]]

team_id

Flow-created team ID. The API response only includes tickets where the apex user is a member of the team and was an assignee on the ticket while it was in an active state.

team_id=123456

include_nested_team

Determines whether data associated with nested teams and team members of the selected team are included in the response. Defaults to false.

include_nested_teams=true

apex_user_id

Flow-created user ID. The API response only includes tickets where the apex user was an assignee on the ticket while it was in an active state.

apex_user_id=1234567

project_ids

Determines which specific ticket projects to include data from.

project_ids=1234567

/metrics/jitter-sources

Parameter

Description

Example

Parameter

Description

Example

date_range

Specifies the date range to look for tickets in. Tickets moved to a Done state during this date range are included.

date_range=["2024-06-24T09:00:00-6:00","2024-07-24T09:00:00-6:00"]

periods

Specifies the number and length of periods to compare the date_range to for trend calculation. For accuracy, these periods must all be the same length as the date_range.

periods=[["2024-05-24T09:00:00-6:00","2024-06-24T09:00:00-6:00"],[“2024-04-24T09:00:00-6:00”,”2024-05-24T09:00:00-6:00”]]

team_id

Flow-created team ID. The API response only includes tickets where the apex user is a member of the team and was an assignee on the ticket while it was in an active state.

team_id=123456

include_nested_team

Determines whether data associated with nested teams and team members of the selected team are included in the response. Defaults to false.

include_nested_teams=true

apex_user_id

Flow-created user ID. The API response only includes tickets where the apex user was an assignee on the ticket while it was in an active state.

apex_user_id=1234567

project_ids

Determines which specific ticket projects to include data from.

project_ids=1234567

/metrics/queuetime-sources

Parameter

Description

Example

Parameter

Description

Example

date_range

Specifies the date range to look for tickets in. Tickets moved to a Done state during this date range are included.

date_range=["2024-06-24T09:00:00-6:00","2024-07-24T09:00:00-6:00"]

periods

Specifies the number and length of periods to compare the date_range to for trend calculation. For accuracy, these periods must all be the same length as the date_range.

periods=[["2024-05-24T09:00:00-6:00","2024-06-24T09:00:00-6:00"],[“2024-04-24T09:00:00-6:00”,”2024-05-24T09:00:00-6:00”]]

team_id

Flow-created team ID. The API response only includes tickets where the apex user is a member of the team and was an assignee on the ticket while it was in an active state.

team_id=123456

include_nested_team

Determines whether data associated with nested teams and team members of the selected team are included in the response. Defaults to false.

include_nested_teams=true

apex_user_id

Flow-created user ID. The API response only includes tickets where the apex user was an assignee on the ticket while it was in an active state.

apex_user_id=1234567

project_ids

Determines which specific ticket projects to include data from.

project_ids=1234567

/ticket-log

Parameter

Description

Example

Parameter

Description

Example

project__id

Determines which specific ticket projects to include data from.

project__id=1234567

team_id

Flow-created team ID. The API response only includes tickets where the apex user is a member of the team and was an assignee on the ticket while it was in an active state.

team_id=123456

team_id__in

Comma separated list of team IDs.

team_id__in=123456,234567

apex_user_id

Flow-created user ID. The API response only includes tickets where the apex user was an assignee on the ticket while it was in an active state.

apex_user_id=1234567

apex_user_id__in

Comma separated list of apex user IDs.

apex_user_id__in=1234567,2345678

current_assignee

Determines whether to include tickets based only on the current assignee or also on any historical assignee while the ticket was in an active state. Defaults to false.

current_assignee=false

work_type

The work type of tickets to include.

work_type=feature

ordering

Determines the response field to sort the response by.

ordering=id

limit

Number of records returned per query. The default value is 50.

limit=25

offset

Number of records to skip before returning a record. Defaults to 0.

offset=0

include_nested_teams

Determines whether data associated with nested teams and team members of the selected team are included in the response. Defaults to false.

include_nested_teams=true

/ticket-log/ticket-by-status

Parameter

Description

Example

Parameter

Description

Example

project__id

Determines which specific ticket projects to include data from.

project__id=1234567

team_id

Flow-created team ID. The API response only includes tickets where the apex user is a member of the team and was an assignee on the ticket while it was in an active state.

team_id=123456

team_id__in

Comma separated list of team IDs.

team_id__in=123456,234567

apex_user_id

Flow-created user ID. The API response only includes tickets where the apex user was an assignee on the ticket while it was in an active state.

apex_user_id=1234567

apex_user_id__in

Comma separated list of apex user IDs.

apex_user_id__in=1234567,2345678

current_assignee

Determines whether to include tickets based only on the current assignee or also on any historical assignee while the ticket was in an active state. Defaults to false.

current_assignee=false

work_type

The work type of tickets to include.

work_type=feature

ordering

Determines the response field to sort the response by.

ordering=id

limit

Number of records returned per query. The default value is 50.

limit=25

offset

Number of records to skip before returning a record. Defaults to 0.

offset=0

include_nested_teams

Determines whether data associated with nested teams and team members of the selected team are included in the response. Defaults to false.

include_nested_teams=true

Need support? Create a request with our support team.

Copyright © 2005 - 2026 Appfire | All rights reserved.