---
title: "Count cases"
method: GET
path: "/api/v2/cases/count"
tags: ["Case Management"]
---

# Count cases

`GET /api/v2/cases/count`

Returns case counts, optionally grouped by one or more fields (for example, status, priority). Supports a query filter to narrow the scope.

## Query parameters

- `query_filter` string
- `group_bys` string
- `limit` integer

## Response `200`

OK

- CaseCountResponse — Response containing the total number of cases matching a query, optionally grouped by specified fields.
  - `data` CaseCountResponseData, required — Data object containing the count results, including per-field group breakdowns.
    - `attributes` CaseCountResponseAttributes, required — Attributes for the count response, including the total count and optional facet breakdowns.
      - `groups` CaseCountGroup[], required — List of facet groups, one per field specified in `group_bys`.
        - `group` string, required — The name of the field being grouped on (for example, `status` or `priority`).
        - `group_values` CaseCountGroupValue[], required — Values within this group.
          - `count` integer, required — Count of cases for this value.
          - `value` string, required — The group value.
    - `id` string, required — Count response identifier.
    - `type` string, required — Count resource type.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/versions/da68bf029e4c/schema)
