Skip to main content

Get Multiple Metrics

The get-multiple-metrics endpoint allows you to retrieve multiple different metrics in a single API request, which is useful for dashboards and reports. Endpoint: POST /metrics/get-multiple-metrics Authentication Required: Yes

Request Format

Parameter Details

array
required
Array of metric types to retrieve. You can include any of the available metrics from the different categories.Example: ["cycle-time", "pull-requests-count", "completed-issues-count"]
object
Object mapping each metric to its minimum value threshold.Example:
object
Object mapping each metric to the date field to use for time-based calculations.Example:
object
Object mapping each metric to the aggregation method to use.Example:
object
The get-multiple-metrics endpoint accepts all standard filters. Filters are applied to all metrics in the request — use metrics from the same data domain (e.g. all PR-based) for best results. Available filters:

Response Format

The response contains an array of results, with each result including the metric name, value, and group by values:

Example: Team Performance Dashboard

This example demonstrates retrieving multiple metrics for a team performance dashboard:

Example: Repository Comparison

This example demonstrates retrieving multiple metrics to compare different repositories:

Best Practices

  1. Limit the number of metrics: Request only the metrics you need to avoid performance issues.
  2. Use consistent date fields: When possible, use the same date field for related metrics.
  3. Choose appropriate aggregations: Different metrics may require different aggregation methods.
  4. Consider using time series data: For dashboard visualizations, setting time_series_data to true provides data formatted for charts.
  5. Include previous period data: Setting include_previous_period to true provides comparison data for trend analysis.