Forums

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

How to update the content/body of confluence homepage via API?

Paul Lam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 26, 2023

I called GET /rest/api/content/<homepage-id>, and looked at the api docs, nothing there seem to help a lot with updating the content of confluence homepage. 

I tried the following as well: https://community.atlassian.com/t5/Confluence-questions/Can-you-programmatically-create-a-banner-for-a-Confluence-space/qaq-p/2033185, still no luck.

Is this achievable via API?  If so, how is it done?

1 answer

0 votes
Paul Lam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 26, 2023

Figured out.  I used GET /space/<spaceID>/content?expand=body.storage,version to get the HTML of the homepage, do some HTML parsing and modifications, then PUT /content/<contentID> to modify the homepage.

 

Lmk if there's a simpler way of modifying one section of the HomePage

Suggest an answer

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

Atlassian Community Events