{"_id":"5736578ecacfa619004f6d45","editedParams2":true,"__v":3,"editedParams":true,"parentDoc":null,"user":"5564f227f0f70f0d00a9ab20","version":{"_id":"55650b9eb893840d00444701","project":"55650b9eb893840d004446fe","__v":2,"createdAt":"2015-05-27T00:11:10.647Z","releaseDate":"2015-05-27T00:11:10.647Z","categories":["55650b9fb893840d00444702","5566a1557acd550d0075e894"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"55650b9fb893840d00444702","version":"55650b9eb893840d00444701","pages":["55650b9fb893840d00444704","55662e121ec2311900e4c538","55663058f579050d00c3d42d","556633b61ec2311900e4c544","55663419f579050d00c3d43f","55663490979a3c2500bbafa6","5566352a979a3c2500bbafa8","55663578979a3c2500bbafab","556635fd1ec2311900e4c551","5566365a979a3c2500bbafb3","556636daf579050d00c3d448","5568d269c87afd2500e5254c","556b5b46ab693b1900ce1722","556bbee230922f1700ad5e22","5578af9327f77c0d00fe62ce","567328a458c4890d00bb545f"],"project":"55650b9eb893840d004446fe","__v":16,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-27T00:11:11.144Z","from_sync":false,"order":9999,"slug":"documentation","title":"Documentation"},"project":"55650b9eb893840d004446fe","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-13T22:39:10.215Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","examples":{"codes":[{"code":"","language":"text"}]},"method":"post","results":{"codes":[{"name":"","code":"[\n  {\n\t\t\"uuid\": \"709c37c7-7198-417b-bc0c-6a2191288379\",\n    \"type\": \"drone\",\n    \"color\": \"blue\"\n  }\n]","language":"json","status":200}]},"auth":"required","params":[{"_id":"5736586c3d00df0e00ef10ff","ref":"","in":"body","required":false,"desc":"Example Parameter","default":"drone","type":"string","name":"type"},{"_id":"5736586c3d00df0e00ef10fe","ref":"","in":"body","required":false,"desc":"Example Parameter","default":"blue","type":"string","name":"color"}],"url":"/search/devices"},"isReference":false,"order":11,"body":"Search for devices using any property defined on that device. Meshblu also supports MongoDB-style query operators: `$in`, `$exists`, etc.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'meshblu_auth_uuid: 8109a97e-9c89-428f-806a-ef875ab6baf6' \\\\\\n-H 'meshblu_auth_token: e110a34829db4bb4a307fef2bae7b501' \\\\\\nhttps://meshblu.octoblu.com/search/devices -d '{\\\"type\\\":\\\"drone\\\"}'\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"X-MESHBLU-PROJECTION\"\n}\n[/block]\n`X-MESHBLU-PROJECTION` allows you to retrieve only the data you want.\n\nExample: Retrieving only the uuid and name\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'meshblu_auth_uuid: 8109a97e-9c89-428f-806a-ef875ab6baf6' \\\\\\n-H 'meshblu_auth_token: e110a34829db4bb4a307fef2bae7b501' \\\\\\n-H 'X-MESHBLU-PROJECTION: {\\\"uuid\\\": true, \\\"name\\\": true} \\\\\\nhttps://meshblu.octoblu.com/search/devices -d '{\\\"type\\\":\\\"drone\\\"}'\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[\\n  {\\n    \\\"uuid\\\":\\\"8d4dfa79-358b-464d-9e58-f3cd84d540c3\\\",\\n    \\\"name\\\":\\\"Drone 1\\\"\\n  },\\n  {\\n    \\\"uuid\\\":\\\"ff903a54-166e-447c-8981-5ffc8b2e82f9\\\",\\n    \\\"name\\\":\\\"Drone 2\\\"\\n  }\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"Search for Devices","slug":"search","type":"endpoint","title":"Search"}

postSearch

Search for Devices

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

type:
stringdrone
Example Parameter
color:
stringblue
Example Parameter

Result Format


Documentation

Search for devices using any property defined on that device. Meshblu also supports MongoDB-style query operators: `$in`, `$exists`, etc. [block:code] { "codes": [ { "code": "curl -X POST \\\n-H 'Content-Type: application/json' \\\n-H 'meshblu_auth_uuid: 8109a97e-9c89-428f-806a-ef875ab6baf6' \\\n-H 'meshblu_auth_token: e110a34829db4bb4a307fef2bae7b501' \\\nhttps://meshblu.octoblu.com/search/devices -d '{\"type\":\"drone\"}'", "language": "shell" } ] } [/block] [block:api-header] { "type": "post", "title": "X-MESHBLU-PROJECTION" } [/block] `X-MESHBLU-PROJECTION` allows you to retrieve only the data you want. Example: Retrieving only the uuid and name [block:code] { "codes": [ { "code": "curl -X POST \\\n-H 'Content-Type: application/json' \\\n-H 'meshblu_auth_uuid: 8109a97e-9c89-428f-806a-ef875ab6baf6' \\\n-H 'meshblu_auth_token: e110a34829db4bb4a307fef2bae7b501' \\\n-H 'X-MESHBLU-PROJECTION: {\"uuid\": true, \"name\": true} \\\nhttps://meshblu.octoblu.com/search/devices -d '{\"type\":\"drone\"}'", "language": "shell" } ] } [/block] [block:code] { "codes": [ { "code": "[\n {\n \"uuid\":\"8d4dfa79-358b-464d-9e58-f3cd84d540c3\",\n \"name\":\"Drone 1\"\n },\n {\n \"uuid\":\"ff903a54-166e-447c-8981-5ffc8b2e82f9\",\n \"name\":\"Drone 2\"\n }\n]", "language": "json" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}