Confluence Server Rest API: Prevent macro expansion in content fetch using body.export_view

Hi there,

I’m on Confluence Server 7.13.7.

I have a service using the /rest/content/{id} endpoint with expand=body.export_view that I use to export the page’s HTML content and hyperlinks. However, when expanding pages that contain Jira Issue macros, the API seems to be itself triggering requests to my Jira instance (Jira server 8.21.0):

In the response’s body.export_view.value, I see

<span class=\"summary\">Getting issue details...</span>

These macro expansion requests are putting a lot of unnecessary load on my Jira instance, and I was wondering if there’s a way to disable this API request made for macro expansion when fetching content HTML.

In my Jira server logs, I see several exceptions as a result of these requests:

[extra.jira.helper.JiraExceptionHelper] throwMacroExecutionException Macro execution exception:

Also wanted to note that when I issue the exact same content request multiple times, the additional macro expansion API requests are only occurring for some of them. What’s dictating this this nondeterministic behavior – is there a way to always disable it?

I’ve tried all the content representations available (editor, view, export_view, styled_view, storage, anonymous_export_view), but none of them gave the raw HTML without performing this API request.

I also noticed on Confluence Cloud, the export_view request does not trigger a separate request to expand Jira Issue macros, and it’d be great if server would match this behavior.