I'm creating a new space and copying content from a 'template' space using the API. This works fine but it does not set the correct page as an home page. Trying to update the homepage using the API I always get an error 400:
url: https://myconfluence.atlassian.net/wiki/rest/api/space/test
Using a PUT
Payload:
{
"homepage": {
"id": "801603851"
}
}
I always get this error:
{
"statusCode": 400,
"data": {
"authorized": true,
"valid": false,
"errors": [
{
"message": {
"translation": "Cannot update space homepage to page in space with key: TEST",
"args": []
}
}
],
"successful": false
},
"message": "Cannot update Space"
}
If I chagne the homepage in the GUI to the same page it does work. Any idea?