I would recommend you to read documentation. Your JSON is incorrect. You can also check what official web app sends.
I did but I cant understand
can you give a simple json for that ??
I shoud add all atributes ???
Read documentation:
JSON : {"id":-4,"name":"aaa","uniqueId":"iii","phone":"","model":"","contact":"","category":null,"status":null,"lastUpdate":null,"groupId":0,"disabled":false}
ERROR : MessageBodyReadernotfoundformediatype=application/octet-stream, type=classorg.traccar.model.Device, genericType=classorg.traccar.model.Device.-MessageBodyProviderNotFoundException(...)
I would recommend you to read error message. It's pretty self explanatory.
the problem was in header
you should add "Content-Type" in header with "application/json" value
hi
please give me a simple post request for example
I tried with this json :
{ "Device":{ "name":"gholi", "uniqueId" : "asdfghjkl;", "status": "", "disabled": false } }
and this header :
Accept : application/json
and this query :
http://192.168.1.103:8082/api/devices
but I give this error:
thanks