Confluence.js - Cloud and Server API library
    Preparing search index...

    Class ContentBody

    Index

    Constructors

    Methods

    • Converts a content body from one format to another format asynchronously. Returns the asyncId for the asynchronous task.

      Supported conversions:

      • Atlas_doc_format: editor, export_view, storage, styled_view, view
      • Storage: atlas_doc_format, editor, export_view, styled_view, view
      • Editor: storage

      No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5 minutes at the result endpoint.

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

      Type Parameters

      Parameters

      Returns Promise<void>

    • Converts a content body from one format to another format asynchronously. Returns the asyncId for the asynchronous task.

      Supported conversions:

      • Atlas_doc_format: editor, export_view, storage, styled_view, view
      • Storage: atlas_doc_format, editor, export_view, styled_view, view
      • Editor: storage

      No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5 minutes at the result endpoint.

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

      Type Parameters

      Parameters

      Returns Promise<T>

    • Returns the asynchronous content body for the corresponding id if the task is complete or returns the status of the task.

      After the task is completed, the result can be obtained for 5 minutes, or until an identical conversion request is made again, with allowCache query param set to false.

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

      Type Parameters

      Parameters

      Returns Promise<void>

    • Returns the asynchronous content body for the corresponding id if the task is complete or returns the status of the task.

      After the task is completed, the result can be obtained for 5 minutes, or until an identical conversion request is made again, with allowCache query param set to false.

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

      Type Parameters

      Parameters

      Returns Promise<T>

    • Asynchronously converts content bodies from one format to another format in bulk. Use the Content body REST API to get the status of conversion tasks. Note that there is a maximum limit of 10 conversions per request to this endpoint.

      Supported conversions:

      • Storage: editor, export_view, styled_view, view
      • Editor: storage

      Once a conversion task is completed, it is available for polling for up to 5 minutes.

      Permissions required: 'View' permission for the space, and permission to view the content if the spaceKeyContext or contentIdContext are present.

      Type Parameters

      Parameters

      Returns Promise<void>

    • Asynchronously converts content bodies from one format to another format in bulk. Use the Content body REST API to get the status of conversion tasks. Note that there is a maximum limit of 10 conversions per request to this endpoint.

      Supported conversions:

      • Storage: editor, export_view, styled_view, view
      • Editor: storage

      Once a conversion task is completed, it is available for polling for up to 5 minutes.

      Permissions required: 'View' permission for the space, and permission to view the content if the spaceKeyContext or contentIdContext are present.

      Type Parameters

      Parameters

      Returns Promise<T>

    • Returns the content body for the corresponding asyncId of a completed conversion task. If the task is not completed, the task status is returned instead.

      Once a conversion task is completed, the result can be obtained for up to 5 minutes, or until an identical conversion request is made again with the allowCache parameter set to false.

      Note that there is a maximum limit of 50 task results per request to this endpoint.

      Permissions required: Permission to access the Confluence site ('Can use' global permission).

      Type Parameters

      Parameters

      Returns Promise<void>

    • Returns the content body for the corresponding asyncId of a completed conversion task. If the task is not completed, the task status is returned instead.

      Once a conversion task is completed, the result can be obtained for up to 5 minutes, or until an identical conversion request is made again with the allowCache parameter set to false.

      Note that there is a maximum limit of 50 task results per request to this endpoint.

      Permissions required: Permission to access the Confluence site ('Can use' global permission).

      Type Parameters

      Parameters

      Returns Promise<T>

    • 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.

      Type Parameters

      Parameters

      Returns Promise<void>

      Will be removed in next major version.

    • 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.

      Type Parameters

      Parameters

      Returns Promise<T>

      Will be removed in next major version.