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

How to send ready html document via rest api

I need to transfer some documents to confluence,
I already "convert" them to confluence format -> I can open (confluence) html editor on a new page, ctrl+a > delete all > ctrl+a (my converted html), ctrl+v > save - and document looks perfect.
But still I need to do it by opening manualy confluence editor and copy-paste my content.
I tried to put this content via curl and rest api using:

curl -u -X PUT -H 'Content-Type: application/json' -d'{"id":"3604482","type":"page","title":"new page","space":{"key":"TST"},"body":{"storage":{"value":"<p>This is the updated text for the new page</p>","representation":"storage"}},"version":{"number":2}}' | python -mjson.tool 

and for one line ex. "<p>This is the updated text for the new page</p>" it works well, but for my 140 lines html it doesn't... I also tried to put it into json file, but every ( " ' , ) breaks json syntax and escaping that will consume to much time...
Is it possible to sent it somehow?
Like I said I've got ready-to-paste html content in my file, how to put it via rest API ?

0 answers

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