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

Convert body representation

Converts between content body representations. Not all representations can be converted to/from other formats. Supported conversions:

  • storage -> view,export_view,styled_view,editor
  • editor -> storage
  • view -> None
  • export_view -> None
  • styled_view -> None

Example request URI(s):

  • http://example.com/confluence/rest/api/contentbody/convert/view
POST/rest/api/contentbody/convert/{to}
Path parameters
tostringrequired

the representation to convert to.

Query parameters
expandstring

A comma separated list of properties to expand on the content. Default value: <code>body.storage,history,space,version,ancestors</code>

Request body
application/json

the body to convert from

representationstring
valuestring
webresourceWebResourceDependencies
Show properties
keysstring[]
contextsstring[]
urisobject
tagsobject
superbatchSuperBatchWebResources
Show properties
urisobject
tagsobject
metatagsstring
contentReferenceContent
Show properties
expandedboolean
idPropertiesobject
contentRefReferenceContent
Show properties
expandedboolean
idPropertiesobject
Responses
200

returns the converted body

representationstring
valuestring
webresourceWebResourceDependencies
Show properties
keysstring[]
contextsstring[]
urisobject
tagsobject
superbatchSuperBatchWebResources
Show properties
urisobject
tagsobject
metatagsstring
contentReferenceContent
Show properties
expandedboolean
idPropertiesobject
contentRefReferenceContent
Show properties
expandedboolean
idPropertiesobject
Try it
Server
Parameters
Bodyapplication/json
Request
curl -X POST 'http://example.com:7990/confluence/rest/api/contentbody/convert/string' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "representation": "string",
  "value": "This is a body",
  "webresource": {
    "keys": [
      "key1",
      "key2",
      "key3"
    ],
    "contexts": [
      "context1",
      "context2",
      "context3"
    ],
    "uris": {},
    "tags": {},
    "superbatch": {
      "uris": {},
      "tags": {},
      "metatags": "string"
    }
  },
  "content": {
    "expanded": true,
    "idProperties": {}
  },
  "contentRef": {
    "expanded": true,
    "idProperties": {}
  }
}'
Response
{
  "representation": "string",
  "value": "This is a body",
  "webresource": {
    "keys": [
      "key1",
      "key2",
      "key3"
    ],
    "contexts": [
      "context1",
      "context2",
      "context3"
    ],
    "uris": {},
    "tags": {},
    "superbatch": {
      "uris": {},
      "tags": {},
      "metatags": "string"
    }
  },
  "content": {
    "expanded": true,
    "idProperties": {}
  },
  "contentRef": {
    "expanded": true,
    "idProperties": {}
  }
}

Was this page helpful?