post https://meshblu-http.octoblu.com/search/tokens
Search for Tokens
Search for devices using any property defined on that device. Meshblu also supports MongoDB-style query operators: $in
, $exists
, etc.
curl -X POST \
-H 'Content-Type: application/json' \
-H 'meshblu_auth_uuid: 8109a97e-9c89-428f-806a-ef875ab6baf6' \
-H 'meshblu_auth_token: e110a34829db4bb4a307fef2bae7b501' \
https://meshblu.octoblu.com/search/tokens -d '{"metadata.tag":"drone"}'
X-MESHBLU-PROJECTION
X-MESHBLU-PROJECTION
allows you to retrieve only the data you want.
Example: Retrieving only the uuid and name
curl -X POST \
-H 'Content-Type: application/json' \
-H 'meshblu_auth_uuid: 8109a97e-9c89-428f-806a-ef875ab6baf6' \
-H 'meshblu_auth_token: e110a34829db4bb4a307fef2bae7b501' \
-H 'X-MESHBLU-PROJECTION: {"uuid": true, "metadata.tag": true} \
https://meshblu.octoblu.com/search/tokens -d '{"metadata.tag":"drones"}'
[
{
"uuid":"8d4dfa79-358b-464d-9e58-f3cd84d540c3",
"metadata": {
"tag": "oauth"
}
},
{
"uuid":"ff903a54-166e-447c-8981-5ffc8b2e82f9",
"metadata": {
"tag": "oauth"
}
}
]