Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,373
Community Members
 
Community Events
176
Community Groups

Internal Server error 500 when creating page with Confluence Rest api

Hi,

i am trying to create a page in confluence using rest api but i am greeted with this error: {"statusCode":500,"message":"","reason":"Internal Server Error"}.

my code:

curl.exe -X POST -H "Authorization: Bearer PersonalAccessToken" -H "Content-Type: application/json" -d '{"type":"page","title":"new page","space":{"key":"TES"},"body":{"storage":{"value":"This is a new page","representation":"storage"}}}' https://myconfluenceurl.com/confluence/rest/api/content

i have checked the logs and found this aswell: 
org.codehaus.jackson.JsonParseException: Unexpected character ('t' (code 116)): was expecting double-quote to start field name

im not sure where the mistake is, i cant see it.

i appreciate every help!

Best Regards
Nauman

1 answer

0 votes

Hi @Nauman Qureshi

Did you try using double quotes (") after -d instead of single quotes (')?

Thanks,
Vamsi

Hey @Vamsi Kandala

yes i have tried doublequotes after -d. 
It still did not work.

Best Regards
Nauman 

Hi @Nauman Qureshi

Hmmm...looks like there is an issue with JSON data format.  I have tested the JSON data you are sending and it is parsing fine as well as your curl call looks good to me.

Did you try using third-party tool like Postman and check?

Thanks,
Vamsi

Hey @Vamsi Kandala unfortunately, i have not.
I am not sure how this will work.

Best Regards
Nauman

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events