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
Did you try using double quotes (") after -d instead of single quotes (')?
Thanks,
Vamsi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.