Atlassian Issue Attachments API

The Issue Attachments API from Atlassian — 7 operation(s) for issue attachments.

Operations 8

GET /rest/api/3/attachment/content/{id} Atlassian Get Attachment Content #
GET /rest/api/3/attachment/meta Atlassian Get Jira Attachment Settings #
GET /rest/api/3/attachment/thumbnail/{id} Atlassian Get Attachment Thumbnail #
DELETE /rest/api/3/attachment/{id} Atlassian Delete Attachment #
GET /rest/api/3/attachment/{id} Atlassian Get Attachment Metadata #
GET /rest/api/3/attachment/{id}/expand/human Atlassian Get All Metadata For An Expanded Attachment #
GET /rest/api/3/attachment/{id}/expand/raw Atlassian Get Contents Metadata For An Expanded Attachment #
POST /rest/api/3/issue/{issueIdOrKey}/attachments Atlassian Add Attachment #

Documentation

📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-addon/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-webhooks/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-snippets/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/
📖
Documentation
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-users/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-analytics/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-audit/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/connect-modules/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v2/intro/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-body/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-inline-tasks
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-labels/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-long-running-task/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-relation/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-settings/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template/
📖
Documentation
https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-user/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-announcement-banner/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-values--apps-/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-app-openapi
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-application-roles/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/
📖
Documentation
https://developer.atlassian.com/server/framework/atlassian-sdk/audit/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-avatars/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-classification-levels/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-components/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jira-settings/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/getting-started-with-connect/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/connect-api-migration/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-service-registry/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-dashboards/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/data-security-policy-developer-guide/
📖
Documentation
https://developer.atlassian.com/platform/forge/events-reference/jira/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jira-expressions/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-field-configurations/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-filters/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/forge/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-groups/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-group-and-user-picker/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-links/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-security-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-types/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-type-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-type-screen-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-labels/
📖
Documentation
https://developer.atlassian.com/platform/marketplace/license-api-for-cloud-apps/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-license-metrics/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permissions/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-myself/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-notification-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-permission-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-priorities/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-categories/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-key-and-name-validation/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-resolutions/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-roles/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-screens/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-screen-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-security-level/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-server-info/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-statuses/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-status-categories/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-ui-modifications--apps-/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-avatars/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/
📖
Documentation
https://developer.atlassian.com/server/jira/platform/webhooks/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflows/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflow-schemes/
📖
Documentation
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-worklogs/
📖
Documentation
https://developer.atlassian.com/cloud/admin/organization/rest/
📖
Documentation
https://developer.atlassian.com/cloud/admin/user-management/rest/
📖
Documentation
https://developer.atlassian.com/cloud/admin/user-provisioning/rest/

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-hook-events-paginated_hook_events-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-pull-requests-a_pullrequest_comment_task-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-repositories-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-snippets-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-teams-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-user-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-bitbucket-workspaces-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-content-body-async-content-body-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-content-states-async-id-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-group-group-array-with-links-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-inline-tasks-task-page-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-longtask-long-task-status-with-links-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-search-search-page-response-search-result-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-space-content-state-settings-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-template-blueprint-template-array-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-user-account-id-email-record-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-admin-domain-page-schema.json

Other Resources

🔗
GraphQL
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/graphql/atlassian-graphql.md
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-hook-events-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-pull-requests-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-repositories-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-snippets-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-teams-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-user-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-bitbucket-workspaces-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-audit-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-content-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-content-body-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-content-states-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-group-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-inline-tasks-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-longtask-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-relation-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-search-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-settings-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-space-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-template-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-confluence-user-context.jsonld
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-ld/atlassian-admin-context.jsonld

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/atlassian-issue-attachments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

atlassian-issue-attachments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: ecosystem@atlassian.com
  description: Jira Cloud platform REST API documentation
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://atlassian.com/terms/
  title: Atlassian The Jira Cloud platform REST Issue Attachments API
  version: 1001.0.0-SNAPSHOT-67b5c6e5f3598d7ec1649016d026468ab2838a77
