Internal Locations API

Use the Locations API to:

  • Get location shift activities

HTTP Headers

The HTTP headers are used to access all RTLS APIs are listed below. Before submitting requests to the company API, set the following headers.

Header Name Example Value Description
X-User-Email admin@example.com Email of the user performing HTTP requests to the API.
X-User-Token Drv3yU7PdyqUMtr89erZ Token allowing user access to the API.

NOTE: Headers are applying to public routes, routes starts with /api/private/... access from localhost and do not require headers

Set header X-USER-EMAIL

Send a request to log in using POST api/auth/log_in.json described in the Auth API. Using the email address returned in the response, set: X-USER-EMAIL = data.email

Set header X-USER-TOKEN

Send a request to log in using POST api/auth/log_in.json described in the Auth API. Using the authentication token returned in the response, set: X-USER-TOKEN = data.token

Set header X-USER-PROJECT

Send a request to get projects using GET api/projects/ described in the Projects API. You must send this request with headers X-USER-EMAIL and X-USER-TOKEN already set. Using the project UID returned in the response, set: X-USER-PROJECT = projects[i].uid

Companies Endpoints

Functionality Method Endpoint
get location shift activities GET /api/v2/locations/shift_activities/${uid}

Endpoints

Get location shift activities

GET /api/v2/locations/shift_activities/${uid}

Gets currently active shift for site.

Response Fields

Field Description
activities Active shift for location
activities.uid Location unique id currently shift is active
activities.trackableObjects
activities.current_shift Current active shift
activities.current_shift.name Shift name
activities.current_shift.start Shift start cron string
activities.current_shift.end Shift end cron string
activities.current_shift.expected_person Expected count of person on shift
activities.current_shift.expected_vehicles Expected count of vehicle on shift
activities.current_shift.expected_others Expected count of other object on shift
activities.current_shift.active Shift activity, true

Example Response

  • active shift
{
  "activities": {
    "uid": "sFHeyqs-S9iQ4b7HBW0S3Q",
    "trackableObjects": {},
    "current_shift": {
      "name": "dd",
      "start": "0 0 * * 1",
      "end": "0 22 * * 1",
      "expected_person": null,
      "expected_vehicles": null,
      "expected_others": null,
      "active": true
    }
  }
}
  • no active shift
{
  "activities": null
}

results matching ""

    No results matching ""