Hello!
Short version:
Using Confluence API, it gets the version of a page right but still shows the content from Version 1 of a page. But only if we use
body-format=atlas_doc_format
Using body-format=storage
gets us the correct content.
Long version:
We're using the following API request to get the the page content
/wiki/api/v2/pages?body-format=atlas_doc_format&limit=250&space-id=xxxxxx&status=current
It returns the following
{
"parentType": "page",
"createdAt": "2022-11-03T13:30:04.470Z",
"authorId": "62fb667043e43992b9xxxxxx",
"id": "xxxxxxx",
"version": {
"number": 11,
"message": "",
"minorEdit": false,
"authorId": "62fb667043e43992b9xxxxxx",
"createdAt": "2024-04-22T10:16:58.452Z" },
}
"position": 170759856,
"title": "Lorem ipsum dolor sit amet",
"status": "current", "body": { "atlas_doc_format":
{
HOWEVER... the returned content is from the very first version of that page although it correctly identifies that version 11 (in the example above) is the current version.
\",\"type\":\"text\"}]}],\"version\":1}",
"representation": "atlas_doc_format" }
If we switch to body format storage, the the calls returns the latest version
/wiki/api/v2/pages?body-format=storage&limit=250&space-id=393257&status=current
here it is
{
"parentType": "page",
"createdAt": "2022-11-03T13:30:04.470Z",
"authorId": "62fb667043e43992b9xxxxx",
"position": 170759856,
"id": "8651721",
"version": {
"number": 11,
"message": "",
"minorEdit": false,
"authorId": "62fb667043e43992b9axxxxx",
"createdAt": "2024-04-22T10:16:58.452Z"
},
"title": "Lorem ipsum dolor sit amet",
"status": "current",
"body": {
"storage": {
end of the content:
.</p>",
"representation": "storage"
}
Any idea what's going on? ;)
UPDATE:
As Atlassian Support told me, the
\",\"type\":\"text\"}]}],\"version\":1}",
"representation": "atlas_doc_format" }
refers to the ADF format version.
Nevertheless, for some pages, we're still not getting the latest version of the document as we should.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.