GPS-locations

Use these API endpoints to read geo locations.

Current version: 1

Example geo location

{
  "geo_location": {
    "id": "Abc123",
    "latitude": 52.255223,
    "longitude": 6.160636,
    "radius_accuracy": 48.5,
    "recorded_at": "2021-01-01T13:00:00.000+01:00",
    "asset": {
      "id": "Ref001",
      "url": "https://my.iobee.eu/api/assets/Ref001"
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<geo-location>
  <id>Abc123</id>
  <latitude type="float">52.255223</latitude>
  <longitude type="float">6.160636</longitude>
  <radius-accuracy type="float">48.5</radius-accuracy>
  <recorded-at type="dateTime">2021-01-01T13:00:00+01:00</recorded-at>
  <asset>
    <id>Ref001</id>
    <url>https://my.iobee.eu/api/assets/Ref001</url>
  </asset>
</geo-location>
latitude The latitude of the GPS-coordinate, between -90 and 90
longitude The longitude of the GPS-coordinate, between -180 and 180
radius_accuracy The accuracy of the GPS-coordinate. This feature is unimplemented for now.
recorded_at When the GPS-coordinate was recorded.
asset The asset this location belongs to.
asset/id The id of the asset.
asset/url The url of the asset.

Index

Gets a list with all geo locations. This is a paginated response.

URL
GET https://my.iobee.eu/api/geo_locations

Response

Status
200 - OK
Body
{
  "geo_locations": [
    {
      "id": "Abc123",
      "latitude": 52.255223,
      "longitude": 6.160636,
      "radius_accuracy": 48.5,
      "recorded_at": "2021-01-01T13:00:00.000+01:00",
      "asset": {
        "id": "Ref001",
        "url": "https://my.iobee.eu/api/assets/Ref001"
      }
    }
  ],
  "_next_page": {
    "token": "eyJzIjoxNjA5NTAyNDAwLjAsImkiOm51bGx9",
    "empty": true,
    "remaining": 0,
    "url": "https://my.iobee.eu/docs/api/geo_locations?page_token=eyJzIjoxNjA5NTAyNDAwLjAsImkiOm51bGx9"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <geo-locations type="array">
    <geo-location>
      <id>Abc123</id>
      <latitude type="float">52.255223</latitude>
      <longitude type="float">6.160636</longitude>
      <radius-accuracy type="float">48.5</radius-accuracy>
      <recorded-at type="dateTime">2021-01-01T13:00:00+01:00</recorded-at>
      <asset>
        <id>Ref001</id>
        <url>https://my.iobee.eu/api/assets/Ref001</url>
      </asset>
    </geo-location>
  </geo-locations>
  <_next-page>
    <token>eyJzIjoxNjA5NTAyNDAwLjAsImkiOm51bGx9</token>
    <empty type="boolean">true</empty>
    <remaining type="integer">0</remaining>
    <url>https://my.iobee.eu/docs/api/geo_locations?page_token=eyJzIjoxNjA5NTAyNDAwLjAsImkiOm51bGx9</url>
  </_next-page>
</hash>

Show

Gets the specified geo location.

URL
GET https://my.iobee.eu/api/geo_locations/:id

Response

Status
200 - OK
Body
{
  "geo_location": {
    "id": "Abc123",
    "latitude": 52.255223,
    "longitude": 6.160636,
    "radius_accuracy": 48.5,
    "recorded_at": "2021-01-01T13:00:00.000+01:00",
    "asset": {
      "id": "Ref001",
      "url": "https://my.iobee.eu/api/assets/Ref001"
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<geo-location>
  <id>Abc123</id>
  <latitude type="float">52.255223</latitude>
  <longitude type="float">6.160636</longitude>
  <radius-accuracy type="float">48.5</radius-accuracy>
  <recorded-at type="dateTime">2021-01-01T13:00:00+01:00</recorded-at>
  <asset>
    <id>Ref001</id>
    <url>https://my.iobee.eu/api/assets/Ref001</url>
  </asset>
</geo-location>

Location history

Gets the location history of an asset. This is a paginated response.

URL
GET https://my.iobee.eu/api/assets/:id/geo_locations

Response

Status
200 - OK
Body
{
  "geo_locations": [
    {
      "id": "Abc123",
      "latitude": 52.255223,
      "longitude": 6.160636,
      "radius_accuracy": 48.5,
      "recorded_at": "2021-01-01T13:00:00.000+01:00"
    }
  ],
  "_next_page": {
    "token": "eyJzIjoxNjA5NTAyNDAwLjAsImkiOm51bGx9",
    "empty": true,
    "remaining": 0,
    "url": "https://my.iobee.eu/docs/api/geo_locations?page_token=eyJzIjoxNjA5NTAyNDAwLjAsImkiOm51bGx9"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <geo-locations type="array">
    <geo-location>
      <id>Abc123</id>
      <latitude type="float">52.255223</latitude>
      <longitude type="float">6.160636</longitude>
      <radius-accuracy type="float">48.5</radius-accuracy>
      <recorded-at type="dateTime">2021-01-01T13:00:00+01:00</recorded-at>
    </geo-location>
  </geo-locations>
  <_next-page>
    <token>eyJzIjoxNjA5NTAyNDAwLjAsImkiOm51bGx9</token>
    <empty type="boolean">true</empty>
    <remaining type="integer">0</remaining>
    <url>https://my.iobee.eu/docs/api/geo_locations?page_token=eyJzIjoxNjA5NTAyNDAwLjAsImkiOm51bGx9</url>
  </_next-page>
</hash>

Options

Include message info

?include_message_info=t

You can request to receive metadata about the sigfox message. If this option is set to true in index or show, Bumblebee will include a message_info node:

{
  "message_info": {
    "id": "Abc123",
    "sent_at": "2021-01-01T13:00:00.000+01:00",
    "created_at": "2021-01-01T13:00:00.000+01:00",
    "recorded_at": "2021-01-01T13:00:00.000+01:00",
    "snr": 1.234,
    "rssi": 1.234,
    "sequence": 123,
    "message_number": 123,
    "external_io": 1
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<message-info>
  <id>Abc123</id>
  <sent-at type="dateTime">2021-01-01T13:00:00+01:00</sent-at>
  <created-at type="dateTime">2021-01-01T13:00:00+01:00</created-at>
  <recorded-at type="dateTime">2021-01-01T13:00:00+01:00</recorded-at>
  <snr type="float">1.234</snr>
  <rssi type="float">1.234</rssi>
  <sequence type="integer">123</sequence>
  <message-number type="integer">123</message-number>
  <external-io type="integer">1</external-io>
</message-info>
recorded_at When the data was recorded by the node.
sent_at When the message was sent by the node.
(Please note: If a message is being sent again, the sent_at will contain the timestamp for when the message was sent again, not the original timestamp)
snr The signal-to-noise ratio in dB.
rssi The received signal strength indicator in dBm.
sequence The Sigfox sequence number of the message.
message_number The Bumblebee sequence number of the message.
external_io The state of the external i/o at the time of the message. A value of 0 means the external i/o is active, a value of 1 means the external i/o is inactive. This value will be nil if the node version is below 0.9
created_at When we received this message from Sigfox.

Include node configuration

?include_node_configuration=t

You can request to receive the configuration that was used by the node to sent the message. If this option is set to true in index or show, Bumblebee will include a message_info node containing a node_configuration node.

Note that if this option is set to true, include_message_info will also be implicitly set to true.

{
  "message_info": {
    "id": "Abc123",
    "sent_at": "2021-01-01T13:00:00.000+01:00",
    "created_at": "2021-01-01T13:00:00.000+01:00",
    "recorded_at": "2021-01-01T13:00:00.000+01:00",
    "snr": 1.234,
    "rssi": 1.234,
    "sequence": 123,
    "message_number": 123,
    "external_io": 1,
    "node_configuration": {
      "id": "Ref001",
      "name": "Name",
      "behavior_id": "Abc123",
      "behavior_version": 3,
      "behavior_profile": "unless",
      "trigger_type": "motion"
    }
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<message-info>
  <id>Abc123</id>
  <sent-at type="dateTime">2021-01-01T13:00:00+01:00</sent-at>
  <created-at type="dateTime">2021-01-01T13:00:00+01:00</created-at>
  <recorded-at type="dateTime">2021-01-01T13:00:00+01:00</recorded-at>
  <snr type="float">1.234</snr>
  <rssi type="float">1.234</rssi>
  <sequence type="integer">123</sequence>
  <message-number type="integer">123</message-number>
  <external-io type="integer">1</external-io>
  <node-configuration>
    <id>Ref001</id>
    <name>Name</name>
    <behavior-id>Abc123</behavior-id>
    <behavior-version type="integer">3</behavior-version>
    <behavior-profile type="symbol">unless</behavior-profile>
    <trigger-type type="symbol">motion</trigger-type>
  </node-configuration>
</message-info>
id The id of the configuration that was active.
name The name of the configuration that was active.
behavior_id The ID of the behavior that was active.
behavior_version The version of the behavior that was active. The version will change every time you alter the behavior.
behavior_profile The profile of the behavior that was active, the value is one of: default or unless
trigger_type The type of trigger that caused this message to be sent, only present if behavior_profile is unless