I’m trying to use the Confluence REST API v2 API to create a new wiki page whose body is in the atlas_doc_format
. I can’t seem to get anything except a 400 Bad Request
response with a body of Invalid message
. Does anyone have any suggestions on what I’m doing wrong with the request?
The POST request is being made to https://(my org).atlassian.net/wiki/api/v2/pages
, with the following request body (formatted here for readability):
{
"spaceId": 9867790169,
"status": "draft",
"title": "Equipment Sales",
"body": {
"representation": "atlas_doc_format",
"value": {
"body": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "foo 3"
}
]
},
{
"type": "heading",
"attrs": {
"level": 2
},
"content": [
{
"type": "text",
"text": "Background"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "bar 3"
}
]
}
],
"version": 1
}
}
}
}
The ADF content was generated using the Python pyadf module.
What part is causing the invalid message?