The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Retrieve the header image of a blog post with the V2 Rest API

Martijn Muskens
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!
May 3, 2024

Hi community,

 

I was wondering on how I can efficiently get the header image of a blogpost. I know I can use the 'https://{your-domain}/wiki/api/v2/blogposts/{id}/attachments' call to get all the attachments of a blogposts, including the header image if it exists. However, it will also give me all the other images that have been used within the blogpost. The issue is, I'm not sure on how I can distinguish the header image out of all the images I retrieve out of that call. I don't see a way to add an additional query to the call, or distinguish it based on the result I get back.

 

Any help would be appreciated.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Martin Runge
Community Champion
June 23, 2026

Hi @Martijn Muskens

Welcome to the Atlassian community!

I wouldn't rely solely on the attachments endpoint, as the v2 API doesn't indicate which attachments are header/cover images; all look the same regardless of type.

One reliable approach is to fetch the blog post body in Atlassian Document Format (https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/) and inspect it directly like: GET /wiki/api/v2/blogposts/{id}?body-format=atlas_doc_format The cover image in Confluence Cloud is represented in the ADF body as a mediaSingle node that sits at the very top of the content array.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events