In the ansible builtin uri module I have the following:
body_format: json
body: {"projects":[ {"Test Update"}]}
And I get a message "Must supply an incremented version when updating content: N version supplied".
So the question is where do I specify the version?
(I am aware I need to increment the version but for now I just want to supply an incremented version
Ok I have managed to almost get this to work so this is my json body which I am sending via the ansible.builtin.uri module. The initial error was bad request but seemed okay once I moved the version to where it is now.
Then I was getting an error message saying you cannot chnage the space of an existing page.
I was putting the page name in instead of the page key. Once I listed pages in confluence I could see the key for my space.
Now I am getting the error: HTTP 103: Forbidden so will need to chase the confluence admins. But I think the syntax is correct.
body:
{ "id": <page number>,
"type": "page",
"title": "My Title",
"space": { "key":"<Key for Space Name>" },
"version":{
"number": version+1
},
"body": {
"storage": {
"value": "Modify the page",
"representation":"storage"
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.