Forums

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

Cannot copy page hiearchy via REST API

Michael Sole August 11, 2021

When I try to copy a page hierarchy from one space to another, I am getting the following error:

The page exists, but you do not have permission to view it

 

I can do it from the web using the same user. I ma not quite sure what I am doing wrong.

I may be using one of the parameters wrong. What is the destinationPageId? Where do I get that? Do I create a page and then use that? 


{ "copyAttachments": true,
"copyPermissions": true,
"copyProperties": true,
"copyLabels": true,
"copyCustomContents": true,
"destinationPageId": "<string>", <- I am not sure what this is?
"titleOptions": {
"prefix": "<string>",
"replace": "<string>",
"search": "<string>"
}
}

2 answers

0 votes
Bartosz Dopke October 28, 2021

destinationPageId is the page ID where content of the copied page will be created. That means that you should create an empty page and copy the content to it (put its ID in the destinationPageId parameter).

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 18, 2021

Hi @Michael Sole 

Each space has an overview page, which is consider to be the top level in the page tree. Clicking on the overview of the target space, and looking at the URL will give you the page ID. Did you try to see if that is the destinationPageId? To me this might be the solution you are looking for.

Suggest an answer

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

Atlassian Community Events