Need the JSON body for a REST API call to confluence to insert page property macro

Soham Das April 26, 2021

Need the JSON body for a REST API call to confluence to insert page property macro. I have used the following JSON but getting an "unknown macro" error in confluence.

{
"type": "page",
"title": "REST API PAGE 0426",
"space": {
"key": "TSFM"
},
"body": {
"storage": {
"value": "<p> \n <ac:structured-macro ac:name='pageproperties' /> \n This page has been created through a REST API </p>",
"representation": "storage"
}
}
}

1 answer

0 votes
Thiago Masutti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2021

Hi @Soham Das 
Welcome to the Atlassian Community.

The XHTML code for the page properties macro is as below.

<ac:structured-macro ac:name="details" ac:schema-version="1" ac:macro-id="c26310b8-2eb4-4ab2-998f-05eb8bb1b3a5"><ac:rich-text-body>
<p class="auto-cursor-target">Your macro content goes here</p></ac:rich-text-body></ac:structured-macro>

Let me know if that works with your REST API call.

Kind regards,
Thiago Masutti

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events