Query agent sessions
Changed onQuery agent sessions with optional filters
Request
- Base URL: https://api.mabl.com
- URL: https://api.mabl.com/agentSession
- Auth: one of:
- HTTP basic
- API key in header Authorization
Query parameters
The ID of the workspace to query sessions for
Filter by agent type (deprecated, use agent_types instead)
Filter by multiple agent types. If both agent_type and agent_types are null, defaults to the public agent types the workspace is entitled to see (test_recovery if Test Recovery Agent mode is on, runtime_recovery_summary_agent if the workspace can also start recovery work, test_authoring and repair_notes if generative AI is enabled for the workspace), plus test_impact when reference is given.
Filter by latest instance status. Include 'none' to match sessions without any cloud instance.
Filter by the user who created the agent session
Deprecated; use test_id, which accepts the same full variant id for an exact-version match. Filters by the exact test variant ID stored on the session's startup_params (test authoring sessions only).
Filter test authoring sessions by test id. A bare invariant id (e.g. "abc123") matches sessions for any version of the test; a full variant id including the version (e.g. "abc123:2") matches only that version. Matches against startup_params.test_variant_id, which is stored as "<invariant_id>:<version>". Combine with other filters (AND semantics).
Filter test authoring sessions by the mabl branch they operate on, matching startup_params.branch_id exactly. The branch a session edits on is recorded at session creation, so this returns only the sessions that authored changes on that branch (not every session for the branch's tests). Combine with other filters (AND semantics).
Origin of an agent session — who or what initiated it. user_web, user_mcp, user_cli distinguish the human-driven entry point. auto_tra marks sessions automatically started by the Test Recovery Agent (runtime recovery). user_tra marks edits the user explicitly accepted from a TRA suggestion. unknown is used when no source was provided.
Filter by the source attribution stored on the session's startup_params. Use this together with test_variant_id to dedup auto-triggered edit sessions.
The limit to use for pagination
The cursor to use for pagination
Filter by the test run recorded on the session's startup_params, matching startup_params.test_run_id exactly. Requires agent_types (or the deprecated agent_type); a run lookup with no type filter is rejected with a 400. More than one agent type records a test_run_id, so without a type filter the lookup returns every kind of session attached to that run — the type filter is what scopes it to one agent, and it is also what keeps the lookup cheap. Combine with other filters (AND semantics).
Filter by the authoring-agent arm stamped on the session at creation, matching agent_variant exactly. Only test_authoring sessions carry a variant, so any other agent type is excluded by this filter. Combine with other filters (AND semantics).
Filter to sessions carrying this normalized change reference key, e.g. pull_request:github.com/mablhq/ui#3341. Exact match. Only test_impact sessions record references. A query with this parameter may return test_impact sessions, by default or when named in agent_types; without it they are never listed. Combine with other filters (AND semantics). Results are newest first.
Response
Query results
Changes
- warning
added the new
flow_authoringenum value to the//response property for the response status - warning
added the new
flow_authoringenum value to the///response property for the response status - info
added the new enum value
flow_authoringto thequeryrequest parameteragent_type - info
added the enum value
flow_authoringto the propertyitems/of thequeryrequest parameteragent_types - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
/////////to the response with the status
- warning
- info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status
- info