I’m developing a simple Confluence server to cloud migration. It collects page ids from server side and send them to cloud. In the cloud side it query page by those page ids and update some macro definitions. However there is always 403 error when cloud side migration trying to get a page by id using /rest/api/content/${pageId}?expand=body.storage,version
API.
My setup:
- create a space with a few pages. The space is not public for anonymous users
- select my app and that space when trigger migration from server side
- I’m using a free plan cloud site
=> Got 403 error when cloud side trying to query pages by id:
{
"statusCode":403,
"data":{
"authorized":false,
"valid":false,
"errors":[
{
"message":{
"key":"confluence.space.restricted",
"translation":"Space is restricted",
"args":[]
}
}
],
"successful":false
},
"message":"com.atlassian.confluence.api.service.exceptions.PermissionException: Space is restricted"
}
But the 403 error does not happen when either:
- migrate space only first, wait for it complete and then trigger migrate for the app OR
- make the space public for anonymous user
Is it the expected behavior that mean spaces need to migrate first? Or it is the limitation when using free cloud site?