I am using confluence api curl command to create a new page on the confluence. But i am only gettting following respond.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://*company domain*/confluence/rest/api/content/">here</a>.</p>
</body></html>
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.
@Jagmandeep Kaurtwo points,
Something like,
curl -L //your rest of code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.