Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

is it possible to display image in confluence page through rest api

Hi All,


I am able to upload image through rest api. but i dont know how to display that image. please guide me.


Thanks in advance

1 answer

2 votes
DPK J Community Leader Dec 19, 2019

@noor basha  I have already sent you a reply on your previous question.

Here is recap of that,

Displaying attachment on confluence page is another part of story and you will need to fire separate APIs for this.

You need to put something like this in your page body using API,

  <ri:attachment ri:filename="atlassian_logo.gif" />

Here is an working API example, in first API I'm adding image `sample.png` as attachment and later in second API call I'm displaying that in page using Confluence Structure format in body.


curl -D- -u '<USERNAME>:<PASSWORD>' \
-H 'X-Atlassian-Token: nocheck' \
-F 'file=@"./sample.png"' \

curl --request PUT \
--url '<CONFLUNCE_BASE_URL>/rest/api/content/<PAGE_ID>' \
--user '<USERNAME>:<PASSWORD>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"title":"Sample Page",
"value":"<p>Adding image to page</p><ac:image><ri:attachment ri:filename=\"sample.png\" /></ac:image>",

thanks alot sir. it worked, but curl is not working fine i tried with different approach.To display or update i used storage format then i am able to upload or modify any data in the confluence page. 

thanks alot for you help and replay

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

408 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you