curl -u 'MY_USERNAME:MY_API_TOKEN' -H 'Content-Type: application/json' -d "data=@path/home/matthew/conf.txt" 'https://MY_DOMAIN/wiki/rest/api/content'
with this input file:
{
"type": "page",
"title": "newpage",
"space": {
"key": "MY_SPACE_KEY"
},
"body": {
"storage": {
"value": "test",
"representation": "storage"
}
},
"version": 1
}
Returns this:
{"statusCode":500,"message":"org.codehaus.jackson.JsonParseException: Unexpected character ('d' (code 100)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: com.atlassian.plugins.rest.common.limitrequest.jersey.LimitingRequestFilter$1@18be5107; line: 1, column: 2]"
I don't see what I'm doing wrong here. Any help is appreciated.
This was an encoding issue. I was able to make it work with
-d "$(cat /home/matthew/conf.txt)"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.