Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,295,937
Community Members
 
Community Events
165
Community Groups

Confluence Getting macro output via REST API

Edited

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Confluence: Where work and wellness meet

Feeling overwhelmed by the demands of work and life? With a 25% increase in the prevalence of anxiety and depression worldwide during the pandemic, for most of us, it’s a resounding yes . 🙋‍♀️ ...

974 views 15 27
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you