Hello everyone,
According to the Confluence REST API examples, in order to create a child page, I need to have the ancestor page id. If I have just few ancestor pages, I could get the ancestor page ids manually ahead of time, then hard code the ids in the REST calls. But I have many spaces, each with the same structured page layout, and depending on certain condition, I need to create a child page to the same page title under different space. It’d be very difficult to get all the ancestor page ids ahead of time, then hard code into my REST call script, especially a groovy script in Jira transition post function.
Now the question is, can the ancestor’s page title or webui link (instead of page id) be used combined with space key? Since ancestor’s page title or webui link, plus space key would be able to uniquely identify the page in a Confluence instance, I think that would be possible.
In other word, instead of
space: [
key: "SPACEKEY"
],
ancestors: [
[
type: "page",
id: "1234567",
]
],
Can something like this work
space: [
key: "SPACEKEY"
],
ancestors: [
[
type: "page",
title: "The Parent Page"
},
]
],
Or can something like this work
space: [
key: "SPACEKEY"
],
ancestors: [
[
type: "page",
_links: {
webui: "/display/SPACEKEY/The+Parent+Page"
},
]
],
Thanks in advance.