Devices
Retrieve devices from the Meshblu registry.
Retrieve devices from the Meshblu device registry. In order to retrieve a target device, your connection must be authenticated as a device that is in the target device's discover.view whitelist. See the Meshblu whitelist documentation for more information.
Event: "devices", query, callback
"devices", query, callbackqueryQuery object, filters the device that will be returned. With the exception of the following special cases, properties are used as filters. For example, passing a query of{color: 'red'}will yield all devices that contain a color key with value 'red' that the authorized connetion has access to.onlineIf present, the value foronlinewill be compared against the string "true", and the resulting boolean value will be used. Note: using a boolean value oftruewill be evaluated asfalsebecause it is not equeal to "true"."null"&""If any key is passed in with a value of the string"null"or the empty string"", it will retrieve only devices that do not contain the key at all.
callbackFunction that will be called with aresult.resultObject passed to the callback. Contains thedeviceskey.devicesThe devices retrieved from the Meshblu registry.
Check the permissions
Your device must exist in the other device's
discoverWhitelistor no device will be returned.
Succesful Response
When requesting valid devices that the authorized device may view:
{
"devices": [
{
"color": "blue",
"discoverWhitelist": [ "*" ],
"uuid": "c30a7506-7a45-4fe1-ab51-c57afad7f41a"
},
{
"color": "blue",
"discoverWhitelist": [ "*" ],
"uuid": "7a9475ea-a595-42a4-8928-0aeb677c4990"
}
]
}
Empty Response
When requesting a non-existing devices, or devices the authenticated device may not view:
{
"devices": []
}
Updated less than a minute ago
