We’ve recently added new ways to perform content body conversions; including support for directly converting a macro’s nested body content to a display format.
To reduce timeouts for apps that convert their nested content to export_view
; apps can now request asynchronous conversion, and obtain the result via a new GET endpoint.
To request an asynchronous conversion to export_view
, developers can use
POST /wiki/rest/api/contentbody/convert/async/{to}
with the same path and body params they use with the existing conversion endpoint without async in the path. The endpoint will return an async id instead of a the converted content body, and the latter can be polled for at GET /wiki/rest/api/contentbody/convert/{asyncId}.
Apps can also now use the macro body conversion endpoint to convert their nested content directly to export_view
, view
, and styled_view
- synchronously or asynchronously, and use the same GET endpoint as above for the asynchronous result. This removes the need for developers to use 2 api calls, one to get the macro body, and one to convert it.
These endpoints will both use the same path as the existing GET macro body endpoint, but will add /convert/{to} and /convert/async/{to}, returning a Content Body, or an async id, respectively.
Our aim is to make these endpoints as similar to the existing ones as possible in hopes that developers whose conversions are prone to time out will try these out with little effort.
The changelog for these endpoints can be found here.