You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Sorry if I ask something too obvious but I am quite Junior dev and not familiar with curl at all.
I am trying to create a new page following the documentation but I keep getting a 401 response, although if I use the login sample command in the docu (curl -D- -X GET -H "Authorization: Basic <MyEncodedEmailrAndToken>" -H "Content-Type: application/json"https://myspace/wiki/rest/api/space) ) I get a 200 status response, so I assume my login ddetails are correct.
The command I am using is: curl -D- -H "Authorization: Basic <MYTOKEN>" -X POST -H 'Content-Type:application/json' https://myspace/confluence/rest/api/content/ -d '{"type":"page","title":"TEST", "space":{"key":"AGE2DE"},"body":{"storage":{"value":"Test","representation":"storage"}}}'
And this is the error I keep getting
Does your user have the permission to create a page in this "AGE2DE" space?
Regards, Dominic
HI Dominic, I can create pages manually if that is what you mean, but I cannot create them when using the API command mentioned above
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is a good example. It seems, you do not have any headers:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dominic Lagger I am using the example in the documentation so I am not sure what you mean when saying I do not have any headers as I am basically copying the example there and just modify with my space values
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm this is a bit strange. I just checked with one of my calls.
I have another header:
'X-Atlassian-Token': 'no-check'
Can you probably check with this?
If this does not work, I would suggest you to ask in the developer community.
https://community.developer.atlassian.com/
Regards, Dominic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.