NubeIO / iot-engine

IoT Engine
5 stars 1 forks source link

POST POINT CREATE BY DEVICE AND NETWORK #273

Closed NubeDev closed 5 years ago

NubeDev commented 5 years ago

Didn't work for me. Tested as per api example

also tested and both didnt work POST POINT CREATE BY DEVICE POST POINT CREATE BY NETWORK

Request POST::{{host}}/api/device/d7cd3f57-a188-4462-b959-df7a23994c92/network/gpio/point

{
 "code" : "TET_01",
 "kind" : "INPUT",
 "type" : "DIGITAL",
 "category" : "GPIO",
 "unit" : {
   "type" : "meters_per_second",
   "symbol" : "m/s",
   "category" : "VELOCITY",
   "label" : {
     "= 10.0" : "hah",
     "> 10.0" : "xyz"
   }
 },
 "enabled" : true
}

Response

{
 "code": "INVALID_ARGUMENT",
 "message": "Invalid data format"
}
zero88 commented 5 years ago

@NubeDev Could you give me your request data? Invalid data format means user error

zero88 commented 5 years ago

PostMan is out of date partly. Must change in request unit.label to unit.alias