Data Analysis API Edit
Liquid offers a REST API for reading aggregated data from Liquid servers, called Data Analysis API.
This API has one endpoint available and authentication is mandatory using the app key, e.g.: uDfNVSzRCOjgvlWCpn7CPx-UCEAA5CPs
. This key is available in your app settings on Liquid dashboard, and it’s different from the Data Collection API key.
The current available endpoint is:
GET | Resource info |
---|---|
/users/:id | Used to obtain information about a user. |
GET /users/:id Edit
Returns aggregated data about a user. It contains three keys:
Attribute | Description |
---|---|
attrs |
User attributes, including custom ones. These are accumulated and reflect the last known information of each user. |
last_device |
Information about the last device used by this user. |
session |
Session-related metrics of this user. |
Headers
Header | Example | Notes |
---|---|---|
Authorization | Token [your_api_key] |
The app API key, available at the App settings on Liquid dashboard. |
Accept | application/vnd.lqd.v1+json |
Optionally, you can use application/json if you don’t care about which api version you are using, notice future changes may break you code if you do this. |
Content-Type | application/json |
Resource URL
https://analyze.lqd.io/users/:unique_id
Important note
The unique_id
attribute should be URL encoded.
Example Request
GET
https://analyze.lqd.io/users/02318f2cdd156d78fd4431
Example Result
Response
Code | Status | Content | Scenario |
---|---|---|---|
200 | Ok | A JSON object representing the user. See the example above. | Existing user. |
404 | Not Found | n/a | User was not found. |
401 | Unauthorized | n/a | Authorization failed (probably you used an invalid API token). |
Error messages for Unprocessable Entity (422) have the following structure: