---
title: "Retrieve plan run summaries for a workspace"
method: POST
path: "/planRuns/workspace/{workspace_id}/querySummaries"
tags: ["PlanRun"]
---

# Retrieve plan run summaries for a workspace

`POST /planRuns/workspace/{workspace_id}/querySummaries`

Used to query plan run summaries for a workspace

## Path parameters

- `workspace_id` string, required

## Query parameters

- `limit` integer
- `cursor` string

## Request body

- PlanRunSummaryQueryOptions
  - `filter_conditions` PlanRunSummaryFilterCondition[] — Filters to get the relevant plan run summaries
    - `comparator` 'contains' | 'equal' | 'greater_than' | 'greater_than_or_equal' | 'in' | 'less_than' | 'less_than_or_equal', required — Comparator operators used in filtering conditions
    - `numeric_value` integer — Numeric value for comparison
    - `string_value` string — String value for comparison
    - `string_values` string[] — Array of string values for comparison (only 'in' comparator makes sense when array is used)
    - `column_name` 'status' | 'plan_id' | 'plan_name' | 'created_time' | 'environment_id' | 'application_ids' — Column name to apply the constraint to
  - `sort_columns` PlanRunSummarySortColumn[] — Options to sort the relevant plan run summaries by
    - `column_name` 'created_time' | 'plan_name', required — Column name to sort by
    - `sort_direction` 'ASC' | 'DESC', required — Direction of sort when ordering query results

## Response `200`

Array of plan run summary records matching the query

- PlanRunSummaryQueryResult — Result envelope for plan run summary query results
  - `plan_run_summaries` PlanRunSummary[] — All plan run summary objects that matched the query
    - `plan_run_id` string — Plan run ID.
    - `workspace_id` string — The workspace that this run belongs to
    - `plan_id` string — Plan ID.
    - `plan_name` string — Plan name, resolved from the plan_reference table at query time. Populated only on read paths that join plan_reference (e.g., when sorting or filtering by plan_name); may be null otherwise.
    - `deployment_ids` string[] — The deployment IDs associated with this run
    - `environment_ids` string[] — Denormalized environment IDs derived from deployments
    - `application_ids` string[] — Denormalized application IDs derived from deployments
    - `status` string — Current status of the plan run
    - `status_cause` string — Cause for setting given status, such as failure cause. Updated in pairs with Status.
    - `terminated_by_id` string — The ID of the user who terminated this plan run
    - `trigger_type` string — the type of trigger scheduling this plan run
    - `triggering_resource_id` string — the id of the entity that triggered the plan run
    - `triggering_resource_type` string — the type of the entity that triggered the plan run
    - `triggering_resource_is_support` boolean — this plan run was triggered by a mabl support team member
    - `created_time` integer — time the plan run was created
    - `created_by_id` string — The ID of the user who created this plan run
    - `schedule_time` integer — time the plan run was scheduled
    - `completed_time` integer — time the plan run completed
    - `retry_count` integer — Indicates the retry count for this plan run (0 = initial run, 1 = first retry, etc.)
    - `retry_of_id` string — The ID of the plan run that triggered this retry
    - `retry_type` string — If this is a retry, whether to retry all tests, failed tests only, or failed and skipped tests
    - `total_tests_count` integer — Total number of test runs in this plan run
    - `completed_tests_count` integer — Number of completed test runs in this plan run
    - `failed_tests_count` integer — Number of failed test runs in this plan run
    - `skipped_tests_count` integer — Number of skipped test runs in this plan run
    - `terminated_tests_count` integer — Number of terminated test runs in this plan run
  - `cursor` string — Cursor used for pagination

## Other responses

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