Atlas Doc Format always returns content from v1 of the page

Kristian Klima
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2024

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? ;) 

2 answers

0 votes
Kristian Klima
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2024

OK, here's the update, we discovered a bug and Atlassian's on the case.

 

 

0 votes
Kristian Klima
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 23, 2024

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.

Suggest an answer

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

Atlassian Community Events