Analytics
This API exposes Unleash live read-only endpoints, allowing developers and users to retrieve AI-generated analytics data.
API access is currently an optional add-on. Please contact your account manager to request a demo or for more information.
Base URL: https://api.unleashlive.com
Authentication
Section titled “Authentication”All endpoints described in this section require a custom header containing your individual customer API key. See API KEY for information on how to obtain your key.
x-api-key: <API-KEY>Example Usage
Section titled “Example Usage”curl -X GET -H "x-api-key: <API-KEY>" https://api.unleashlive.com/v1/analytics/versionimport urllib3http = urllib3.PoolManager()r = http.request('GET', 'https://api.unleashlive.com/v1/analytics/version', headers={'x-api-key': '<API-KEY>'})r.dataEndpoints
Section titled “Endpoints”Get Version
Section titled “Get Version”GET /v1/analytics/versionRetrieves the current API version number. This endpoint is useful for testing and confirming that your API key is valid.
Example Response
Section titled “Example Response”"1.0.1"List Devices
Section titled “List Devices”GET /v1/analytics/devicesReturns a list of all valid devices for the authenticated API key and account.
Example Response
Section titled “Example Response”["Wb8fabc31378ce07", "W022abc5be35bb72", "Weea288bc1faaddd"]Each item corresponds to an Unleash live Device ID.
List Sessions
Section titled “List Sessions”GET /v1/analytics/sessionsReturns a list of all sessions for the authenticated API key and account.
Example Response
Section titled “Example Response”["1595418530512", "1595452859625", "1595492155987"]Each item corresponds to an Unleash live Session ID.
Get Analytics Data (Size-Optimized)
Section titled “Get Analytics Data (Size-Optimized)”GET /v1/analytics/{deviceId}/{unixUTCTimeStampFrom}/{unixUTCTimeStampTo}/{pageNumber}Retrieves raw analytics data generated between two given dates for a specific device.
This endpoint is size-optimized — returning a list of keys and an array of data values that map to those keys. See the Analytics Data Object reference for the response structure.
Path Parameters
Section titled “Path Parameters”See Path Parameters in the reference section for full descriptions.
Example Request
Section titled “Example Request”GET /v1/analytics/Wabcdb35be35bb72/1597630156000/1597630156000/1Example Response
Section titled “Example Response”{ "keys": [ "class_name", "count", "device_id", "frame_number", "model_id", "session_id", "source_file_name", "timestamp" ], "total_num_pages": 1, "data": [ [ "person", 1, "Wabcdb35be35bb72", 110251, "starter-ai", "1597622730877", "Wabcdb35be35bb72?token=sneaky-firefox-288", "2020-08-17T02:08:49.000Z" ], [ "person", 3, "Wabcdb35be35bb72", 110252, "starter-ai", "1597622730878", "Wabcdb35be35bb72?token=sneaky-firefox-288", "2020-08-17T02:08:49.000Z" ] ]}Get Tableau Data (Descriptive)
Section titled “Get Tableau Data (Descriptive)”GET /v1/analytics/tableau/{deviceId}/{unixUTCTimeStampFrom}/{unixUTCTimeStampTo}/{pageNumber}Retrieves Tableau-formatted analytics data generated between two given dates for a specific device.
This endpoint is descriptive, structuring the data as an array of JSON objects, allowing it to be read natively by services such as Tableau and Salesforce easily. See the Tableau Data Object reference for the response structure.
Path Parameters
Section titled “Path Parameters”See Path Parameters in the reference section for full descriptions.
Example Request
Section titled “Example Request”GET /v1/analytics/tableau/Wabcdb35be35bb72/1597630156000/1597630156000/1Example Response
Section titled “Example Response”{ "total_num_pages": 1, "data": [ { "timestamp": "2020-08-17T02:08:49.000Z", "class_name": "person", "count": 1, "device_id": "Wabcdb35be35bb72", "source_file_name": "Wabcdb35be35bb72?token=sneaky-firefox-288", "frame_number": 110251, "model_id": "starter-ai", "session_id": "1597622730877" }, { "timestamp": "2020-08-17T02:08:49.000Z", "class_name": "truck", "count": 1, "device_id": "Wabcdb35be35bb72", "source_file_name": "Wabcdb35be35bb72?token=sneaky-firefox-288", "frame_number": 110252, "model_id": "starter-ai", "session_id": "1597622730877" } ]}Reference
Section titled “Reference”Path Parameters
Section titled “Path Parameters”The data retrieval endpoints use the following path parameters:
| Parameter | Type | Description |
|---|---|---|
deviceId | String | required Unique Device ID |
unixUTCTimeStampFrom | Integer | required Unix epoch start, milliseconds |
unixUTCTimeStampTo | Integer | required Unix epoch end, milliseconds |
pageNumber | Integer | required Page number (starts at 1) |
Note: Payload is paginated starting with page number
1.
Analytics Data Object
Section titled “Analytics Data Object”The compact response format for GET /v1/analytics/{deviceId}/...:
| Field | Type | Description |
|---|---|---|
keys | String[] | A list of all keys used in the data field, in order of use |
total_num_pages | Integer | The total number of pages available for the requested data |
data | Array[] | List containing all requested data values, mapping to keys |
Tableau Data Object
Section titled “Tableau Data Object”The descriptive response format for GET /v1/analytics/tableau/{deviceId}/...:
| Field | Type | Description |
|---|---|---|
total_num_pages | Integer | The total number of pages available for the requested data |
data | Object[] | List of JSON objects containing all requested data |