---
title: "Get contents metadata for an expanded attachment"
method: GET
path: "/rest/api/2/attachment/{id}/expand/raw"
tags: ["Issue attachments"]
---

# Get contents metadata for an expanded attachment

`GET /rest/api/2/attachment/{id}/expand/raw`

Returns the metadata for the contents of an attachment, if it is an archive. For example, if the attachment is a ZIP archive, then information about the files in the archive is returned. Currently, only the ZIP archive format is supported.

Use this operation if you are processing the data without presenting it to the user, as this operation only returns the metadata for the contents of the attachment. Otherwise, to retrieve data to present to the user, use [ Get all metadata for an expanded attachment](#api-rest-api-2-attachment-id-expand-human-get) which also returns the metadata for the attachment itself, such as the attachment's ID and name.

This operation can be accessed anonymously.

**[Permissions](#permissions) required:** For the issue containing the attachment:

 *  *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.
 *  If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
 *  If attachments are added in private comments, the comment-level restriction will be applied.

## Path parameters

- `id` string, required

## Response `200`

Returned if the request is successful. If an empty list is returned in the response, the attachment is empty, corrupt, or not an archive.

- AttachmentArchiveImpl
  - `entries` AttachmentArchiveEntry[] — The list of the items included in the archive.
    - `abbreviatedName` string
    - `entryIndex` integer
    - `mediaType` string
    - `name` string
    - `size` integer
  - `totalEntryCount` integer — The number of items in the archive.

## Other responses

- `401` — Returned if the authentication credentials are incorrect or missing.
- `403` — The user does not have the necessary permission.
- `404` — Returned if: * the attachment is not found. * attachments are disabled in the Jira settings.
- `409` — Returned if the attachment is an archive, but not a supported archive format.

---

[API](https://skmtc.dev/atlassian/apis/the-jira-cloud-platform-rest-api.md) · [All operations](https://skmtc.dev/atlassian/apis/the-jira-cloud-platform-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/atlassian/the-jira-cloud-platform-rest-api/revisions/7e9af75061ea/schema)
