---
type: api
title: Get cases for an alert
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-getcasesbyalertdefaultspace
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-getcasesbyalertdefaultspace
products:
  - Kibana
---

# Get cases for an alert

Availability:

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/cases/alerts/{alertId}`
- `GET` `/s/{space_id}/api/cases/alerts/{alertId}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#basicauth)

#### Path Parameters

- `alertId` (string)
  An identifier for the alert.

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.

## Query String Parameters

- `owner` (union oneOf)
  A filter to limit the response to a specific set of applications. If this parameter is omitted, the response contains information about all the cases that the user has access to read.
  Values: `cases`, `observability`, `securitySolution`

## Responses

#### `200`

Indicates a successful call.

`application/json`

Type: `[] object · max: 10000`

- `createdAt` (string)
  When the case was created.
- `description` (string)
  The case description.
- `id` (string)
  The case identifier.
- `status` (enum)
  The status of the case.
  Values: `closed`, `in-progress`, `open`
- `title` (string)
  The case title.
- `totals` ({})
  Counts of alerts, events, and user comments attached to a case.
  - `alerts` (integer)
    Number of alert attachments on the case.
  - `events` (integer)
    Number of event attachments on the case.
  - `userComments` (integer)
    Number of user comment attachments on the case.
#### `401`

Authorization information is missing or invalid.

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (integer)
## Code Examples

#### Console

```console
GET /api/cases/alerts/{alertId}
```

#### curl

```curl
curl -X GET "https://{kibana_url}/api/cases/alerts/{alertId}"
```

## Response Examples

#### Cases associated with a given alert.

```json
[
  {
    "createdAt": "2020-02-19T23:06:33.798Z",
    "description": "Investigating suspicious activity",
    "id": "06116b80-e1c3-11ec-be9b-9b1838238ee6",
    "status": "open",
    "title": "security_case",
    "totals": {
      "alerts": 1,
      "events": 0,
      "userComments": 0
    }
  }
]
```

#### Authorization information is missing or invalid.

```json
{
  "error": "Unauthorized",
  "message": "Unable to authenticate with the provided credentials.",
  "statusCode": 401
}
```

