Device Registry APIs

Introduction

The Device Registry exposes details about fielded devices via a REST API.  The API returns all devices (Blufis and Beacons).  Not all fields in each device are meaningful for each device type.  Fields not relevant for a given device type will be null. 

The Device Registry API supports various query parameters to help narrow a selection.  By default, all devices are returned.  The "deviceType" parameter can be set to either BLUFI or BEACON.  If some unsupported value is supplied, the system defaults to ALL.  The system will ignore the "uuid", "major" and "minor" parameters when searching for BLUFI types.  Also, if any "uuid", "major" or "minor" parameters are supplied while searching for ALL device types, then only supported device types (in this case Beacons) will be filtered.

Query Parameters

NOTE:  The wild card character for search is the percent symbol "%".  All queries must be URL encoded, so if the % character is included, it must be encoded as "%25" instead of just "%".

NameRequiredDefaultDescription
deviceTypeNo%Set to either "BEACON" or "BLUFI" (case insensitive) - any other value will default to % (ALL)
uuidNo%Specify a literal UUID value or fragment by using wild card characters %
majorNo%Specify a literal Major value or fragment by using wild card characters %
minorNo%Specify a literal Minor value or fragment by using wild card characters %
nameNo%The device name
deviceIdNo%The unique record locator id (primary key) of the device
macNo%The device MAC ADDRESS

Example Query String

/portal/papis/v1/projects/<projectId>/registry/devices?deviceType=BEACON&uuid=A6702217-BDC4-45F4-8198-9B7A6E979AB3&major=1200&minor=44797

Fields

The following fields are returned in the API:

NameData TypeNullableDevice TypeDescription
id64StringNoALLThe Bluvision unique hardware identifier.
macAddressStringNoALLMedia Access Control Address.
deviceIdStringNoALLUnique record locator of device. For Blufi, this is synonymous with "adapterId". For beacons, this is usually the same as the "id64" value.
nameStringYesALLFriendly name assigned by administrator.
statusStringNoALLThe Bluzone Cloud status of the device.
deviceTypeStringNoALLOne of BLUFI or BEACON.
firmwareTypeStringNoALLType of firmware currently installed.
firmwareVersionStringNoALLVersion of firmware currently installed.
latitudeNumberYesALLGeographic latitude value in decimal format.
longitudeNumberYesALLGeographic longitude value in decimal format.
floorNumberNumberYesALLThe floor number.
metaDataJSONYesALLMeta-data structure assigned by the administrator.
uuidStringYesBEACONThe iBeacon UUID value.
majorNumberYesBEACONThe iBeacon Major value.
minorNumberYesBEACONThe iBeacon Minor value.
tagsArrayYesALLA list of tag names that are associated with the given device in the Bluzone Cloud.
eddystoneUidNamespaceStringYesBEACONThe Eddystone UID Namespace value
eddystoneUidInstanceStringYesBEACONThe Eddystone UID Instance value
dateCreatedStringNoALLTimestamp of when this record was created.
dateUpdatedStringNoALLLast modified timestamp for this record.

API

Get Device Registry

Returns a JSON Array of Device objects.

REQUEST

GET https://<host>/portal/papis/v1/projects/<projectId>/registry/devices
Accept:  application/json
BZID:  bad18eba1ff45jk7858b8ae88a77fa30

RESPONSE

HTTP/1.x 200 OK
Content-Type:  application/json
[
  {
    "id64": "16179664999283123558",
    "macAddress": "01:ed:43:48:4e:1a:86",
    "deviceId": "16179664999283123558",
    "name": "Concierge Waypoint 3",
    "status": "PENDING_UPDATE",
    "deviceType": "BEACON",
    "firmwareType": "iBeek(Ti)",
    "firmwareVersion": null,
    "latitude": 26.06289226658518,
    "longitude": -80.1861864781028,
    "floorNumber": 2,
    "metaData": {
      "beaconType": "CheckinDesk",
      "terminal": "D",
      "concourse": "1",
      "airside": false,
      "publicBeacon": true
    },
    "uuid": "b2f4ce54-3060-4fb7-97c2-b6fbb2d3c260",
    "major": 2100,
    "minor": 1228,
	"eddystoneUidNamespace": null,
    "eddystoneUidInstance": "9B6E1A3F71AA",
    "dateCreated": "2015-04-29",
    "dateUpdated": "2015-08-25"
  },  
  {
    "id64": "3417654221413133211",
    "macAddress": "5c:31:3e:04:59:09",
    "deviceId": "93721",
    "name": "Front Desk: Reception",
    "status": "CONNECTED",
    "deviceType": "BLUFI",
    "firmwareType": "Blufi",
    "firmwareVersion": null,
    "latitude": 26.06289226658518,
    "longitude": -80.1861864781028,
    "floorNumber": 1,
    "metaData": null,
    "uuid": null,
    "major": null,
    "minor": null,
    "tags": ["Blufi", "Test Device"],
	"eddystoneUidNamespace": null,
    "eddystoneUidInstance": null,
    "dateCreated": "2015-08-04",
    "dateUpdated": "2015-08-23"
  }
]