---
type: api
title: Get a case comment or alert
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-getcasecommentdefaultspace
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-getcasecommentdefaultspace
products:
  - Kibana
---

# Get a case comment or alert

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

## Paths

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

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

#### Path Parameters

- `caseId` (string)
  The identifier for the case. To retrieve case IDs, use the search cases (`_find)` API. All non-ASCII characters must be URL encoded.
- `commentId` (string)
  The identifier for the comment. To retrieve comment IDs, use the get case or search cases (`_find`) APIs.

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

## Responses

#### `200`

Indicates a successful call.

`application/json`

One of:
- **Cases_alert_comment_response_properties**
  - `alertId` ([] string)
  - `created_at` (string)
  - `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) — 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.
  - `type` (enum)
    Values: `alert`
  - `updated_at` (string) — nullable
  - `updated_by` (object) — nullable
    - `email` (string) — nullable
    - `full_name` (string) — nullable
    - `profile_uid` (string)
    - `username` (string) — nullable
  - `version` (string)
- **Cases_user_comment_response_properties**
  - `comment` (string)
  - `created_at` (string)
  - `created_by` ({})
    - `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) — nullable
  - `pushed_by` ({}) — nullable
    - `email` (string) — nullable
    - `full_name` (string) — nullable
    - `profile_uid` (string)
    - `username` (string) — nullable
  - `type` (enum)
    Values: `user`
  - `updated_at` (string) — nullable
  - `updated_by` ({}) — 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 /api/cases/{caseId}/comments/{commentId}
```

#### curl

```curl
curl -X GET "https://{kibana_url}/api/cases/{caseId}/comments/{commentId}"
```

## Response Examples

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

```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.

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

