---
type: api
title: "Get a case comment or alert"
description: "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 with the comments you're seeking."
url: https://www.elastic.co/elastic/docs-builder/docs/4904/api/kibana/operation/operation-getcasecommentdefaultspace
resource: https://www.elastic.co/elastic/docs-builder/docs/4904/api/kibana/operation/operation-getcasecommentdefaultspace
products:
  - Kibana
---

# Get a case comment or alert

Authentication: required

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

## Paths

- `GET` `/api/cases/{caseId}/comments/{commentId}`
- `GET` `/s/{space_id}/api/cases/{caseId}/comments/{commentId}`

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
- `caseId` (string) — required
  The identifier for the case. To retrieve case IDs, use the search cases (`_find)` API. All non-ASCII characters must be URL encoded.
  Example: `9c235210-6834-11ea-a78c-6ffb38a34414`
- `commentId` (string) — required
  The identifier for the comment. To retrieve comment IDs, use the get case or search cases (`_find`) APIs.
  Example: `71ec1870-725b-11ea-a0b2-c51ea50a58e2`

## Description

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 with the comments you're seeking.

## Responses

#### `200`

Indicates a successful call.

`application/json`

One of:
- **Add case comment response properties for alerts**
  - `type` (enum)
    Values: `alert`
  - `alertId` (string[])
  - `created_at` (string · format: date-time)
  - `created_by` (object)
    - `email` (string) — nullable
    - `full_name` (string) — nullable
    - `profile_uid` (string)
    - `username` (string) — nullable
  - `id` (string)
  - `index` (string[])
  - `owner` (enum)
    The application that owns the cases: Stack Management, Observability, or Elastic Security.
    Values: `cases`, `observability`, `securitySolution`
  - `pushed_at` (string · format: date-time) — nullable
  - `pushed_by` (object) — nullable
    - `email` (string) — nullable
    - `full_name` (string) — nullable
    - `profile_uid` (string)
    - `username` (string) — nullable
  - `rule` (object)
    - `id` (string) — nullable
      The rule identifier.
    - `name` (string) — nullable
      The rule name.
  - `updated_at` (string · format: date-time) — nullable
  - `updated_by` (object) — nullable
    - `email` (string) — nullable
    - `full_name` (string) — nullable
    - `profile_uid` (string)
    - `username` (string) — nullable
  - `version` (string)
- **Case response properties for user comments**
  - `type` (enum)
    Values: `user`
  - `comment` (string)
  - `created_at` (string · format: date-time)
  - `created_by` (object)
    - `email` (string) — nullable
    - `full_name` (string) — nullable
    - `profile_uid` (string)
    - `username` (string) — nullable
  - `id` (string)
  - `owner` (enum)
    The application that owns the cases: Stack Management, Observability, or Elastic Security.
    Values: `cases`, `observability`, `securitySolution`
  - `pushed_at` (string · format: date-time) — nullable
  - `pushed_by` (object) — nullable
    - `email` (string) — nullable
    - `full_name` (string) — nullable
    - `profile_uid` (string)
    - `username` (string) — nullable
  - `updated_at` (string · format: date-time) — nullable
  - `updated_by` (object) — nullable
    - `email` (string) — nullable
    - `full_name` (string) — nullable
    - `profile_uid` (string)
    - `username` (string) — nullable
  - `version` (string)
#### `401`

Authorization information is missing or invalid.

`application/json`

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

#### Console

```console
GET kbn:/api/cases/9c235210-6834-11ea-a78c-6ffb38a34414/comments/71ec1870-725b-11ea-a0b2-c51ea50a58e2
```

#### curl

```curl
curl -X GET "${KIBANA_URL}/api/cases/9c235210-6834-11ea-a78c-6ffb38a34414/comments/71ec1870-725b-11ea-a0b2-c51ea50a58e2" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### A single user comment retrieved from a case

`application/json`

```json
{
  "comment": "A new comment",
  "created_at": "2023-10-07T19:32:13.104Z",
  "created_by": {
    "email": "null",
    "full_name": "null",
    "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0",
    "username": "elastic"
  },
  "id": "8048b460-fe2b-11ec-b15d-779a7c8bbcc3",
  "owner": "cases",
  "pushed_at": "null",
  "pushed_by": "null",
  "type": "user",
  "updated_at": "null",
  "updated_by": "null",
  "version": "WzIzLDFd"
}
```

#### Authorization information is missing or invalid.

`application/json`

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

