Atlassian Issue Attachments API

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

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-audit-audit-record-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/atlassian/refs/heads/main/json-schema/atlassian-confluence-content-async-content-body-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-relation-relation-data-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-settings-look-and-feel-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

OpenAPI Specification

atlassian-issue-attachments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Atlassian Admin Account Issue Attachments API
  description: The Atlassian Admin API provides programmatic access to manage Atlassian organizations, users, domains, policies, and events. It enables administrators to automate organization management tasks, integrate with identity providers, and ensure appropriate access to Atlassian products.
  version: 1.0.0
  contact:
    name: Atlassian Developer
    url: https://developer.atlassian.com/cloud/admin/
  license:
    name: Atlassian Developer Terms
    url: https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/
  x-logo:
    url: https://wac-cdn.atlassian.com/assets/img/favicons/atlassian/favicon.png
servers:
- url: https://api.atlassian.com
  description: Atlassian Cloud API
security:
- bearerAuth: []
- oauth2: []
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:
    AttachmentSettings:
      additionalProperties: false
      description: Details of the instance's attachment settings.
      properties:
        enabled:
          description: Whether the ability to add attachments is enabled.
          readOnly: true
          type: boolean
        uploadLimit:
          description: The maximum size of attachments permitted, in bytes.
          format: int64
          readOnly: true
          type: integer
      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*.
          nullable: true
          type: string
        name:
          description: The name of group.
          type: string
        self:
          description: The URL for these group details.
          format: uri
          readOnly: true
          type: string
      type: object
    UserDetails:
      additionalProperties: false
      description: "User details permitted by the user's Atlassian Account privacy settings. However, be aware of these exceptions:\n\n *  User record deleted from Atlassian: This occurs as the result of a right to be forgotten request. In this case, `displayName` provides an indication and other parameters have default values or are blank (for example, email is blank).\n *  User record corrupted: This occurs as a results of events such as a server import and can only happen to deleted users. In this case, `accountId` returns *unknown* and all other parameters have fallback values.\n *  User record unavailable: This usually occurs due to an internal service outage. In this case, all parameters have fallback values."
      properties:
        accountId:
          description: The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
          maxLength: 128
          type: string
        accountType:
          description: The type of account represented by this user. This will be one of 'atlassian' (normal users), 'app' (application user) or 'customer' (Jira Service Desk customer user)
          readOnly: true
          type: string
        active:
          description: Whether the user is active.
          readOnly: true
          type: boolean
        avatarUrls:
          allOf:
          - $ref: '#/components/schemas/AvatarUrlsBean'
          description: The avatars of the user.
          readOnly: true
        displayName:
          description: The display name of the user. Depending on the user’s privacy settings, this may return an alternative value.
          readOnly: true
          type: string
        emailAddress:
          description: The email address of the user. Depending on the user’s privacy settings, this may be returned as null.
          readOnly: true
          type: string
        key:
          description: This property is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.
          readOnly: true
          type: string
        name:
          description: This property is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user

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