Adding macros to pages createdd through REST API

v-hleb.v September 10, 2020

Hi.

Using REST API we create parent pages and then upload children ones. We want to have a children list in our parent pages, but if we add '{children}' macro to their content we see it as is. So, how to properly add macros to pages created using API.

1 answer

1 accepted

4 votes
Answer accepted
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 17, 2020

Hello @v-hleb.v !

As I understand, you need to update an already existing page via rest and add a macro to it.

You can take a look at our documentation on how to update pages via REST:

There is also our document on the Children Display Macro itself:

For you to insert the macro, the markup should be sent with the content body. Here is an example of how the markup for the macro looks like from our documents:

{children:reverse=true|sort=creation|style=h4|page=Home|excerpt=none|first=99|depth=2|all=true}

Here in our community, some people had a thread that had the creation of macros via rest as the main objective. You can take a look at it here:

I hope this helps! Let us hear from you.

v-hleb.v September 20, 2020

Hi Diego, this helped, thank you!

Like Diego likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events