create device via API return Error 400 BAd query

Stéphane SALAHa year ago

Hi all,

i have an error on call create device.

I can not explain why.

Can you explain me ?

Thanks for all,

Stéphane,

here is my JSON :

{ "id":0, "name":"6000000004", "UniqueId":"866907058956482", "model":"8944476400000658227", "groupId":1, "disabled":"true" }
Anton Tananaeva year ago

I see at least one issue - UniqueId is not the right case.

Stéphane SALAHa year ago

i have send the same request with only "name" in the body.

i have the same issue.

Anton Tananaeva year ago

You can't send just the name. I would recommend comparing your request with the request from our official web app.

Stéphane SALAHa year ago

by reading the doc, i can not see exactly the mandatories fields to create a device.

At the begininng it seam only disable : true.

Can you Give me the mandatory list to apply it please .

thankks for all.

{
"id": 0,
"name": "string",
"uniqueId": "string",
"status": "string",
"disabled": true,
"lastUpdate": "2019-08-24T14:15:22Z",
"positionId": 0,
"groupId": 0,
"phone": "string",
"model": "string",
"contact": "string",
"category": "string",
"geofenceIds": [
0
],
"attributes": { }
}