Pagination

All index actions in this API are paginated. This way you can get the full dataset without having to download everything in one response.

Pagination is based on tokens, the token indicates to the server which resource you have received last so it can continue the dataset without any doubles. When resources are updated or created in between calls, the updated resource will be provided again in a later page.

The api also responds with a token for the last page of the dataset. You can use this token to check for any changes since the last call to the index action.

Example response

{
  "geo_locations": [
    {
      "id": "Abc123",
      "latitude": null,
      "longitude": null,
      "radius_accuracy": 1.234,
      "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/pagination?page_token=eyJzIjoxNjA5NTAyNDAwLjAsImkiOm51bGx9"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <geo-locations type="array">
    <geo-location>
      <id>Abc123</id>
      <latitude nil="true"/>
      <longitude nil="true"/>
      <radius-accuracy type="float">1.234</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/pagination?page_token=eyJzIjoxNjA5NTAyNDAwLjAsImkiOm51bGx9</url>
  </_next-page>
</hash>

The _next_page node

All index responses always include a _next_page node. This node includes the following items:

token The token for the next page.
empty true if the next page is empty, false otherwise
url The url to fetch the next page. (This node is omitted when you specify ?omit_urls=t)

To continue listing results, you have to call the index action again with the token as url parameter.

?page_token=:token

When the empty node is set to true, the call to the index action with the specified token will yield no results if nothing has changed since the last call. If any resources are updated or created they will be included in the page with the last token you have received. This means you can persist this token to check for any changes since your last call to the index action.

Other options

Updated since

?updated_since=2016-01-01T12:00Z

To restrict the dataset to only include only resources updated since a specific timestamp you can use the following URL parameter:

The timestamp must be formatted according to ISO8601 standards.

Active only

?active_only=t

When specified, the API will omit the archived and deleted resources. This is useful when doing an initial sync for example. The following values are recognized as a truthy value: t, true, y, yes, 1