{"type":"api","title":"/v2/devices","meta":{"id":"/apps/pubhub/media/cisco-spaces-location-cloud-api-v2/74140121faac9832db4ec41d580116a19dc1e6d7/fab010f4-e798-385c-884d-31ff3cf2dd75","swagger":"2.0","info":{"title":"Cisco Spaces Location Cloud API","version":"2.6.0","description":"The Cisco Spaces Location Cloud APIs provided by ApiServer for Map, Devices and History. The DNASpaces UI has three websites, please use the corresponding URL US(dnaspaces.io), EU(dnaspaces.eu) and Singapore(ciscospaces.sg) when calling the APIs. When the base url has version v2 present, then please exclude adding v2 in api URL"},"host":"dnaspaces.io","basePath":"/api/location/v2","schemes":["https"],"securityDefinitions":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}}},"spec":{"tags":["Active Devices (v2)"],"description":"This API supports searching by a variety of parameters. If no parameters are given, all active devices are returned with pagination. The default page number is 1, default number of items per page is 1000.","produces":["application/json"],"parameters":[{"name":"deviceType","in":"query","description":"CLIENT, TAG, BLE, ROGUE_AP, ROGUE_CLIENT or INTERFERER","required":false,"type":"string","$$ref":"#/parameters/deviceTypeParam"},{"name":"deviceId","in":"query","description":"The device unique identifier, for example the device macAddress.","required":false,"type":"string","$$ref":"#/parameters/deviceIdParam"},{"name":"ipAddress","in":"query","description":"IP address of the connected device. Available for associated devices only.","type":"string","$$ref":"#/parameters/v2ipAddressParam"},{"name":"floorId","in":"query","description":"Unique identifier for a floor from the map import process","required":false,"type":"string","$$ref":"#/parameters/floorIdParam"},{"name":"buildingId","in":"query","description":"Unique identifier for a building from the map import process","required":false,"type":"string","$$ref":"#/parameters/buildingIdParam"},{"name":"campusId","in":"query","description":"Unique identifier for a campus from the map import process","required":false,"type":"string","$$ref":"#/parameters/campusIdParam"},{"name":"associated","in":"query","description":"true|false. Whether or not a device has connected to a network.","required":false,"type":"boolean","$$ref":"#/parameters/associatedParam"},{"name":"ssid","in":"query","description":"Wifi service set identifier (SSID). Available for associated devices only.","required":false,"type":"string","$$ref":"#/parameters/v2ssidParam"},{"name":"apMacAddress","in":"query","description":"The mac address of the Access Point (AP). Available for associated devices only.","type":"string","$$ref":"#/parameters/v2apMacAddressParam"},{"name":"manufacturer","in":"query","description":"Manufacturer of the device.","type":"string","$$ref":"#/parameters/manufacturerParam"},{"name":"rogueApClients","in":"query","description":"When using deviceType=ROGUE_AP, this will return rogue APs that have connected devices.","type":"boolean","$$ref":"#/parameters/v2rogueApClientsParam"},{"name":"format","in":"query","description":"Indicate if using geojson, value is \"geojson\" if so.","required":false,"type":"string","$$ref":"#/parameters/format"},{"name":"mapElementId","in":"query","description":"Indicate the map element unique identifier.","required":false,"type":"string","$$ref":"#/parameters/mapElementIdParam"},{"name":"mapElementLevel","in":"query","description":"Indicate the map element level, valid value is \"campus\", \"building\" and \"floor\".","required":false,"type":"string","$$ref":"#/parameters/mapElementLevelParam"},{"name":"page","in":"query","description":"The page number requests for. Start from 1 and default value is 1.","required":false,"type":"string","$$ref":"#/parameters/pageParam"},{"name":"limit","in":"query","description":"The maximum number of items that may be returned for a single request. Default value is 1000. Other allowed values are from 1000 to 20K. Anything above 20k is sent will be converted to 10k limit.","required":false,"type":"string","$$ref":"#/parameters/v2limitParam"},{"name":"username","in":"query","description":"user name of the connected user. Available for associated devices only.","type":"string","$$ref":"#/parameters/v2usernameParam"},{"name":"searchType","in":"query","description":"Indicate if exact match is required. Valid value is \"wildcard\"","required":false,"type":"string","$$ref":"#/parameters/searchTypeParam"},{"name":"searchType","in":"query","description":"Query next page of data using scroll id present in previous api response","required":false,"type":"string","$$ref":"#/parameters/scrollIdParam"}],"responses":{"200":{"description":"Device location data.","schema":{"type":"object","properties":{"results":{"description":"The list of device location data, include associated AP devices location data as the first item and each device's mac address and coordinates as following items in the list. (As \"oneof\" schema is not supported in current version of swagger editor(2.0), please refer to model \"LocationDeviceDetails\" for schema reference as well)","type":"array","items":{"type":"object","properties":{"tenantId":{"type":"string","description":"the tenant unique identifier","example":200},"macAddress":{"type":"string","description":"mac address of the device.","example":"00:12:b8:0a:c6:20"},"deviceType":{"type":"string","description":"CLIENT, TAG, ROGUE_AP, ROGUE_CLIENT, INTERFERER AND BLE_TAG","example":"TAG"},"campusId":{"type":"string","description":"unique identifier for a campus from the map import process","example":"5cb06b3ba1d943669963417c4330c6c7"},"buildingId":{"type":"string","description":"unique identifier for a building from the map import process","example":"98c86b09665a4ffab9647709d966f3a6"},"floorId":{"type":"string","description":"unique identifier for a floor from the map import process","example":"3b3aad61352e4bc09cdea0119ee3d9f3"},"lhfloorId":{"type":"string","description":"location hierarchy unique identifier for a floor from the map import process","example":"3b3aad61352e4bc09cdea0119ee3d9f3"},"hierarchy":{"type":"string","description":"Location hierarchy displayed in string format","example":"San Jose-\u003eSJC-17-\u003e1st Floor"},"locationHierarchy":{"type":"string","description":"Location hierarchy from root level displayed in string format","example":"root-node-\u003eSan Jose-\u003eSJC-17-\u003e1st Floor"},"hierarchyIds":{"type":"array","description":"array of hierarchy level ids from root to floor or zone","example":"[\"0c872fbb-0545-45fd-b7e2-6ce6ff6f08af\",\"2d3da06b-f4f2-4b3e-9e56-492665ae78ac\"]"},"source":{"type":"string","description":"Device source like Meraki (data from Meraki Cloud), Notification (tethered data from CMX) and Compute (data from Connector)","example":"NOTIFICATION"},"isMacHashed":{"type":"boolean","description":"states where the mac address is hash value","example":false},"deviceId":{"type":"string","description":"Unique device id assigned to device on Controller. Mainly used for randomised devices. When there is no unique device id available, Mac address is populated.","example":"00:24:b1:02:e7:10"},"coordinates":{"type":"array","description":"The coordinates represents cartesian location (x,y) of device which is always relative to a given floor","items":{"type":"number"},"example":[33.401928,101.87378]},"geoCoordinates":{"type":"array","description":"Latitude and Longitude coordinates of a device.","items":{"type":"number"},"example":[49.26188380661546,-123.24809010788138]},"confidenceFactor":{"type":"integer","description":"With every calculated location (x,y) a confidence factor (error feet) is returned.","example":120},"computeType":{"type":"string","description":"The compute type, possible values are RSSI, FASTLOCATE-RSSI and AOA.","example":"RSSI"},"firstLocatedAt":{"type":"string","format":"date-time","description":"The first time of the device location being detected.","example":"2018-05-25T17:30:12.403Z"},"lastLocatedAt":{"type":"string","format":"date-time","description":"The last time of the location being detected.","example":"2018-05-27T21:14:44.005Z"},"changedOn":{"type":"string","description":"The UTC time the device state changed.","example":1527456440322},"associated":{"type":"boolean","description":"true|false. Whether or not a device has connected to a network.","example":false},"manufacturer":{"type":"string","description":"Manufacturer of the device.","example":"Aeroscout Ltd."},"maxDetectedRssi":{"type":"object","properties":{"apMacAddress":{"type":"string","description":"AP mac address","example":"f0:7f:06:35:8d:00"},"band":{"type":"string","description":"The WiFi band the device is in.","example":"IEEE_802_11_B"},"slot":{"type":"integer","description":"The wifi slot","example":2},"rssi":{"type":"integer","description":"Wifi service set identifier. Available for associated clients only.","example":-81},"antennaIndex":{"type":"integer","description":"The natenna index, start from 0.","example":0},"lastHeard":{"type":"integer","example":1}},"$$ref":"#/definitions/LocationDeviceMaxDetectedRssi"},"numDetectingAps":{"type":"integer","description":"The number of detecting APs.","example":3},"apList":{"description":"The list of APs.","type":"array","items":{"type":"object","properties":{"apMacAddress":{"type":"string","description":"The AP's mac address.","example":"3c:08:f6:fb:29:50"},"bands":{"type":"array","description":"The wifi band the AP supports.","items":{"type":"string"},"example":["IEEE_802_11_A"]}},"$$ref":"#/definitions/LocationAPList"}}},"$$ref":"#/definitions/v2LocationDevice"}},"querystring":{},"success":{"type":"boolean","description":"True in a successful response.","example":true},"morePage":{"type":"boolean","description":"True to indicate there is next page, false otherwise","example":false}},"$$ref":"#/definitions/v2LocationDeviceResults"}},"400":{"description":"Bad Request","schema":{"type":"object","properties":{"code":{"type":"integer","description":"Error code."},"message":{"type":"string","description":"Error message for the cause."}},"$$ref":"#/definitions/Errors"}},"401":{"description":"Unauthorized Request","schema":{"type":"object","properties":{"code":{"type":"integer","description":"Error code."},"message":{"type":"string","description":"Error message for the cause."}},"$$ref":"#/definitions/Errors"}},"403":{"description":"Forbidden","schema":{"type":"object","properties":{"code":{"type":"integer","description":"Error code."},"message":{"type":"string","description":"Error message for the cause."}},"$$ref":"#/definitions/Errors"}},"500":{"description":"Server internal error","schema":{"type":"object","properties":{"code":{"type":"integer","description":"Error code."},"message":{"type":"string","description":"Error message for the cause."}},"$$ref":"#/definitions/Errors"}}},"method":"get","path":"/v2/devices"}}