The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence Getting macro output via REST API

xigaha
April 12, 2022

We are displaying page content using confluence rest api and several macros in the page. So when getting the page content using api we are not getting the macro content. Also tried the endpoint which is in docs but not getting the desired output

/wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}

The response returned is this and has body as empty

{
    "name": "contentbylabel",
    "body": "",
    "parameters": {
        "showLabels": {
            "value": "false"
        },
        "max": {
            "value": "5"
        },
        "spaces": {
            "value": "com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@273c92"
        },
        "sort": {
            "value": "modified"
        },
        "showSpace": {
            "value": "false"
        },
        "reverse": {
            "value": "true"
        },
        "type": {
            "value": "page"
        },
        "cql": {
            "value": "label = \"kb-troubleshooting-article\" and type = \"page\" and space = \"TEST\""
        },
        "labels": {
            "value": "kb-troubleshooting-article"
        }
    },
}
So how to display macro content in the page

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events