Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to find the url of last child[most recently created/updated] of a parent page

Vadithya Naik December 12, 2023

how can i get the url of a child page dynamically from the parent page
for example i have created a page

  1. parent-1
    1. child-1
    2. child-2
    3. child-3
  2. parent-2
    1. child-a
    2. child-b
    3. child-c

if the url of parent-1 is https://tld/wiki/spaces/DD/pages/27073979/parent-1

then how should i get the the url dynamically the url of child-3 under parent -1

if in future there is child-4 get's created, i need the url of child-4
https://tld/wiki/spaces/DD/pages/70123521/child-3.

2 answers

2 accepted

2 votes
Answer accepted
Aron Gombas _Midori_
Community Champion
December 12, 2023

Using this REST API endpoint you can get the children of a given page, even sorted!

https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-children/#api-pages-id-children-get

It seems that the response doesn't contain the URL, but you can call this other API for a set of page IDs to get the link:

https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-get

0 votes
Answer accepted
Vadithya Naik December 12, 2023

@Aron Gombas _Midori_ thanks i wil try this.. 

Vadithya Naik January 2, 2024

this thing worked with

Suggest an answer

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

Atlassian Community Events