> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List test cases

> List paginated cases with criteria, collection and latest-run metadata.

List paginated cases with criteria, collection and latest-run metadata.

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token containing your workspace API key. The key needs `read` scope.
</ParamField>

## Query parameters

<ParamField query="botId" type="string" required>
  Agent UUID. The agent must belong to the workspace.
</ParamField>

<ParamField query="search" type="string">
  Case or collection name search, up to 200 characters.
</ParamField>

<ParamField query="folderId" type="string">
  Collection UUID used to filter results. Collections use the `folders` routes.
</ParamField>

<ParamField query="criteriaGroupId" type="string">
  Criteria-group UUID used to filter results.
</ParamField>

<ParamField query="artifactId" type="string">
  Match any linked artifact UUID, including references from shared criteria.
</ParamField>

<ParamField query="ruleId" type="string">
  Match linked rule UUID.
</ParamField>

<ParamField query="articleId" type="string">
  Match linked article UUID.
</ParamField>

<ParamField query="limit" type="number">
  Page size, 1 to 100. Defaults to 50.
</ParamField>

<ParamField query="offset" type="number">
  Zero-based offset. Defaults to 0.
</ParamField>

## Response

Returns `items`, `total`, `limit` and `offset`. The example has intentionally empty arrays for a case with no collections.

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api-prod.usefini.com/v2/test-suite/cases/public?botId=00000000-0000-4000-8000-000000000001&limit=50&offset=0' \
    --header 'Authorization: Bearer fini_your_api_key'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api-prod.usefini.com/v2/test-suite/cases/public?botId=00000000-0000-4000-8000-000000000001&limit=50&offset=0", {
    method: "GET",
    headers: {
      Authorization: "Bearer fini_your_api_key",
    },
  });
  if (!response.ok) throw new Error(await response.text());
  const result = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.request(
      "GET",
      "https://api-prod.usefini.com/v2/test-suite/cases/public?botId=00000000-0000-4000-8000-000000000001&limit=50&offset=0",
      headers={"Authorization": "Bearer fini_your_api_key"},
  )
  response.raise_for_status()
  result = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "items": [
      {
        "id": "00000000-0000-4000-8000-000000000002",
        "botId": "00000000-0000-4000-8000-000000000001",
        "name": "Refund policy",
        "sourceType": "scenario",
        "sourceInteractionId": null,
        "createdAt": "2026-10-12T10:00:00.000Z",
        "updatedAt": "2026-10-12T10:00:00.000Z",
        "artifacts": [
          {
            "kind": "rule",
            "id": "00000000-0000-4000-8000-000000000005",
            "name": "Refund workflow",
            "origin": "manual"
          }
        ],
        "criteriaGroupId": "00000000-0000-4000-8000-000000000003",
        "criteriaGroupIds": ["00000000-0000-4000-8000-000000000003"],
        "criteriaGroups": [{"id": "00000000-0000-4000-8000-000000000003", "name": "Refund checks"}],
        "criteriaGroupName": "Refund checks",
        "criteriaCount": 2,
        "localCriteriaCount": 1,
        "directCollectionMember": false,
        "groupCollectionMember": false,
        "folders": [],
        "setupState": "custom",
        "latestRun": null
      }
    ],
    "total": 1,
    "limit": 50,
    "offset": 0
  }
  ```
</ResponseExample>


## Related topics

- [Overview](/en/api-reference/test-suite.md)
- [Delete test case](/en/api-reference/delete-test-suite-case.md)
- [Update test case](/en/api-reference/update-test-suite-case.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.