Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

Get raw attachment expansion

Tries to expand an attachment. Output is raw and should be backwards-compatible through the course of time.

GET/api/2/attachment/{id}/expand/raw
Authorization
AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

or
AuthorizationBearer token · headerrequired

Personal Access Token — Administration > Profile > Personal Access Tokens

AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

Path parameters
idstringrequired

the id of the attachment to expand.

Responses
200

JSON representation of the attachment expanded contents. Empty entry list means that attachment cannot be expanded. It's either empty, corrupt or not an archive at all.

entriesAttachmentArchiveEntry[]
Show properties
Array of AttachmentArchiveEntry
abbreviatedNamestring
entryIndexinteger<int64>
mediaTypestring
namestring
sizeinteger<int64>
totalEntryCountinteger<int32>

Total number of entries available (can be larger that what was asked for)

403

The calling user is not permitted to view the requested attachment.

404

Any of: there is no attachment with the requested id, attachments feature is disabled

409

The archive format is not supported. since v6.4

Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://jira.example.com/rest/api/2/attachment/string/expand/raw' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json'
Response
{
  "entries": [
    {
      "entryIndex": 0,
      "name": "Allegro from Duet in C Major.mp3",
      "size": 1430174,
      "mediaType": "audio/mpeg"
    },
    {
      "entryIndex": 1,
      "name": "lrm.rtf",
      "size": 331,
      "mediaType": "text/rtf"
    }
  ],
  "totalEntryCount": 24
}

Was this page helpful?