Finding out if pages have children without fetching the children

Hi @mchen ,

Welcome the the Atlassian Developer Community.

This is a good question. Referring to the RFC relating to the deprecation of certain APIs in favour of V2 APIS, @SimonKliewer indicated that:

We acknowledge that in certain scenarios, the number of requests required from apps to fetch the same amount of content from V1 to V2 will increase. We are moving forward with this tradeoff for the reasons outlined in our blogpost here . However, we are confident this is a step in the right direction, and want to work with the community to make this transition as smooth and performant as possible.

Based on this, would it be possible for you to make a comparison between the legacy and V2 APIs for your scenario. In this comparison, can you compare number of API calls necessary for a typical node in a page tree with realistic customer data, and a comparison between the overall duration it takes for the two APIs to return the data necessary to render this page tree node. I’m sure @SimonKliewer would be happy to review this to provide advice and/or take action if necessary.

You could also explore the feasibility of storing information necessary to render page tree nodes in a space property and maintaining this information using page created/deleted webhooks. Note that you would need to account for the maximum sizes of space properties.

Another possibility is to define a page property index extraction defining if the page has child pages and running a CQL search using the ancestor and your extraction.

Regards,
Dugald

1 Like