# The sweep history for this organisation `GET /agent/runs` **Required scope:** `documents:read` Filterable by mode, objective, protectedOnly, from/to. Omits decisions[] for size; use the single-run route for those. ## Parameters | Name | In | Required | Description | |---|---|---|---| | `workspace` | query | no | workspace id | | `mode` | query | no | interactive \| unattended (any other value is ignored) | | `objective` | query | no | the objective the sweep served | | `protectedOnly` | query | no | true excludes sweeps that protected nothing | | `from` | query | no | ISO 8601, filters on finishedAt | | `to` | query | no | ISO 8601, filters on finishedAt | | `page` | query | no | default 1 | | `limit` | query | no | default 20, max 100 | ## Responses | Status | Meaning | |---|---| | `200` | Success Returns: the full run MINUS decisions[]: runId, startedAt, finishedAt, mode, objective, trigger, counts, coverage, connectorsReached, connectorsUnreachable, unreadableGroups, network, noOp, decisionsReported, decisionsTruncated. decisions[] is omitted here for size; use GET /agent/runs/{id} for one run, or GET /agent/decisions to query across runs. meta carries page, limit, total, totalPages. | | `400` | BadRequest | | `401` | Unauthorized | | `403` | Forbidden | | `429` | RateLimited | ## Example ```bash curl -X GET "https://backend.immut.io/api/v1/agent/runs" \ -H "Authorization: Bearer $IMMUT_API_KEY" ``` ## OpenAPI fragment ```json { "/agent/runs": { "get": { "operationId": "getagentruns", "summary": "The sweep history for this organisation. Filterable by mode, objective, protectedOnly, from/to. Omits decisions[] for size; use the single-run route for those.", "description": "The sweep history for this organisation. Filterable by mode, objective, protectedOnly, from/to. Omits decisions[] for size; use the single-run route for those.", "parameters": [ { "name": "workspace", "in": "query", "required": false, "schema": { "type": "string" }, "description": "workspace id" }, { "name": "mode", "in": "query", "required": false, "schema": { "type": "string" }, "description": "interactive | unattended (any other value is ignored)" }, { "name": "objective", "in": "query", "required": false, "schema": { "type": "string" }, "description": "the objective the sweep served" }, { "name": "protectedOnly", "in": "query", "required": false, "schema": { "type": "string" }, "description": "true excludes sweeps that protected nothing" }, { "name": "from", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time" }, "description": "ISO 8601, filters on finishedAt" }, { "name": "to", "in": "query", "required": false, "schema": { "type": "string", "format": "date-time" }, "description": "ISO 8601, filters on finishedAt" }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" }, "description": "default 1" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer" }, "description": "default 20, max 100" } ], "responses": { "200": { "description": "Success Returns: the full run MINUS decisions[]: runId, startedAt, finishedAt, mode, objective, trigger, counts, coverage, connectorsReached, connectorsUnreachable, unreadableGroups, network, noOp, decisionsReported, decisionsTruncated. decisions[] is omitted here for size; use GET /agent/runs/{id} for one run, or GET /agent/decisions to query across runs. meta carries page, limit, total, totalPages." }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "429": { "$ref": "#/components/responses/RateLimited" } }, "tags": [ "Agent" ], "x-required-scope": "documents:read" } } } ```