---
title: "Query the current objective checks of several test versions"
method: POST
path: "/test/workspace/{workspace_id}/objectiveChecks/query"
tags: ["Test"]
---

# Query the current objective checks of several test versions

`POST /test/workspace/{workspace_id}/objectiveChecks/query`

## Request

- Base URL: `https://api.mabl.com`
- URL: `https://api.mabl.com/test/workspace/{workspace_id}/objectiveChecks/query`
- Auth: one of:
  - HTTP basic
  - API key in header `Authorization`

The current objective check of each named test version, for a page of the tests list. A version with no check is left out of the response, which reads as unverified. Tests outside the workspace are left out too.

## Path parameters

- `workspace_id` string, required

## Request body

- TestObjectiveChecksQuery
  - `tests` TestVersionReference[], required
    - `test_id` string, required: The test invariant ID
    - `version` integer, required

## Response `200`

The current check of each named version that has one

- TestObjectiveCheckList
  - `checks` TestObjectiveCheck[]
    - `id` string
    - `workspace_id` string
    - `test_invariant_id` string: The test invariant ID
    - `test_version` integer
    - `state` 'aligned' | 'drifted' | 'accepted_gap': aligned means the steps satisfy the summary; drifted means they fall short, with the difference in gap; accepted_gap means a person saw that gap and chose to keep it.
    - `gap` string: When state is drifted or accepted_gap, how the steps fall short of the summary.
    - `checked_time` integer: When the check was recorded, in epoch milliseconds.
    - `checked_by_type` 'user' | 'agent': Who authored the objective summary.
    - `checked_by_id` string: The ID of the user or API key that recorded the check.
    - `checked_by_agent_session_id` string: The agent session that recorded the check, when an agent did.

## Other responses

- `400`: Invalid or missing parameter
- `401`: User not authenticated
- `403`: User not authorized
- `default`: Unknown error

## Changes

- **2026-10-19** `b602223aa51f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mabl/apis/mabl-api/changes/test/workspace/:workspace_id/objectiveChecks/query/post.md)

---

[API](https://skmtc.dev/mabl/apis/mabl-api.md) · [All operations](https://skmtc.dev/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mabl/apis/mabl-api/revisions/b602223aa51f?raw)
