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

Having trouble with REST API; uploading and downloading

Hello there, im having multiple questions.

So my first question is how exactly does the POST work for uploading a page ? (https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/\) Because i tried it with the same command and changed it to this, but there seems to be no page created.
###################
C:\WINDOWS\system32>curl -v -u admin:********* -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d'{"type":"page","ancestors":[{"type":"page","id":1048581}],"title":"neue testseite","space":{"key":"DAT"},"body":{"storage":{"value":"<p>das ist ein test</p>","representation":"storage"}}}' "http://192.168.162.169:8091/rest/api/content/?os_authType=basic"
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 192.168.162.169...
* TCP_NODELAY set
* Connected to 192.168.162.169 (192.168.162.169) port 8091 (#0)
* Server auth using Basic with user 'admin'
> POST /rest/api/content/?os_authType=basic HTTP/1.1
> Host: 192.168.162.169:8091
> Authorization: Basic YWRtaW46dGhpc2lzc3BhcnRh
> User-Agent: curl/7.55.1
> Accept: */*
> 'Content-Type:application/json'
> 'Accept:application/json'
> Content-Length: 155
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 155 out of 155 bytes
< HTTP/1.1 415
< X-ASEN: SEN-L14026534
< Set-Cookie: JSESSIONID=43D657883008FEE6717F402AC5AABF5C; Path=/; HttpOnly
< X-Seraph-LoginReason: OK
< X-AUSERNAME: admin
< X-Content-Type-Options: nosniff
< Content-Length: 0
< Date: Sun, 11 Aug 2019 11:05:42 GMT
<
* Connection #0 to host 192.168.162.169 left intact
#########################


For my next question i would like to ask about the download of Pages. If i understand it right, my limit is set to 500 maxmimum, even if i try to make it higher. But the more important question for this is, why does start not work ? i tried it out multiple ways and more people seem to have this problem. According to this (https://jira.atlassian.com/browse/CONFSERVER-52558\) the bug should already be solved.

 

My last question would be how to upload variants for a page since i always fail the XSRF check. I have already googled this problem but no answer provided seems to fix my problem, if u have any ideas for it tell me pls.
###################
C:\WINDOWS\system32>curl -u admin:*********** -H 'Content-Type:application/json' -H 'origin:http://192.168.162.169:8091' -d '{"attributeValues":{"C0A8A2A9016C7D9A2EDF9CF962083389":{"C0A8A2A9016C7D9A2EDF905C25C63C17":true,"C0A8A2A9016C7D9A2EDFB6BB12596F1F":true,"C0A8A2A9016C7D9A2EDF2564091C5308":true,"C0A8A2A9016C7D9A2EDFA6CD2A2BA9BF":true},"C0A8A2A9016C7D9A49BF06246C06495F":{"C0A8A2A9016C7D9A49BF0E864C82D911":true,"C0A8A2A9016C7D9A49BF30642790FAAF":true,"C0A8A2A9016C7D9A49BFBBDB390F6789":true,"C0A8A2A9016C7D9A49BF732B671D9684":true},"C0A8A2A9016C7D9A67B9F1C40363715A":{"C0A8A2A9016C7D9A67BA50B17C34CF81":true,"C0A8A2A9016C7D9A67BA3F2544F3DE12":true,"C0A8A2A9016C7D9A67BAE362605B2B76":true,"C0A8A2A9016C7D9A67BAD75278AA7C98":true},"C0A8A2A9016C7D9929769504599E4952":{"C0A8A2A9016C7D992977D06555D2F28B":true,"C0A8A2A9016C7D992977F68E5D2EF686":true,"C0A8A2A9016C7D992977E7BA046CAE03":true,"C0A8A2A9016C7D9929772EE92F93B67A":true},"C0A8A2A9016C7D98FD4D1E1115EE96DD":{},"C0A8A2A9016C7D9929769504599E4952":{},"C0A8A2A9016C7D99863FBAA103D9DA6E":{},"C0A8A2A9016C7D99A2DB72E7427EB773":{},"C0A8A2A9016C7D99C64C14A049576D0B":{},"C0A8A2A9016C7D99E948207A3FEA18A3":{},"C0A8A2A9016C7D9A1355A00863F4636F":{},"C0A8A2A9016C7D9AE489A1B000F405B1":{},"C0A8A2A9016C7D9C61181BD70367DDA2":{},"C0A8A2A9016C7D9CAFFEB0132F5F61E1":{},"C0A8A2A9016C7D9CD994C8132AED0FF8":{}}}' http://192.168.162.169:8091/rest/scroll-versions/1.0/metadata/page/2232692
XSRF check failed [THIS LINE IS THE RESPONSE]
###################

Greetings Phillip

0 answers

Suggest an answer

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

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

327 views 9 7
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