{
  "opencollection": "1.0.0",
  "info": {
    "name": "Atlassian Confluence Content Body API",
    "version": "1.0.0"
  },
  "items": [
    {
      "info": {
        "name": "Bodies",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Atlassian Convert Content Body",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "//your-domain.atlassian.net/wiki/rest/api/contentbody/convert/:to",
            "params": [
              {
                "name": "to",
                "value": "",
                "type": "path",
                "description": "The name of the target format for the content body."
              },
              {
                "name": "spaceKeyContext",
                "value": "",
                "type": "query",
                "description": "The space key used for resolving embedded content (page includes,\nfiles, and links) in the content body. For example, if the source content\ncontains the link `<ac:link><ri:page ri:content-title=\"Example page\" /><ac:link>`\nand the `spaceKeyContext=TEST` parameter is provided, then the link\nwill be converted to a link to the \"Example page\" page in the \"TEST\" space."
              },
              {
                "name": "contentIdContext",
                "value": "",
                "type": "query",
                "description": "The content ID used to find the space for resolving embedded content\n(page includes, files, and links) in the content body. For example,\nif the source content contains the link `<ac:link><ri:page ri:content-title=\"Example page\" /><ac:link>`\nand the `contentIdContext=123` parameter is provided, then the link\nwill be converted to a link to the \"Example page\" page in the same space\nthat has the content with ID=123. Note, `spaceKeyContext` will be ignored\nif this parameter is provided."
              },
              {
                "name": "embeddedContentRender",
                "value": "",
                "type": "query",
                "description": "Mode used for rendering embedded content, like attachments.\n\n- `current` renders the embedded content using the latest version.\n- `version-at-save` renders the embedded content using the version at\nthe time of save."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Converts a content body from one format to another format.<br><br>Supported conversions:<br><br>- storage: view, export_view, styled_view, editor<br>- editor: storage<br>- view: none<br>- export_view: none<br>- styled_view: none<br><br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:<br>If request specifies 'contentIdContext', 'View' permission for the space, and permission to view the content."
        }
      ]
    },
    {
      "info": {
        "name": "Asynchronously",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Atlassian Asynchronously Convert Content Body",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "//your-domain.atlassian.net/wiki/rest/api/contentbody/convert/async/:to",
            "params": [
              {
                "name": "to",
                "value": "",
                "type": "path",
                "description": "The name of the target format for the content body."
              },
              {
                "name": "spaceKeyContext",
                "value": "",
                "type": "query",
                "description": "The space key used for resolving embedded content (page includes,\nfiles, and links) in the content body. For example, if the source content\ncontains the link `<ac:link><ri:page ri:content-title=\"Example page\" /><ac:link>`\nand the `spaceKeyContext=TEST` parameter is provided, then the link\nwill be converted to a link to the \"Example page\" page in the \"TEST\" space."
              },
              {
                "name": "contentIdContext",
                "value": "",
                "type": "query",
                "description": "The content ID used to find the space for resolving embedded content\n(page includes, files, and links) in the content body. For example,\nif the source content contains the link `<ac:link><ri:page ri:content-title=\"Example page\" /><ac:link>`\nand the `contentIdContext=123` parameter is provided, then the link\nwill be converted to a link to the \"Example page\" page in the same space\nthat has the content with ID=123. Note, `spaceKeyContext` will be ignored\nif this parameter is provided."
              },
              {
                "name": "allowCache",
                "value": "",
                "type": "query",
                "description": "If this field is false, the cache will erase its current value and begin a new conversion.\nIf this field is true, the cache will not erase its current value, and will set the status of the\nasync conversion to RERUNNING. Once the data is updated, the status will change to COMPLETED. \nLarge macros that take long to convert, and whose data need not immediately up to date (same as previous conversion's result within last 5 minutes)\nshould set this fields to true. Cache values are stored per user per content body and expansions."
              },
              {
                "name": "embeddedContentRender",
                "value": "",
                "type": "query",
                "description": "Mode used for rendering embedded content, like attachments.\n\n- `current` renders the embedded content using the latest version.\n- `version-at-save` renders the embedded content using the version at\nthe time of save."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "The Atlassian Confluence Content Body API endpoint `/wiki/rest/api/contentbody/convert/async/{to}` allows users to asynchronously convert content body from one format to another by making a POST request. The `{to}` path parameter specifies the target format for the conversion, such as storage, view, or editor format. This asynchronous operation is particularly useful for handling large content conversions that might take longer to process, as it allows the client to submit the conversion request"
        },
        {
          "info": {
            "name": "Atlassian Get Asynchronously Converted Content Body From the Id or the Current Status of the Task",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "//your-domain.atlassian.net/wiki/rest/api/contentbody/convert/async/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The asyncId of the macro task to get the converted body."
              }
            ]
          },
          "docs": "This API endpoint retrieves the result of an asynchronous content body conversion operation in Atlassian Confluence using a unique task identifier. When content conversion is initiated asynchronously (such as converting between different markup formats like storage format, view format, or editor format), this GET operation allows you to check the current status of the conversion task and fetch the converted content once the operation is complete. The endpoint accepts the task ID as a path parame"
        }
      ]
    }
  ],
  "bundled": true
}