Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence API - no body content (page)

Wojciech Gwardjak January 18, 2022

Hello, I am trying to pull the data from my public space in Confluence

I got the list of pages but there is content missing

Does anyone know how to get the content of these pages?

Please see photos belowcontent body.PNG

space content.png

While the content is there certainly

content visible.PNG

1 answer

1 accepted

2 votes
Answer accepted
Pramodh M
Community Champion
January 18, 2022

Hi @Wojciech Gwardjak 

From the reference here https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/

You need to add the query parameter 

?expand=body.storage

Example: 

curl -u admin:admin http://localhost:8080/confluence/rest/api/content/3965072?expand=body.storage

in order to have the content of the page

Thanks,
Pramodh

Wojciech Gwardjak January 18, 2022

Thank you for reponse @Pramodh M  :)
It work now, but I have another issue
While pulling data through postman it returns json object and works fine, while in Hubspot I am trying to use pure JS function to pull the object from Confluence API and it show CORS error or reponse '0' (while mode: no-cors)

cors.PNG

response0.PNG

Parth Vyas July 12, 2023

@Pramodh M Is there a way to get the CSS details for the body as well? 
I have been able to fetch the body details but it comes up as a plain HTML text.

I'm trying to show the page data but want it to be visually relatable to what is available in confluence.

Suggest an answer

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

Atlassian Community Events