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

Confluence API return 302 Found

I am using confluence api curl command to create a new page on the confluence. But i am only gettting following respond.


<title>302 Found</title>
<p>The document has moved <a href="https://*company domain*/confluence/rest/api/content/">here</a>.</p>


Curl command :

curl -o out.json -u username:Password -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"type":"page","title":"new page","ancestors":[{"id":9567}],"space":{"key":" Database "},"body":{"storage":{"value":"<p>This is <br/> a new page</p>","representation":"view"}}}' --url "http://*company domain*/confluence/rest/api/content/" | python -mjson.tool


Also, one more thing though i am sending an http request in the response i am getting https url. 

1 answer

0 votes
DPK J Community Leader Sep 24, 2019

@Jagmandeep Kaurtwo points,

  1. If your site is using HTTPS, don't use HTTP for request.
  2. If you are getting response code '302' you need to follow to redirected page, use '-L' flag with curl for this.

Something like,

curl -L  //your rest of code

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...

402 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