---
title: "Query test coverage for a journey"
method: GET
path: "/test/coverage/journey/{journey_invariant_id}"
tags: ["Coverage"]
---

# Query test coverage for a journey

`GET /test/coverage/journey/{journey_invariant_id}`

Used to query test coverage metrics in terms of URLs and partial URLs associated with a specific test (invariant)

## Path parameters

- `journey_invariant_id` string, required

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

Results of the query

- CoverageQueryResult
  - `coverageDetails` CoverageDetail[] — Coverage details for each app place matching query
    - `host_pattern` string — The URL hostname pattern/template that partially defines this app place
    - `path_pattern` string — The URL path pattern/template that partially defines this app place
    - `application_id` string — The ID of the application to which this app place applies
    - `application_name` string — The name of the application to which this app place applies
    - `workspace_id` string — The ID of the workspace to which this app place applies
    - `page_id` string — The ID of the template page unique to the combination of workspace_id, host_pattern and path_pattern
    - `coverage_measures` object — Description of coverage for this app place based on recent journey runs
      - `latest_observation_time` integer — The most recent time at which this app place was observed in a journey run used in calculating coverage measures
      - `earliest_observation_time` integer — The earliest time at which this app place was observed in a journey run used in calculating coverage measures
      - `journey_count` integer — Count of journeys (invariants) that have observed this app place in recent journey runs
      - `interaction_count` integer — Count of elements that have been interacted with at this app place in recent journey runs
      - `assertion_count` integer — Count of assertions that have executed at this app place in recent journey runs
    - `importance_measures` object — Description of importance/complexity for this app place based on link crawler runs or external data
      - `latest_observation_time` integer — The most recent time at which this app place was observed in a journey run used in calculating coverage measures
      - `earliest_observation_time` integer — The earliest time at which this app place was observed in a journey run used in calculating coverage measures
      - `incoming_links_count` integer — Maximum count of links to this place observed from recent link crawler runs
      - `depth_from_root_page` integer — Minimum (link) depth from root/starting page observed from recent link crawler runs
      - `dom_interactive_elements_count` integer — Maximum count of likely-interactive elements in the page based on analysis of the DOM from recent runs
      - `usage_unique_users` integer — Average number of unique users visiting the page over a rolling 24 hour window
      - `usage_total_visits` integer — Average number of total user events relating to the page over a rolling 24 hour window
      - `speed_index` integer — Average speed index in milliseconds to load this app place in recent journey runs
    - `distinct_url_count` integer — The number of distinct URLs that have been observed and correspond this app place (i.e., match the host and path patterns defining it)
    - `latest_screenshot` ImageUrls — Signed image urls for a given base image
      - `fullImageUrl` string — signed url to the full image
      - `thumbnailImageUrl` string — signed url to the thumbnail image
    - `latest_screenshot_unsigned_uri` string — Unsigned GCS URI for latest screenshot of this app place, if any
    - `latest_runs_by_journey` CoverageDetailLatestRunsByTest[]
      - `journey_invariant_id` string — Test (invariant) ID for a mablscript test covering this app place
      - `journey_run_id` string — Test run ID for most recent run of this journey that observed this app place
      - `flow_index` integer — Index of flow (execution) for earliest observation of this app place in this test run
      - `step_index` integer — Index of step (execution) within flow for earliest observation of this app place in this test run
      - `run_start_time` integer — The start time of this test run
    - `page_first_seen_time` integer — The time page was first detected [epoch milliseconds]
  - `cursor` string — Cursor used for pagination
  - `cache_used` boolean — Whether results were read from cache
  - `cache_updated_time` integer — Time when the cache was updated

## 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)
