---
title: "Find insights associated with a test run"
method: GET
path: "/journeyRun/{id}/insights"
tags: ["TestRun"]
---

# Find insights associated with a test run

`GET /journeyRun/{id}/insights`

Used to query insights by type and test run

## Path parameters

- `id` string, required

## Query parameters

- `insight_type` string, required
- `limit` integer
- `cursor` string

## Response `200`

Results of the query

- InsightQueryResult
  - `insights` Insight[] — All insights that matched the query
    - `id` string — The ID of the insight
    - `organization_id` string — DEPRECATED - The ID of the organization to which this insight applies
    - `workspace_id` string — The ID of the workspace to which this insight applies
    - `environment_id` string — The ID of the environment to which this insight applies
    - `application_id` string — The ID of the application to which this insight applies
    - `deployment_id` string — The ID of the deployment to which this insight applies
    - `credentials_id` string — The ID of the credentials to which this insight applies
    - `run_policy_id` string — DEPRECATED - The ID of the run policy to which this insight applies
    - `plan_id` string — The ID of the plan to which this insight applies
    - `test_script_id` string — DEPRECATED - The ID of the test script to which this insight applies
    - `branch_name` string — The branch this insight applies to
    - `journey_id` string — The ID of the journey to which this insight applies
    - `test_type` 'api' | 'browser' | 'performance' | 'mobile' — Type of test
    - `flow_id` string — The ID of the flow, if any, to which this insight applies
    - `flow_invariant_id` string — The invariant ID of the flow, if any, to which this insight applies
    - `step_id_in_journey` string — The ID of the step within a specific journey that may repeat flows, if any, to which this insight applies
    - `step_id_in_flow` string — The ID of the step within its flow, if any, to which this insight applies
    - `step_run_id` string — The ID of a single execution of the step, if any, to which this insight applies
    - `created_time` integer — Time at which the insight was created
    - `created_by_id` string — The ID of the user who created this insight
    - `last_updated_time` integer — time the insight was last updated
    - `last_updated_by_id` string — The ID of the user who last updated this insight
    - `model_id` string — The ID of the state detection model that triggered this insight
    - `model_version` string — The version of the state detection model that triggered this insight
    - `state_detection_group_id` string — The ID of the group of state detections used to generate this insight
    - `type` string — The type of the insight
    - `current_state` string — The current state of the insight
    - `status` 'alert' | 'warning' | 'ok' | 'improvement' | 'info' — the state
    - `category` string — the category of the insight
    - `resource` string — the resource this insight relates to
    - `features` string[] — Features that resulted in this insight
    - `grouping_fields` string[] — Measurement fields that were used to calculate the state_detection_group_id of this insight
    - `context` object — The context used to generate this insight (key-value pairs)
    - `last_status_times` object — Map from status to the last time we observed this insight type with that status
    - `window_start_time` integer — Time associated with an upstream journey execution or system event (epoch milliseconds)
    - `tags` Tag[] — Free text tags associated with this entity
      - `name` string, required — tag name
      - `values` string[]
    - `archived` boolean — Archived insight true/false
    - `useful` boolean — Flag indicating whether or not the insight was useful to the user
    - `correct` boolean — Flag indicating whether or not the user considers the insight to be correct
    - `run_policy_execution_id` string — DEPRECATED - The ID of the run policy execution that triggered this insight
    - `plan_run_id` string — The ID of the plan run that triggered this insight
    - `journey_run_id` string — The ID of the journey run that triggered this insight
    - `execution_runner_version` string — the version of the runner the execution occured on
    - `emulation_mode` string — Desktop or mobile web emulation to which this insight applies
    - `device_emulation_id` string — Device ID to which this insight applies
    - `device_emulation_preset_type` string — Device preset type to which this insight applies
    - `triggering_state_detection_id` string — The ID of the state detection that triggered this insight
  - `cursor` string — Cursor used for pagination

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown 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)
