REST API curl from cmd line - what could be wrong in this POST request?

Hi Community,

I try to do a couple of REST API calls via Windows Batch jobs. I successfully can call for a token and read data. But I somehow fail to build a simple POST action to add any kind of item.

Currently I try to add e.g. an user with this batch call:

curl --insecure -v ^
-X POST 172.xx.xx.xxx/.../User ^
-H "Content-Type: application/json" ^
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZC......" ^
-d '{"login_name":"testuser","first_name":"Steve"}'

This one will lead to the following error message in cmd:

{"error":{"code":"InternalError","message":"Object reference not set to an instance of an object."}}* 

I actually use a similar POST Method for getting the token - which works without problems. Has anyone an idea why this one fails? Do I miss some additional header?

Best regards!

Angela

Parents Reply Children
No Data