endpoint and authentication

Please refer to the API overview section to get the API endpoint, query format and authentication process.

List locations

Retrieves location data for one application.

GET /api/apps/app_identifier/locations?page=page&per_page=per_page&fields=fields&session_ids=session_ids&device_ids=device_ids&latitude=latitude&longitude=longitude&since_date=since_date&until_date=until_date

CSV Export endpoint (see how to use it here):

GET /api/apps/app_identifier/locations_export?fields=fields&session_ids=session_ids&device_ids=device_ids&latitude=latitude&longitude=longitude&since_date=since_date&until_date=until_date

Property Type Description Default
app_identifier string The app unique identifier required
page integer The page of devices to retrieve. Negative values will be ignored, and the default number will be used. 1
per_page integer The number of device ids to retrieve per page.
Range of values accepted is [1..10000]. Values outside of range are ignored, and the default value is used instead.
1000
fields string A string with a list of device fields to present, separated by commas. Example: fields=device_id,longitude. If there's no value for some field requested, the value null is returned for that field.
See table below for possible fields.
-
session_ids string List of comma-separated session_id's to filter to filter the locations only for the provided sessions -
device_ids string List of comma-separated device_id's to filter the locations only for the provided devices -
latitude Decimal A floating point number which will filter the locations for the app only for that latitude -
longitude Decimal A floating point number which will filter the locations for the app only for that longitude -
since_date datetime The date in UTC since when locations should be fetched. Expressed in any ISO format, e.g. 2017-04-06T16:41:44+05:00. -
until_date datetime The date in UTC until when locations should be fetched. Expressed in any ISO format, e.g. 2017-04-06T16:41:44+05:00. -

Response fields

Value Type Description
location_id string Always returned The unique identifier of the location
device_id string Unique identifier of the device
application_id string Unique identifier of the application
latitude Decimal Decimal number representing the latitude of the location
longitude Decimal Decimal number representing the longitude of the location
session_id string Unique identifier of the session associated with the location
user_id string Unique identifier of the user id associated with the location
date_utc datetime Date and time of the location in UTC

Response

Status: 200 OK

{
  "result": {
    "items": [
      {
        "location_id": "51a38a4c239e634f310000c8-locs-00000",
        "longitude": 2.314179,
        "latitude": 48.875143,
        "application_id": "FAAPPLI_Fr5tg2e",
        "user_id": "user@myuser",
        "session_id": "51a38a64239e634f3b0000cc"
      },
      {
        "location_id": "51a38a4c239e634f310000c8-locs-00001",
        "longitude": 2.314172,
        "latitude": 48.873245,
        "application_id": "FAAPPLI_Fr5tg2e",
        "user_id": "user@myuser",
        "session_id": "51a38a64239e634f3b0000cc"
      },
    ],
    "total_pages": 4,
    "total_items": 20,
    "item_count": 2,
    "navigation": {
      "first": "http://api.follow-apps.com/api/apps/FAAPPLI_Fr5tg2e/locations?page=1&fields=user_id,application_id,latitude,longitude",
      "prev": "http://api.follow-apps.com/api/apps/FAAPPLI_Fr5tg2e/locations?page=1&fields=user_id,application_id,latitude,longitude",
      "next": "http://api.follow-apps.com/api/apps/FAAPPLI_Fr5tg2e/locations?page=2&fields=user_id,application_id,latitude,longitude",
      "last": "http://api.follow-apps.com/api/apps/FAAPPLI_Fr5tg2e/locations?page=4&fields=user_id,application_id,latitude,longitude"
    }
  },
  "success": true
}

Status: 404 not found

{
    "status": "not_found",
    "success": false,
    "error_message": "Couldn't find App"
}

Status: 400 bad request

{
  "success": false,
  "status": "bad_request",
  "error_message": "Wrong date format"
}