---
title: "Count an agent's active investigations"
method: GET
path: "/v1/agents/{id}/investigations/cancellable-counts"
tags: ["Agents"]
---

# Count an agent's active investigations

`GET /v1/agents/{id}/investigations/cancellable-counts`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/agents/{id}/investigations/cancellable-counts`
- Auth: one of:
  - API key in header `GREPR-API-KEY`
  - OpenID Connect (`https://grepr-prod.us.auth0.com/.well-known/openid-configuration`)

Returns how many of the agent's investigations are queued, running, or paused, and so would be cancelled by cancel-all, and whether the caller is authorized to call cancel-all for the agent.

## Path parameters

- `id` string, required

## Response `200`

Counts retrieved

- CancellableInvestigationsResponse
  - `canCancel` boolean, required
  - `counts` CancellableInvestigationCounts, required
    - `paused` integer, required
    - `queued` integer, required
    - `running` integer, required

## Other responses

- `401`: Unauthorized
- `404`: Agent not found

---

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