{
  "opencollection": "1.0.0",
  "info": {
    "name": "Atlassian Admin Account Content - Attachments API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Content - Attachments",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Atlassian Get Attachments",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/wiki/rest/api/content/:id/child/attachment",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The ID of the content to be queried for its attachments."
              },
              {
                "name": "expand",
                "value": "",
                "type": "query",
                "description": "A multi-value parameter indicating which properties of the content to expand.\n\n- `childTypes.all` returns whether the content has attachments, comments, or child pages/whiteboards.\nUse this if you only need to check whether the content has children of a particular type.\n- `childTypes.attachment` returns whether the content has attachments.\n- `childTypes.comment` returns whether the content has comments.\n- `childTypes.page` returns whether the content has child pages.\n- `container` returns the space that the content is in. This is the same as the information\nreturned by [Get space](#api-space-spaceKey-get).\n- `metadata.currentuser` returns information about the current user in relation to the content,\nincluding when they last viewed it, modified it, contributed to it, or added it as a favorite.\n- `metadata.properties` returns content properties that have been set via the Confluence REST API.\n- `metadata.labels` returns the labels that have been added to the content.\n- `metadata.frontend` this property is only used by Atlassian.\n- `operations` returns the operations for the content, which are used when setting permissions.\n- `children.page` returns pages that are descendants at the level immediately below the content.\n- `children.attachment` returns all attachments for the content.\n- `children.comment` returns all comments on the content.\n- `restrictions.read.restrictions.user` returns the users that have permission to read the content.\n- `restrictions.read.restrictions.group` returns the groups that have permission to read the content. Note that\nthis may return deleted groups, because deleting a group doesn't remove associated restrictions.\n- `restrictions.update.restrictions.user` returns the users that have permission to update the content.\n- `restrictions.update.restrictions.group` returns the groups that have permission to update the content. Note that\nthis may return deleted groups because deleting a group doesn't remove associated restrictions.\n- `history` returns the history of the content, including the date it was created.\n- `history.lastUpdated` returns information about the most recent update of the content, including\nwho updated it and when it was updated.\n- `history.previousVersion` returns information about the update prior to the current content update.\n- `history.contributors` returns all of the users who have contributed to the content.\n- `history.nextVersion` returns information about the update after to the current content update.\n- `ancestors` returns the parent content, if the content is a page or whiteboard.\n- `body` returns the body of the content in different formats, including the editor format,\nview format, and export format.\n- `body.storage` returns the body of content in storage format.\n- `body.view` returns the body of content in view format.\n- `version` returns information about the most recent update of the content, including who updated it\nand when it was updated.\n- `descendants.page` returns pages that are descendants at any level below the content.\n- `descendants.attachment` returns all attachments for the content, same as `children.attachment`.\n- `descendants.comment` returns all comments on the content, same as `children.comment`.\n- `space` returns the space that the content is in. This is the same as the information returned by\n[Get space](#api-space-spaceKey-get).\n\nIn addition, the following comment-specific expansions can be used:\n- `extensions.inlineProperties` returns inline comment-specific properties.\n- `extensions.resolution` returns the resolution status of each comment."
              },
              {
                "name": "start",
                "value": "",
                "type": "query",
                "description": "The starting index of the returned attachments."
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "The maximum number of attachments to return per page.\nNote, this may be restricted by fixed system limits."
              },
              {
                "name": "filename",
                "value": "",
                "type": "query",
                "description": "Filter the results to attachments that match the filename."
              },
              {
                "name": "mediaType",
                "value": "",
                "type": "query",
                "description": "Filter the results to attachments that match the media type."
              }
            ]
          },
          "docs": "Deprecated, use [Confluence's v2 API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).<br><br>Returns the attachments for a piece of content.<br><br>By default, the following objects are expanded: `metadata`.<br><br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:<br>Permission to view the content. If the content is a blog post, 'View' permission<br>for the space is required."
        },
        {
          "info": {
            "name": "Atlassian Create Attachment",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.atlassian.com/wiki/rest/api/content/:id/child/attachment",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The ID of the content to add the attachment to."
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "The status of the content that the attachment is being added to."
              }
            ],
            "body": {
              "type": "multipart-form",
              "data": [
                {
                  "name": "file",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "comment",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "minorEdit",
                  "type": "text",
                  "value": ""
                }
              ]
            }
          },
          "docs": "Adds an attachment to a piece of content. This method only adds a new<br>attachment. If you want to update an existing attachment, use<br>[Create or update attachments](#api-content-id-child-attachment-put).<br><br>Note, you must set a `X-Atlassian-Token: nocheck` header on the request<br>for this method, otherwise it will be blocked. This protects against XSRF<br>attacks, which is necessary as this method accepts multipart/form-data.<br><br>The media type 'multipart/form-data' is defined in [RF"
        },
        {
          "info": {
            "name": "Atlassian Create Or Update Attachment",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.atlassian.com/wiki/rest/api/content/:id/child/attachment",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The ID of the content to add the attachment to."
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "The status of the content that the attachment is being added to.\nThis should always be set to 'current'."
              }
            ],
            "body": {
              "type": "multipart-form",
              "data": [
                {
                  "name": "file",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "comment",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "minorEdit",
                  "type": "text",
                  "value": ""
                }
              ]
            }
          },
          "docs": "Adds an attachment to a piece of content. If the attachment already exists<br>for the content, then the attachment is updated (i.e. a new version of the<br>attachment is created).<br><br>Note, you must set a `X-Atlassian-Token: nocheck` header on the request<br>for this method, otherwise it will be blocked. This protects against XSRF<br>attacks, which is necessary as this method accepts multipart/form-data.<br><br>The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org"
        },
        {
          "info": {
            "name": "Atlassian Update Attachment Properties",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.atlassian.com/wiki/rest/api/content/:id/child/attachment/:attachmentId",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The ID of the content that the attachment is attached to."
              },
              {
                "name": "attachmentId",
                "value": "",
                "type": "path",
                "description": "The ID of the attachment to update."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the attachment properties, i.e. the non-binary data of an attachment<br>like the filename, media-type, comment, and parent container.<br><br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:<br>Permission to update the content."
        },
        {
          "info": {
            "name": "Atlassian Update Attachment Data",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.atlassian.com/wiki/rest/api/content/:id/child/attachment/:attachmentId/data",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The ID of the content that the attachment is attached to."
              },
              {
                "name": "attachmentId",
                "value": "",
                "type": "path",
                "description": "The ID of the attachment to update."
              }
            ],
            "body": {
              "type": "multipart-form",
              "data": [
                {
                  "name": "file",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "comment",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "minorEdit",
                  "type": "text",
                  "value": ""
                }
              ]
            }
          },
          "docs": "Updates the binary data of an attachment, given the attachment ID, and<br>optionally the comment and the minor edit field.<br><br>This method is essentially the same as [Create or update attachments](#api-content-id-child-attachment-put),<br>except that it matches the attachment ID rather than the name.<br><br>Note, you must set a `X-Atlassian-Token: nocheck` header on the request<br>for this method, otherwise it will be blocked. This protects against XSRF<br>attacks, which is necessary as this "
        },
        {
          "info": {
            "name": "Atlassian Get Uri To Download Attachment",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/wiki/rest/api/content/:id/child/attachment/:attachmentId/download",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The ID of the content that the attachment is attached to."
              },
              {
                "name": "attachmentId",
                "value": "",
                "type": "path",
                "description": "The ID of the attachment to download."
              },
              {
                "name": "version",
                "value": "",
                "type": "query",
                "description": "The version of the attachment. If this parameter is absent, the redirect URI will download the latest version of the attachment."
              }
            ]
          },
          "docs": "Redirects the client to a URL that serves an attachment's binary data."
        }
      ]
    }
  ],
  "bundled": true
}