Source: https://docs.cumuluslabs.io/reference/test_suites.list
Content version: b94575be

# test_suites.list

List test suites (optionally one agent's) with their last run

## Request {#request}

`GET /api/v1/test-suites`

- MCP: `test_suites_list`
- SDK: `client.test_suites.list` (SDK path arguments use `path`; MCP uses `params`).
- Minimum API key role: **viewer**.
- Idempotency: **none**.

Use the request schema below. Read IDs from earlier operation results.

## Input schema {#input-schema}

```json
{
  "parameters": [
    {
      "name": "agent_id",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256,
        "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
      }
    },
    {
      "name": "include_archived",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "enum": [
          "true",
          "false"
        ],
        "default": "false"
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "maxLength": 1024
      }
    },
    {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    }
  ],
  "requestBody": null
}
```

## Responses {#responses}

```json
{
  "200": {
    "description": "List test suites (optionally one agent's) with their last run",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/TestSuitesListResponse200"
        }
      }
    }
  },
  "4XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  },
  "5XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}
```

## Referenced schemas {#schemas}

```json
{
  "components": {
    "schemas": {
      "TestSuitesListResponse200": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "owner_id": {
                  "type": "string",
                  "minLength": 1
                },
                "environment": {
                  "type": "string",
                  "minLength": 1
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "suite_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "agent_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "simulation",
                    "replay"
                  ]
                },
                "required": {
                  "type": "boolean"
                },
                "revision": {
                  "type": "integer",
                  "exclusiveMinimum": true,
                  "minimum": 0,
                  "maximum": 2147483647
                },
                "digest": {
                  "type": "string",
                  "pattern": "^sha256:[a-f0-9]{64}$"
                },
                "case_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "last_run": {
                  "type": "object",
                  "properties": {
                    "test_run_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "running",
                        "completed",
                        "cancelled"
                      ]
                    },
                    "verdict": {
                      "type": "string",
                      "enum": [
                        "passed",
                        "failed",
                        "errored"
                      ],
                      "nullable": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "finished_at": {
                      "allOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "test_run_id",
                    "version",
                    "state",
                    "verdict",
                    "created_at",
                    "finished_at"
                  ],
                  "additionalProperties": false,
                  "nullable": true
                }
              },
              "required": [
                "owner_id",
                "environment",
                "tenant_id",
                "suite_id",
                "agent_id",
                "name",
                "kind",
                "required",
                "revision",
                "digest",
                "case_count",
                "updated_at",
                "last_run"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthenticated",
                  "forbidden",
                  "not_found",
                  "conflict",
                  "invalid_request",
                  "idempotency_conflict",
                  "policy_denied",
                  "capability_unavailable",
                  "provider_unavailable",
                  "knowledge_unavailable",
                  "publication_invalid",
                  "run_not_active",
                  "rate_limited",
                  "outcome_unknown",
                  "internal"
                ]
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "none",
                  "unknown"
                ]
              },
              "details": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "code",
              "message",
              "retryable",
              "outcome"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

## Errors and recovery {#errors}

See [API error handling](https://docs.cumuluslabs.io/api#errors) and [Troubleshooting](https://docs.cumuluslabs.io/troubleshooting).

## Related guides {#related-guides}

- [Test an agent](https://docs.cumuluslabs.io/testing)
- [Build and test recipes](https://docs.cumuluslabs.io/recipes)
