I’m quite new to the Confluence API. I’m working on a project to retrieve the storage format of pages via the Cloud API, and examine them. And also make bulk changes to the format and slot it back in. To do this, I need to reliably know which editor the page is using so I know whether to grab the Atlas source format, or the XHTML source format.
I have been struggling for a few days now trying to find what path I need to use to get to that data. I have seen a post like this:
That says to use:
/wiki/rest/api/content/{content-id}?expand=metadata.properties.editor
But that is a v1 API call. I’ve tried it but get a 403 ERROR.
I’ve tried all sorts of v2 API calls like
/pages/{page_id}/properties/{key} (fails because apparantly the call has to be using the poperty ID…
/pages/{page_id}/properties/{prop_id}
I’ve done a recursive walk of all the properties of a page I pull back but I can see NOTHING that resembles an editor version
Below are my token scopes. AFAIK, I have everything I need to see properties / metadata etc.
The documentation is totally silent on the subject.
I searched for metadata.properties.editor in the documentation and there was zero results. I had to go to a Google search to find anything.
Its a massive difficulty to find this critical piece of information when working with page data in the API. Why is it not in the Confluece documentation?
Thanks for any help on this. My head is starting to bruise up from the number of times I’ve hit it on my desk.
Token scopes:
delete:attachment:confluence delete:blogpost:confluence delete:comment:confluence delete:content:confluence delete:folder:confluence delete:page:confluence delete:space:confluence delete:whiteboard:confluence offline_access read:attachment:confluence read:blogpost:confluence read:comment:confluence read:content-details:confluence read:content:confluence read:folder:confluence read:group:confluence read:me read:page:confluence read:space:confluence read:task:confluence read:user:confluence write:attachment:confluence write:blogpost:confluence write:comment:confluence write:content:confluence write:folder:confluence write:page:confluence write:space:confluence write:task:confluence write:whiteboard:confluence