---
type: api
title: "Find case attachments"
description: "Returns a paginated list of attachments for a case, optionally filtered by type. Attachments that you do not have privileges to read are not returned. 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 case."
url: https://www.elastic.co/elastic/docs-builder/docs/5066/api/kibana/operation/operation-findcaseattachmentsdefaultspace
resource: https://www.elastic.co/elastic/docs-builder/docs/5066/api/kibana/operation/operation-findcaseattachmentsdefaultspace
products:
  - Kibana
---

# Find case attachments

Authentication: required

Availability: Planned

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

## Paths

- `GET` `/api/cases/{caseId}/attachments`
- `GET` `/s/{space_id}/api/cases/{caseId}/attachments`

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

## Description

Returns a paginated list of attachments for a case, optionally filtered by type. Attachments that you do not have privileges to read are not returned. 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 case.

## Query string parameters

- `type` (union string | string[]) — optional
  Filters the returned attachments by one or more attachment types, such as `comment` or `security.alert`. To filter by multiple types, repeat the parameter. Limited to 20 types.
  Example: `comment`
- `page` (integer · default: 1) — optional
  The page number to return.
- `perPage` (integer · max: 100 · default: 20) — optional
  The number of items to return. Limited to 100 items.
- `sortOrder` (enum · default: asc) — optional
  Sorts attachments by creation date: `asc` (oldest first) or `desc` (newest first).
  Values: `asc`, `desc`

## Responses

#### `200`

Indicates a successful call.

`application/json`

- `data` (object[])
  The attachments on the requested page.
  - `attachmentId` (union oneOf)
    The ID of the attached item, such as an alert or a dashboard. To attach several alerts, use an array. This isn't the attachment's own ID (`id`).
    One of: `string[]` or `string`
  - `created_at` (string · format: date-time)
  - `created_by` (object)
    - `email` (string) — nullable
    - `full_name` (string) — nullable
    - `profile_uid` (string)
    - `username` (string) — nullable
  - `data` (object) — nullable
    The attachment's content. Required for comments, where `content` is the comment text (up to 30,000 characters). In requests, it can be up to 524,288 characters when serialized as JSON and nest up to 30 levels deep.
  - `id` (string)
    The attachment identifier.
  - `metadata` (object) — nullable
    Extra details about the attachment. For alerts, this is the alert's index and rule. Required for some types, such as `dashboard`. In requests, it can be up to 524,288 characters when serialized as JSON and nest up to 30 levels deep.
  - `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
    When this attachment was last pushed to an external system, such as Jira. Is `null` if it hasn't been pushed.
  - `pushed_by` (object) — nullable
    - `email` (string) — nullable
    - `full_name` (string) — nullable
    - `profile_uid` (string)
    - `username` (string) — nullable
  - `type` (string)
    The attachment type, such as `comment`, `security.alert`, `observability.alert`, `stack.alert`, `security.event`, `lens`, `dashboard`, or `file`. `security.*` types only work on Security cases, `observability.*` on Observability cases, and `stack.*` on Stack Management cases. Use `comment` (not the legacy `user` type) and a `*.alert` type (not `alert`). You can't add or replace file attachments with this API. To add a file, use `POST /api/cases/{caseId}/files`.
  - `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)
    The attachment's current version. Include it when you replace the attachment.
- `page` (integer)
  The current page number.
- `per_page` (integer)
  The number of items per page.
- `total` (integer)
  The total number of matching attachments you can access. Attachments with invalid or unsupported data are counted but not returned, so a page can have fewer than `per_page` items.
#### `400`

A query parameter is invalid or exceeds its limit.

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (integer)
#### `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/attachments
```

#### curl

```curl
curl -X GET "${KIBANA_URL}/api/cases/9c235210-6834-11ea-a78c-6ffb38a34414/attachments" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### A page of case attachments.

`application/json`

```json
{
  "data": [
    {
      "created_at": "2026-09-30T19:32:13.104Z",
      "created_by": {
        "email": "null",
        "full_name": "null",
        "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0",
        "username": "elastic"
      },
      "data": {
        "content": "A new comment."
      },
      "id": "8048b460-fe2b-11ec-b15d-779a7c8bbcc3",
      "owner": "cases",
      "pushed_at": "null",
      "pushed_by": "null",
      "type": "comment",
      "updated_at": "null",
      "updated_by": "null",
      "version": "WzIzLDFd"
    }
  ],
  "page": 1,
  "per_page": 20,
  "total": 1
}
```

#### A query parameter exceeds its limit.

`application/json`

```json
{
  "error": "Bad Request",
  "message": "[request query]: The provided perPage value is too high. The maximum allowed perPage value is 100.",
  "statusCode": 400
}
```

#### Authorization information is missing or invalid.

`application/json`

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

