Hi Eveyone,
I'm having an issue with filtering data in the WebApi plugin
I use the following to get a filtered working result with POSTMAN for chrome
X-zvsToken: CC2D226814CBC713134BD9D09B892F10A9
http://xx.xx.xx.xx/v2/DeviceValues?$filter=Name eq 'Sensor' and DeviceId eq 2 HTTP/1.1
The result:
{
"Error": false,
"Message": "OK",
"StatusCode": 200,
"StatusDescription": "OK",
"Showing": 1,
"Data": [
{
"Id": 4,
"DeviceId": 2,
"Device": {
"Id": 2,
"_type": "Device",
"_uri": "/Entities/Devices/2"
},
"Triggers": {
"_uri": "/v2/DeviceValues/4/Triggers"
},
"Genre": "User",
"Index": "0",
"CommandClass": "48",
"isReadOnly": true,
"CustomData1": null,
"CustomData2": null,
"Name": "Sensor",
"UniqueIdentifier": "72057594076463104",
"Value": "False",
"Description": null,
"_type": "DeviceValue",
"_uri": "/Entities/DeviceValues/4"
}
]
}
But when i use cURL for linux the following command which is the same but doesn't filter the result, i get the whole list of devicevalues. Any help
curl -s -H "X-zvsToken: CC2D226814CBC713134BD9D09B892F10A9"
http://xx.xx.xx.xx/v2/DeviceValues?$filter=Name eq 'Sensor' and DeviceId eq 2 HTTP/1.1
Also is there a way to just get one value for example just the name, "Sensor"
Thanks in advance.