Exposure Analytics

API Documentation

Learn how to connect your software to the Exposure Analytics platform.

Overview

Use your data outside the platform

The Exposure Analytics API lets approved customers retrieve their event and sensor data for their own use.

Getting access

An account will be created for you, with access to the APIs you need. Your account will only return data belonging to your assigned company or reseller.

Quick start

Authenticate and make a request

The examples below use curl, a command-line tool for making HTTP requests. You can make the same requests using the interactive API reference, an API client such as Postman, or your own software.

  1. 1. Request an access token

    Send your account email address and password to the sessions endpoint. Use the same host that you use to access the Exposure Analytics platform.

    curl --request POST https://app.exposureanalytics.com/api/v1/sessions --header "Content-Type: application/json" --data '{"email":"you@example.com","password":"YOUR_PASSWORD"}'

    For clarity, this example uses a password placeholder. Do not replace it with a real password in a command that may be saved in your shell history. Use the interactive API reference or a securely configured API client for real credentials.

    A successful request returns a response similar to:

    {"authToken": "YOUR_API_TOKEN", "expiresAt": "YYYY-MM-DDTHH:MM:SSZ", "user": {"id": 123, "name": "Example API User", "email": "you@example.com"}}

    Access tokens expire after 30 days. Keep your token private and do not include it in emails, screenshots or source control.

  2. 2. Include the token in API requests

    Send the token in the Authorization header. For example, this request returns the events available to your account:

    curl https://app.exposureanalytics.com/api/v1/events --header "Authorization: Token YOUR_API_TOKEN" --header "Accept: application/json"

    The returned data is limited to your assigned company and, where applicable, companies belonging to your assigned reseller.

  3. 3. Replace path parameters

    Values inside braces are placeholders. Replace them with the relevant ID. For example:

    /api/v1/events/{event_id}/statistics/totals

    For event 42, that becomes:

    /api/v1/events/42/statistics/totals
  4. 4. Revoke the token

    Revoke a token when it is no longer required:

    curl --request DELETE https://app.exposureanalytics.com/api/v1/sessions --header "Authorization: Token YOUR_API_TOKEN"

Common responses

200 OK:
The request completed successfully.
401 Unauthorized:
The token is missing, invalid or expired.
403 Forbidden:
Your account does not have the required API permission or data access.
404 Not Found:
The requested event, sensor or other resource is not available to your account.

If you need another API permission or cannot access expected data, contact support.

Endpoints

Available API endpoints

This catalogue contains the customer-facing API endpoints. What your account can use depends on its EX, Apex and BLE permissions, company or reseller data scope, and any endpoint-specific access rules.

Authentication

POST /api/v1/sessions Request an access token
DELETE /api/v1/sessions Revoke an access token

Events

GET /api/v1/events List available events

EX sensors

GET /api/v1/ex_sensors/{physical_id}/health_status View sensor health
GET /api/v1/ex_sensors/{physical_id}/uploaded_archives List uploaded archives
GET /api/v1/events/{event_id}/ex_allocations List allocated EX sensors
PATCH /api/v1/events/{event_id}/ex_allocations/{sensor_id} Update an EX allocation
PUT /api/v1/events/{event_id}/ex_allocations/{sensor_id} Update an EX allocation

EX statistics

GET /api/v1/events/{event_id}/statistics/dwell_distribution View dwell distribution statistics
GET /api/v1/events/{event_id}/statistics/dwell View dwell statistics
GET /api/v1/events/{event_id}/statistics/totals View total statistics
GET /api/v1/events/{event_id}/statistics/visitors View visitor statistics
GET /api/v1/events/{event_id}/statistics/realtime Poll realtime statistics

Apex

GET /api/v1/events/{event_id}/apex_allocations List allocated Apex sensors
GET /api/v1/events/{event_id}/apex_allocations/{allocation_id} View an Apex allocation
GET /api/v1/events/{event_id}/apex_statistics/line_counts View line count statistics
GET /api/v1/events/{event_id}/apex_statistics/line_occupancies View line occupancy statistics
GET /api/v1/events/{event_id}/apex_statistics/zone_dwells View zone dwell statistics
GET /api/v1/events/{event_id}/apex_statistics/zone_occupancies View zone occupancy statistics

BLE

POST /api/v1/ble/ble_tags/register Register a BLE tag
POST /api/v1/ble/ble_tags/generate_next_instance_id Generate the next BLE tag instance ID
POST /api/v1/ble/ble_tags/bulk_update Update multiple BLE tags
GET /api/v1/ble/events/{id}/whole_time_summary View whole-event statistics
GET /api/v1/ble/events/{id}/day_summary View daily statistics
GET /api/v1/ble/events/{id}/sensor_comparison Compare sensors
GET /api/v1/ble/events/{id}/group_comparison Compare groups
GET /api/v1/ble/events/{id}/dwell View dwell statistics
GET /api/v1/ble/events/{id}/dwell_distribution View dwell distribution statistics

Explore the API

Sign in to the interactive API reference to view the endpoints available to your account and try requests.

Open interactive API reference