REST API Page update - value for `spaceId` is not the correct type

Chris Urffer April 14, 2023

Hello all,

I am trying to update a Confluence page in a space using the v2 API. I am sending a request as such:

 {
"spaceId": space_id,
"status": "current",
"title": title,
"parentId": parent_page_id,
"body": {
"representation": "storage",
"value": content,
}
}

 

I am getting a response that the value provided for `spaceId` is not of the correct type:

('Reporting failed:\n', {'errors': [{'status': 400, 'detail': '', 'title': "Provided value {~62e7fe2b96eb272011a77ba7} for 'spaceId' is not the correct type. Expected type is Long", 'code': 'INVALID_REQUEST_BODY'}]})

However, I believe that this is indeed the correct spaceId - it works with v1 of the API. 

1 answer

1 accepted

2 votes
Answer accepted
Chris Urffer April 14, 2023

It turns out I was actually trying to use the "space key" instead of the "space id"; they are separate values

Suggest an answer

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

Atlassian Community Events