The Convert Content Body API works as described in Bob’s answer. In our case we were pulling content from the Task Search REST API which is returning storage format that the REST API can’t render. A follow-up thread for this issue can be found here.
I’m trying to use the Convert content body REST API to render short snippets of storage format. These snippets can contain user links.
Raw example (replaced accountId with “123”):
<span><ac:link><ri:user ri:userkey="123" /></ac:link> b la balfs <ac:link><ri:user ri:userkey="123" /></ac:link> ablfjas</span>
Other content is converted correctly, but the user links never get resolved:
<span><a class="unresolved" href="#" title="This user does not have access to this site">Unlicensed user</a> b la balfs <a class="unresolved" href="#" title="This user does not have access to this site">Unlicensed user</a> ablfjas</span>
I’ve tried using the formats view, styled_view and export_view. I’ve tried these options both while being authenticated as the app, as well as with user impersonation. I’ve also tried with and without contentIdContext.
If this doesn’t work, there is an obvious workaround: I can probably just parse the storage format for ri:user elements myself and then render my own HTML for the given accountId - but getting it directly from the API would of course be much nicer.
Is anyone able to do this correctly? I have the feeling that this might be one of those GDPR features…