Audit
Content
Content - attachments
Content body
Content - children and descendants
Content - macro body
Content comments
Content labels
Content permissions
Content properties
Content restrictions
Content versions
Content watches
Dynamic modules
Experimental
Group
Inline tasks
Label info
Long-running task
Relation
Search
Settings
Space
Space permissions
Space properties
Space settings
Template
Themes
Users

Rate this page:

Content body

Convert content body

POST /wiki/rest/api/contentbody/convert/{to}

Converts a content body from one format to another format.

Supported conversions:

  • storage: view, export_view, styled_view, editor
  • editor: storage
  • view: none
  • export_view: none
  • styled_view: none

Permissions required: If request specifies 'contentIdContext', 'View' permission for the space, and permission to view the content.

Connect app scope requiredREAD

OAuth scopes required
read:confluence-content.all

Request

Path parameters
to Required

string

The name of the target format for the content body.

Query parameters
expand

Array<string>

A multi-value parameter indicating which properties of the content to expand.

In addition, the following comment-specific expansions can be used:

  • extensions.inlineProperties returns inline comment-specific properties.
  • extensions.resolution returns the resolution status of each comment.
Style: form
spaceKeyContext

string

The space key used for resolving embedded content (page includes, files, and links) in the content body. For example, if the source content contains the link <ac:link><ri:page ri:content-title="Example page" /><ac:link> and the spaceKeyContext=TEST parameter is provided, then the link will be converted to a link to the "Example page" page in the "TEST" space.

contentIdContext

string

The content ID used to find the space for resolving embedded content (page includes, files, and links) in the content body. For example, if the source content contains the link <ac:link><ri:page ri:content-title="Example page" /><ac:link> and the contentIdContext=123 parameter is provided, then the link will be converted to a link to the "Example page" page in the same space that has the content with ID=123. Note, spaceKeyContext will be ignored if this parameter is provided.

embeddedContentRender

string

Mode used for rendering embedded content, like attachments.

  • current renders the embedded content using the latest version.
  • version-at-save renders the embedded content using the version at the time of save.
Default: current

Valid values: current, version-at-save

Body parameters

This object is used when creating or updating content.

value Required

string

The body of the content in the relevant format.

representation Required

string

The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'.

Valid values: view, export_view, styled_view, storage, editor, editor2, anonymous_export_view, wiki, atlas_doc_format, plain ...(Show more)

Additional Properties

anything

Extra properties of any type may be provided to this object.

Example

1
2
3
4
5
6
7
8
9
curl --request POST \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/contentbody/convert/{to}' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "value": "<string>",
  "representation": "view"
}'

Responses

Returned if the content is converted.

Content typeValue
application/json

ContentBody

Rate this page: