Can I use an api to just access the content of the confluence page?

Mansi.Gusain January 20, 2025

Hi my use case is that I wish to access the content only of the confluence page , is there an api or way of doing that. Need is whatever is the readable content (the written material of the page) I just want to access it. 

1 answer

1 vote
marc -Collabello--Phase Locked-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 20, 2025
Rebekka Heilmann _viadee_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 21, 2025

@marc -Collabello--Phase Locked- as I am looking for the same thing as @Mansi.Gusain ... I checked the API and couldn't find any request for accessing the actual content. I get all sort of Meta Info on the pages and content but not the content itself.
Could you provide further info than just the general link to the API documentation?

marc -Collabello--Phase Locked-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 21, 2025

To get the page content, use

https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get

e.g.

curl --request GET \ --url 'https://{your-domain}/wiki/api/v2/pages/{id}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'

If you need the actual content, add the parameter "body-format" as a query parameter (e.g. "storage").

Mansi.Gusain January 21, 2025

Hi thankyou for replying, I was able to get the content using this api also for my use-case- https://<domain>.atlassian.net/wiki/api/v2/spaces/1628209334/pages?body-format=storage, thing is I wanted content of all the pages against one space. 

 

Also one strange thing using this api - which i shared in their documentation, they we can access all the pages if no limits mentioned , I am not applying any limits, then why are not all the pages not being shown? also when i query if it is part it does not show up.

Mansi.Gusain January 21, 2025

more specifically the api looks -

 

https://<domain>.atlassian.net/wiki/api/v2/spaces/{space-id}/pages?body-format=storage

marc -Collabello--Phase Locked-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 23, 2025

I think the API is paginated, that means you must use the _next links in the response to get information about the remaining pages.

Suggest an answer

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

Atlassian Community Events