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: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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

TAGS
AUG Leaders

Atlassian Community Events