Introduction

Sensor API allows you to register and manage sensors. You can register new sensors, set their geo location, associate tags and link to other sensors. In addition, you can search for sensors using tags, geo location and proximity to other sensors.

Data types

The following data types/fields are frequently used in the Sensor API

  • uuid : iBeacon UUID, a string containing a type 4 UUID
  • major : iBeacon Major Version, an integer
  • minor : iBeacon Minor Version, an integer
  • tag : String, e.g: shoes, handbags, counter_cosmetics, parking lot
  • latitude: Decimal, represents a latitude value
  • longitude: Decimal, represents a longitude value
  • radius: Integer, represents the radius of circle in meters
  • metadata: A collection of namespaced key-value pairs.
    • namespace: A URL safe string (a-zA-Z0-9_-~)
    • key/value: Any string

e.g: Below is a metadata collection with two namespaces: messages and urls, each with a few key-value pairs.

{
  "messages" : {
    "welcome_title" : "Hello!",
    "welcome_line" : "Welcome to the store!",
    "exit_title" : "Goodbye!",
    "exit_line" : "Please visit us again."
  },
  "urls" : {
    "faq" : "http://www.example.com/faq.html",
    "store" : "http://www.example.com/store.html",
    "support" : "http://www.example.com/support.html",
  }
}
  • Sensor: Represents a Sensor, and contains uuid, major, minor, tags, location, metadata and links. Links are other sensor that this sensor is associated with, forming a grid. e.g. Below is a sensor that has tags alberta and handbags and is linked to two other sensors.
{
  "uuid": "A12311231-4FA2-4E98-8024-BC5B71E0893E",
  "major_version": "2",
  "minor_version": "101",
  "account_id": "2131231-5dd7-4df4-b8c7-9b4aa43f10b4",
  "location": [
    "45.5585653162083",
    " -122.65643119812"
  ],
  "tags": [
    "alberta", "handbags"
  ],
  "metadata": {
    "detail": {
      "description": "Health Store Counter"
    }
  },
  "links" : [
    {
      "uuid": "A12311231-4FA2-4E98-8024-BC5B71E0893E",
      "major_version": "2",
      "minor_version": "102",
      "account_id": "2131231-5dd7-4df4-b8c7-9b4aa43f10b4",
      "location": [
        "45.5585653162083",
        " -122.65643119812"
      ],
      "tags": [
         "alberta"
      ],
      "metadata": {
        "detail": {
          "description": "Health Store exit"
        }
      }
    },
    {
      "uuid": "A12311231-4FA2-4E98-8024-BC5B71E0893E",
      "major_version": "2",
      "minor_version": "103",
      "account_id": "2131231-5dd7-4df4-b8c7-9b4aa43f10b4",
      "location": [
        "45.5585653162083",
        " -122.65643119812"
      ],
      "tags": [
        "alberta"
      ],
      "metadata": {
        "detail": {
          "description": "Health Store storage room"
        }
      }
    }

  ]
}