---
title: "Get a metric trend for a specific step"
method: POST
path: "/report/step/metricTrend"
tags: ["Report"]
---

# Get a metric trend for a specific step

`POST /report/step/metricTrend`

Gets a step metric trending over a time range based on the filters

## Query parameters

- `workspace_id` string, required
- `step_id_in_flow` string, required
- `flow_invariant_id` string, required
- `step_id_in_test` string
- `test_invariant_id` string
- `metric_type` string, required
- `limit` integer
- `cursor` string

## Request body

- TestSuiteFilterOptions
  - `application_ids` string[] — Application IDs to filter by
  - `environment_ids` string[] — Environment IDs to filter by
  - `triggering_resource_ids` string[] — Triggering resource IDs to filter by
  - `test_name` string — Test name to filter by (partial match)
  - `test_type` 'api' | 'browser' | 'performance' | 'mobile' — Type of test
  - `browser` string — The browser for the run
  - `execution_source` 'mabl_cloud' | 'external' | 'mabl_local' | 'mabl_agent' — Where the test lives
  - `mobile_platform` 'android' | 'ios' — The mobile platform associated with this object
  - `test_labels` string[] — Test labels to filter by
  - `plan_labels` string[] — Plan labels to filter by
  - `start_time` integer — The start time of the time period
  - `end_time` integer — The end time of the time period

## Response `200`

Step metric trend over time

- StepMetricTrendResult
  - `step_metric_data_points` StepMetricDataPoint[] — Each step metric value
    - `metric_value` number, double — The value of the metric
    - `metric_time` integer — The time the metric was calculated
    - `test_run_id` string — The ID of the test run related to this metric value
    - `step_run_id` string — The ID related to the step run for this metric value
  - `cursor` string — Cursor used for pagination

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unexpected error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