servers:
- url: https://your-domain.atlassian.net
tags:
- name: Issue Attachments
paths:
  /rest/api/3/attachment/content/{id}:
    get:
      deprecated: false
      description: Returns the contents of an attachment. A `Range` header can be set to define a range of bytes within the attachment to download. See the [HTTP Range header standard](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range) for details.<br><br>To return a thumbnail of the attachment, use [Get attachment thumbnail](#api-rest-api-3-attachment-thumbnail-id-get).<br><br>This operation can be accessed anonymously.<br><br>**[Permissions](#permissions) required:** For the issue containing the attachment:<br><br> *  *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.<br> *  If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
      operationId: atlassianGetattachmentcontent
      parameters:
      - description: The ID of the attachment.
        in: path
        name: id
        required: true
        schema:
          type: string
      - description: Whether a redirect is provided for the attachment download. Clients that do not automatically follow redirects can set this to `false` to avoid making multiple requests to download the attachment.
        in: query
        name: redirect
        schema:
          default: true
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StreamingResponseBody'
          description: Returned if the request is successful when `redirect` is set to `false`.
        '206':
          description: Returned if the request is successful when a `Range` header is provided and `redirect` is set to `false`.
        '303':
          description: Returned if the request is successful. See the `Location` header for the download URL.
        '400':
          description: Returned if the range supplied in the `Range` header is malformed.
        '401':
          description: Returned if the authentication credentials are incorrect.
        '403':
          description: The user does not have the necessary permission.
        '404':
          description: "Returned if:\n\n *  the attachment is not found.\n *  attachments are disabled in the Jira settings."
        '416':
          description: Returned if the server is unable to satisfy the range of bytes provided.
      security:
      - basicAuth: []
      - OAuth2:
        - read:jira-work
      - {}
      summary: Atlassian Get Attachment Content
      tags:
      - Issue Attachments
      x-atlassian-data-security-policy:
      - app-access-rule-exempt: false
      x-atlassian-oauth2-scopes:
      - scheme: OAuth2
        scopes:
        - read:jira-work
        state: Current
      - scheme: OAuth2
        scopes:
        - read:attachment:jira
        state: Beta
      x-atlassian-connect-scope: READ
  /rest/api/3/attachment/meta:
    get:
      deprecated: false
      description: Returns the attachment settings, that is, whether attachments are enabled and the maximum attachment size allowed.<br><br>Note that there are also [project permissions](https://confluence.atlassian.com/x/yodKLg) that restrict whether users can create and delete attachments.<br><br>This operation can be accessed anonymously.<br><br>**[Permissions](#permissions) required:** None.
      operationId: atlassianGetattachmentmeta
      parameters: []
      responses:
        '200':
          content:
            application/json:
              example: '{"enabled":true,"uploadLimit":1000000}'
              schema:
                $ref: '#/components/schemas/AttachmentSettings'
          description: Returned if the request is successful.
        '401':
          description: Returned if the authentication credentials are incorrect or missing.
      security:
      - basicAuth: []
      - OAuth2:
        - read:jira-work
      - {}
      summary: Atlassian Get Jira Attachment Settings
      tags:
      - Issue Attachments
      x-atlassian-data-security-policy:
      - app-access-rule-exempt: true
      x-atlassian-oauth2-scopes:
      - scheme: OAuth2
        scopes:
        - read:jira-work
        state: Current
      - scheme: OAuth2
        scopes:
        - read:instance-configuration:jira
        state: Beta
      x-atlassian-connect-scope: READ
  /rest/api/3/attachment/thumbnail/{id}:
    get:
      deprecated: false
      description: Returns the thumbnail of an attachment.<br><br>To return the attachment contents, use [Get attachment content](#api-rest-api-3-attachment-content-id-get).<br><br>This operation can be accessed anonymously.<br><br>**[Permissions](#permissions) required:** For the issue containing the attachment:<br><br> *  *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.<br> *  If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
      operationId: atlassianGetattachmentthumbnail
      parameters:
      - description: The ID of the attachment.
        in: path
        name: id
        required: true
        schema:
          type: string
      - description: Whether a redirect is provided for the attachment download. Clients that do not automatically follow redirects can set this to `false` to avoid making multiple requests to download the attachment.
        in: query
        name: redirect
        schema:
          default: true
          type: boolean
      - description: Whether a default thumbnail is returned when the requested thumbnail is not found.
        in: query
        name: fallbackToDefault
        schema:
          default: true
          type: boolean
      - description: The maximum width to scale the thumbnail to.
        in: query
        name: width
        schema:
          format: int32
          type: integer
      - description: The maximum height to scale the thumbnail to.
        in: query
        name: height
        schema:
          format: int32
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StreamingResponseBody'
          description: Returned if the request is successful when `redirect` is set to `false`.
        '303':
          description: Returned if the request is successful. See the `Location` header for the download URL.
        '400':
          description: Returned if the request is invalid.
        '401':
          description: Returned if the authentication credentials are incorrect.
        '403':
          description: The user does not have the necessary permission.
        '404':
          description: "Returned if:\n\n *  the attachment is not found.\n *  attachments are disabled in the Jira settings.\n *  `fallbackToDefault` is `false` and the request thumbnail cannot be downloaded."
      security:
      - basicAuth: []
      - OAuth2:
        - read:jira-work
      - {}
      summary: Atlassian Get Attachment Thumbnail
      tags:
      - Issue Attachments
      x-atlassian-data-security-policy:
      - app-access-rule-exempt: false
      x-atlassian-oauth2-scopes:
      - scheme: OAuth2
        scopes:
        - read:jira-work
        state: Current
      - scheme: OAuth2
        scopes:
        - read:attachment:jira
        state: Beta
      x-atlassian-connect-scope: READ
  /rest/api/3/attachment/{id}:
    delete:
      deprecated: false
      description: Deletes an attachment from an issue.<br><br>This operation can be accessed anonymously.<br><br>**[Permissions](#permissions) required:** For the project holding the issue containing the attachment:<br><br> *  *Delete own attachments* [project permission](https://confluence.atlassian.com/x/yodKLg) to delete an attachment created by the calling user.<br> *  *Delete all attachments* [project permission](https://confluence.atlassian.com/x/yodKLg) to delete an attachment created by any user.
      operationId: atlassianRemoveattachment
      parameters:
      - description: The ID of the attachment.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Returned if the request is successful.
        '403':
          description: Returned if the user does not have the necessary permission.
        '404':
          description: "Returned if:\n\n *  the attachment is not found.\n *  attachments are disabled in the Jira settings."
      security:
      - basicAuth: []
      - OAuth2:
        - write:jira-work
      - {}
      summary: Atlassian Delete Attachment
      tags:
      - Issue Attachments
      x-atlassian-data-security-policy:
      - app-access-rule-exempt: false
      x-atlassian-oauth2-scopes:
      - scheme: OAuth2
        scopes:
        - write:jira-work
        state: Current
      - scheme: OAuth2
        scopes:
        - delete:attachment:jira
        state: Beta
      x-atlassian-connect-scope: DELETE
    get:
      deprecated: false
      description: Returns the metadata for an attachment. Note that the attachment itself is not returned.<br><br>This operation can be accessed anonymously.<br><br>**[Permissions](#permissions) required:**<br><br> *  *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.<br> *  If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
      operationId: atlassianGetattachment
      parameters:
      - description: The ID of the attachment.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              example: '{"author":{"accountId":"5b10a2844c20165700ede21g","accountType":"atlassian","active":false,"avatarUrls":{"16x16":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16","24x24":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24","32x32":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32","48x48":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"},"displayName":"Mia Krystof","key":"","name":"","self":"https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"},"content":"https://your-domain.atlassian.net/jira/rest/api/3/attachment/content/10000","created":"2022-10-06T07:32:47.000+0000","filename":"picture.jpg","id":10000,"mimeType":"image/jpeg","self":"https://your-domain.atlassian.net/rest/api/3/attachments/10000","size":23123,"thumbnail":"https://your-domain.atlassian.net/jira/rest/api/3/attachment/thumbnail/10000"}'
              schema:
                $ref: '#/components/schemas/AttachmentMetadata'
          description: Returned if the request is successful.
        '401':
          description: Returned if the authentication credentials are incorrect or missing.
        '403':
          description: Returned if the user does not have the necessary permission.
        '404':
          description: "Returned if:\n\n *  the attachment is not found.\n *  attachments are disabled in the Jira settings."
      security:
      - basicAuth: []
      - OAuth2:
        - read:jira-work
      - {}
      summary: Atlassian Get Attachment Metadata
      tags:
      - Issue Attachments
      x-atlassian-data-security-policy:
      - app-access-rule-exempt: false
      x-atlassian-oauth2-scopes:
      - scheme: OAuth2
        scopes:
        - read:jira-work
        state: Current
      - scheme: OAuth2
        scopes:
        - read:attachment:jira
        - read:user:jira
        - read:application-role:jira
        - read:avatar:jira
        - read:group:jira
        state: Beta
      x-atlassian-connect-scope: READ
  /rest/api/3/attachment/{id}/expand/human:
    get:
      deprecated: false
      description: Returns the metadata for the contents of an attachment, if it is an archive, and metadata for the attachment itself. For example, if the attachment is a ZIP archive, then information about the files in the archive is returned and metadata for the ZIP archive. Currently, only the ZIP archive format is supported.<br><br>Use this operation to retrieve data that is presented to the user, as this operation returns the metadata for the attachment itself, such as the attachment's ID and name. Otherwise, use [ Get contents metadata for an expanded attachment](#api-rest-api-3-attachment-id-expand-raw-get), which only returns the metadata for the attachment's contents.<br><br>This operation can be accessed anonymously.<br><br>**[Permissions](#permissions) required:** For the issue containing the attachment:<br><br> *  *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.<br> *  If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
      operationId: atlassianExpandattachmentforhumans
      parameters:
      - description: The ID of the attachment.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              example: '{"entries":[{"index":0,"label":"MG00N067.JPG","mediaType":"image/jpeg","path":"MG00N067.JPG","size":"119 kB"},{"index":1,"label":"Allegro from Duet in C Major.mp3","mediaType":"audio/mpeg","path":"Allegro from Duet in C Major.mp3","size":"1.36 MB"},{"index":2,"label":"long/path/thanks/to/.../reach/the/leaf.txt","mediaType":"text/plain","path":"long/path/thanks/to/lots/of/subdirectories/inside/making/it/quite/hard/to/reach/the/leaf.txt","size":"0.0 k"}],"id":7237823,"mediaType":"application/zip","name":"images.zip","totalEntryCount":39}'
              schema:
                $ref: '#/components/schemas/AttachmentArchiveMetadataReadable'
          description: Returned if the request is successful. If an empty list is returned in the response, the attachment is empty, corrupt, or not an archive.
        '401':
          description: Returned if the authentication credentials are incorrect or missing.
        '403':
          description: The user does not have the necessary permission.
        '404':
          description: "Returned if:\n\n *  the attachment is not found.\n *  attachments are disabled in the Jira settings."
        '409':
          description: Returned if the attachment is an archive, but not a supported archive format.
      security:
      - basicAuth: []
      - OAuth2:
        - read:jira-work
      - {}
      summary: Atlassian Get All Metadata For An Expanded Attachment
      tags:
      - Issue Attachments
      x-atlassian-data-security-policy:
      - app-access-rule-exempt: false
      x-atlassian-oauth2-scopes:
      - scheme: OAuth2
        scopes:
        - read:jira-work
        state: Current
      - scheme: OAuth2
        scopes:
        - read:attachment:jira
        state: Beta
      x-experimental: true
      x-atlassian-connect-scope: READ
  /rest/api/3/attachment/{id}/expand/raw:
    get:
      deprecated: false
      description: 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.<br><br>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-3-attachment-id-expand-human-get) which also returns the metadata for the attachment itself, such as the attachment's ID and name.<br><br>This operation can be accessed anonymously.<br><br>**[Permissions](#permissions) required:** For the issue containing the attachment:<br><br> *  *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.<br> *  If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.
      operationId: atlassianExpandattachmentformachines
      parameters:
      - description: The ID of the attachment.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              example: '{"entries":[{"entryIndex":0,"mediaType":"audio/mpeg","name":"Allegro from Duet in C Major.mp3","size":1430174},{"entryIndex":1,"mediaType":"text/rtf","name":"lrm.rtf","size":331}],"totalEntryCount":24}'
              schema:
                $ref: '#/components/schemas/AttachmentArchiveImpl'
          description: Returned if the request is successful. If an empty list is returned in the response, the attachment is empty, corrupt, or not an archive.
        '401':
          description: Returned if the authentication credentials are incorrect or missing.
        '403':
          description: The user does not have the necessary permission.
        '404':
          description: "Returned if:\n\n *  the attachment is not found.\n *  attachments are disabled in the Jira settings."
        '409':
          description: Returned if the attachment is an archive, but not a supported archive format.
      security:
      - basicAuth: []
      - OAuth2:
        - read:jira-work
      - {}
      summary: Atlassian Get Contents Metadata For An Expanded Attachment
      tags:
      - Issue Attachments
      x-atlassian-data-security-policy:
      - app-access-rule-exempt: false
      x-atlassian-oauth2-scopes:
      - scheme: OAuth2
        scopes:
        - read:jira-work
        state: Current
      - scheme: OAuth2
        scopes:
        - read:attachment:jira
        state: Beta
      x-experimental: true
      x-atlassian-connect-scope: READ
  /rest/api/3/issue/{issueIdOrKey}/attachments:
    post:
      deprecated: false
      description: 'Adds one or more attachments to an issue. Attachments are posted as multipart/form-data ([RFC 1867](https://www.ietf.org/rfc/rfc1867.txt)).<br><br>Note that:<br><br> *  The request must have a `X-Atlassian-Token: no-check` header, if not it is blocked. See [Special headers](#special-request-headers) for more information.<br> *  The name of the multipart/form-data parameter that contains the attachments must be `file`.<br><br>The following examples upload a file called *myfile.txt* to the issue *TEST-123*:<br><br>#### curl ####<br><br>    curl --location --request POST ''https://your-domain.atlassian.net/rest/api/3/issue/TEST-123/attachments''<br>     -u ''email@example.com:''<br>     -H ''X-Atlassian-Token: no-check''<br>     --form ''file=@"myfile.txt"''<br><br>#### Node.js ####<br><br>    // This code sample uses the ''node-fetch'' and ''form-data'' libraries:<br>     // https://www.npmjs.com/package/node-fetch<br>     // https://www.npmjs.com/package/form-data<br>     const fetch = require(''node-fetch'');<br>     const FormData = require(''form-data'');<br>     const fs = require(''fs'');<br>    <br>     const filePath = ''myfile.txt'';<br>     const form = new FormData();<br>     const stats = fs.statSync(filePath);<br>     const fileSizeInBytes = stats.size;<br>     const fileStream = fs.createReadStream(filePath);<br>    <br>     form.append(''file'', fileStream, {knownLength: fileSizeInBytes});<br>    <br>     fetch(''https://your-domain.atlassian.net/rest/api/3/issue/TEST-123/attachments'', {<br>         method: ''POST'',<br>         body: form,<br>         headers: {<br>             ''Authorization'': `Basic ${Buffer.from(<br>                 ''email@example.com:''<br>             ).toString(''base64'')}`,<br>             ''Accept'': ''application/json'',<br>             ''X-Atlassian-Token'': ''no-check''<br>         }<br>     })<br>         .then(response => {<br>             console.log(<br>                 `Response: ${response.status} ${response.statusText}`<br>             );<br>             return response.text();<br>         })<br>         .then(text => console.log(text))<br>         .catch(err => console.error(err));<br><br>#### Java ####<br><br>    // This code sample uses the  ''Unirest'' library:<br>     // http://unirest.io/java.html<br>     HttpResponse response = Unirest.post("https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments")<br>             .basicAuth("email@example.com", "")<br>             .header("Accept", "application/json")<br>             .header("X-Atlassian-Token", "no-check")<br>             .field("file", new File("myfile.txt"))<br>             .asJson();<br>    <br>             System.out.println(response.getBody());<br><br>#### Python ####<br><br>    # This code sample uses the ''requests'' library:<br>     # http://docs.python-requests.org<br>     import requests<br>     from requests.auth import HTTPBasicAuth<br>     import json<br>    <br>     url = "https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments"<br>    <br>     auth = HTTPBasicAuth("email@example.com", "")<br>    <br>     headers = {<br>        "Accept": "application/json",<br>        "X-Atlassian-Token": "no-check"<br>     }<br>    <br>     response = requests.request(<br>        "POST",<br>        url,<br>        headers = headers,<br>        auth = auth,<br>        files = {<br>             "file": ("myfile.txt", open("myfile.txt","rb"), "application-type")<br>        }<br>     )<br>    <br>     print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))<br><br>#### PHP ####<br><br>    // This code sample uses the ''Unirest'' library:<br>     // http://unirest.io/php.html<br>     Unirest\Request::auth(''email@example.com'', '''');<br>    <br>     $headers = array(<br>       ''Accept'' => ''application/json'',<br>       ''X-Atlassian-Token'' => ''no-check''<br>     );<br>    <br>     $parameters = array(<br>       ''file'' => File::add(''myfile.txt'')<br>     );<br>    <br>     $response = Unirest\Request::post(<br>       ''https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/attachments'',<br>       $headers,<br>       $parameters<br>     );<br>    <br>     var_dump($response)<br><br>#### Forge ####<br><br>    // This sample uses Atlassian Forge and the `form-data` library.<br>     // https://developer.atlassian.com/platform/forge/<br>     // https://www.npmjs.com/package/form-data<br>     import api from "@forge/api";<br>     import FormData from "form-data";<br>    <br>     const form = new FormData();<br>     form.append(''file'', fileStream, {knownLength: fileSizeInBytes});<br>    <br>     const response = await api.asApp().requestJira(''/rest/api/2/issue/{issueIdOrKey}/attachments'', {<br>         method: ''POST'',<br>         body: form,<br>         headers: {<br>             ''Accept'': ''application/json'',<br>             ''X-Atlassian-Token'': ''no-check''<br>         }<br>     });<br>    <br>     console.log(`Response: ${response.status} ${response.statusText}`);<br>     console.log(await response.json());<br><br>Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) class for multipart POST operations.<br><br>This operation can be accessed anonymously.<br><br>**[Permissions](#permissions) required:** <br><br> *  *Browse Projects* and *Create attachments* [ project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.<br> *  If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.'
      operationId: atlassianAddattachment
      parameters:
      - description: The ID or key of the issue that attachments are added to.
        in: path
        name: issueIdOrKey
        required: true
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              items:
                $ref: '#/components/schemas/MultipartFile'
              type: array
        required: true
      responses:
        '200':
          content:
            application/json:
              example: '[{"author":{"accountId":"5b10a2844c20165700ede21g","active":true,"avatarUrls":{"16x16":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16","24x24":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24","32x32":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32","48x48":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"},"displayName":"Mia Krystof","emailAddress":"mia@example.com","self":"https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g","timeZone":"Australia/Sydney"},"content":"https://your-domain.atlassian.net/rest/api/3/attachment/content/10000","created":1651316514000,"filename":"picture.jpg","id":"10001","mimeType":"image/jpeg","self":"https://your-domain.atlassian.net/rest/api/3/attachments/10000","size":23123,"thumbnail":"https://your-domain.atlassian.net/rest/api/3/attachment/thumbnail/10000"},{"author":{"accountId":"5b10a2844c20165700ede21g","active":true,"avatarUrls":{"16x16":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16","24x24":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24","32x32":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32","48x48":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"},"displayName":"Mia Krystof","emailAddress":"mia@example.com","self":"https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g","timeZone":"Australia/Sydney"},"content":"https://your-domain.atlassian.net/rest/api/3/attachment/content/10001","created":1658898511000,"filename":"dbeuglog.txt","mimeType":"text/plain","self":"https://your-domain.atlassian.net/rest/api/3/attachments/10001","size":2460}]'
              schema:
                items:
                  $ref: '#/components/schemas/Attachment'
                type: array
          description: Returned if the request is successful.
        '403':
          description: Returned if the user does not have the necessary permission.
        '404':
          description: "Returned if any of the following is true:\n\n *  the issue is not found.\n *  the user does not have permission to view the issue."
        '413':
          description: The attachments exceed the maximum attachment size for issues, or more than 60 files are requested to be uploaded. See [Configuring file attachments](https://confluence.atlassian.com/x/wIXKM) for details.
      security:
      - basicAuth: []
      - OAuth2:
        - write:jira-work
      - {}
      summary: Atlassian Add Attachment
      tags:
      - Issue Attachments
      x-atlassian-data-security-policy:
      - app-access-rule-exempt: false
      x-atlassian-oauth2-scopes:
      - scheme: OAuth2
        scopes:
        - write:jira-work
        state: Current
      - scheme: OAuth2
        scopes:
        - read:user:jira
        - write:attachment:jira
        - read:attachment:jira
        - read:avatar:jira
        state: Beta
      x-atlassian-connect-scope: WRITE
components:
  schemas:
    StreamingResponseBody:
      additionalProperties: false
      type: object
    AttachmentArchiveImpl:
      additionalProperties: false
      properties:
        entries:
          description: The list of the items included in the archive.
          items:
            $ref: '#/components/schemas/AttachmentArchiveEntry'
          type: array
        totalEntryCount:
          description: The number of items in the archive.
          format: int32
          type: integer
      type: object
    AttachmentArchiveItemReadable:
      additionalProperties: false
      description: Metadata for an item in an attachment archive.
      properties:
        index:
          description: The position of the item within the archive.
          format: int64
          readOnly: true
          type: integer
        label:
          description: The label for the archive item.
          readOnly: true
          type: string
        mediaType:
          description: The MIME type of the archive item.
          readOnly: true
          type: string
        path:
          description: The path of the archive item.
          readOnly: true
          type: string
        size:
          description: The size of the archive item.
          readOnly: true
          type: string
      type: object
    MultipartFile:
      additionalProperties: false
      properties:
        bytes:
          items:
            format: byte
            type: string
          type: array
        contentType:
          type: string
        empty:
          type: boolean
        inputStream:
          type: object
        name:
          type: string
        originalFilename:
          type: string
        resource:
          $ref: '#/components/schemas/Resource'
        size:
          format: int64
          type: integer
      type: object
    Attachment:
      additionalProperties: true
      description: Details about an attachment.
      properties:
        author:
          allOf:
          - $ref: '#/components/schemas/UserDetails'
          description: Details of the user who added the attachment.
          readOnly: true
        content:
          description: The content of the attachment.
          readOnly: true
          type: string
        created:
          description: The datetime the attachment was created.
          format: date-time
          readOnly: true
          type: string
        filename:
          description: The file name of the attachment.
          readOnly: true
          type: string
        id:
          description: The ID of the attachment.
          readOnly: true
          type: string
        mimeType:
          description: The MIME type of the attachment.
          readOnly: true
          type: string
        self:
          description: The URL of the attachment details response.
          readOnly: true
          type: string
        size:
          description: The size of the attachment.
          format: int64
          readOnly: true
          type: integer
        thumbnail:
          description: The URL of a thumbnail representing the attachment.
          readOnly: true
          type: string
      type: object
    GroupName:
      additionalProperties: false
      description: Details about a group.
      properties:
        groupId:
          description: The ID of the group, which uniquely identifies the group across all Atlassian products. For example, *952d12c3-5b5b-4d04-bb32-44d383afc4b2*.
          type:
          - string
          - 'null'
        name:
          description: The name of group.
          type: string
        self:
          description: The URL for these group details.
          format: uri
          readOnly: true
          type: string
      type: object
    AttachmentArchiveMetadataReadable:
      additionalProperties: false
      description: Metadata for an archive (for example a zip) and its contents.
      prope

# --- truncated at 32 KB (72 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/openapi/atlassian-issue-attachments-api-openapi.yml