Assist
Retrieve live sessions
Section titled Retrieve live sessionsReturns the list of live sessions for a particular project. Optionally filter by userId via a query parameter.
Defaults applied server-side: sort = timestamp, order = desc, limit = 10, page = 1.
Method
Section titled MethodGET
/public/:projectKey/assist/sessions
Parameters
Section titled Parameters| Name | Type | Description |
|---|---|---|
| projectKey | string | The project key (required) |
| userId | string | Optional tracker.setUserID value (URL query param) |
Request Headers
Section titled Request HeadersAuthorization: Bearer {YOUR_ORGANIZATION_API_KEY}
Example Request
Section titled Example Requestcurl -X GET \
'{BASE_URL}/public/aYYaFHiagqdXKEmVlmvJ/assist/sessions?userId=mickael@openreplay.com' \
-H 'Authorization: Bearer {YOUR_ORGANIZATION_API_KEY}'
Example Response
Section titled Example Response{
"data": {
"total": 1,
"sessions": [
{
"pageTitle": "OpenReplay Blog",
"sessionID": "6975518573799938",
"metadata": {},
"userID": "mickael@openreplay.com",
"userUUID": "8998545b-553c-4f41-a39d-d7cba7fac2d1",
"projectKey": "aYYaFHiagqdXKEmVlmvJ",
"timestamp": 1656437966459,
"trackerVersion": "3.5.11",
"userOs": "Mac OS",
"userBrowser": "Chrome",
"userBrowserVersion": "103.0.0.0",
"userDeviceType": "desktop",
"userCountry": "FR",
"live": true,
"projectId": 3
}
],
"live": true
}
}
Search live sessions
Section titled Search live sessionsSearch the list of live sessions for a particular project using a JSON body.
Defaults applied server-side when omitted: sort = timestamp, order = desc, limit = 10, page = 1.
Method
Section titled MethodPOST
/public/:projectKey/assist/sessions
Parameters
Section titled Parameters| Name | Type | Description |
|---|---|---|
| projectKey | string | The project key (required) |
Payload
Section titled Payload| Name | Type | Description |
|---|---|---|
| sort | string | The sort attribute (default: timestamp) |
| order | string | asc or desc (default: desc) |
| page | integer | Page number for pagination (default: 1) |
| limit | integer | Number of sessions per page (default: 10) |
| filters | array of filter | The list of filters (default: []) |
Filter object:
| Name | Type | Description |
|---|---|---|
| name | string | Filter attribute (required, e.g. userId). Use METADATA with source below |
| operator | string | contains or is (default: contains) |
| value | string[] | The list of values (default: []) |
| source | string | Metadata attribute name when name = METADATA (default: "") |
If value = [], the search matches live sessions that have the given attribute set (any value).
Request Headers
Section titled Request HeadersAuthorization: Bearer {YOUR_ORGANIZATION_API_KEY}
Example Request
Section titled Example RequestThe following example searches for the first 10 live sessions (sorted by timestamp descending) where userId contains openreplay and metadata.plan is trial or free.
curl -X POST \
{BASE_URL}/public/aYYaFHiagqdXKEmVlmvJ/assist/sessions \
-H 'content-type: application/json' \
-H 'Authorization: Bearer {YOUR_ORGANIZATION_API_KEY}' \
--data-raw '{
"filters": [
{ "value": ["trial", "free"], "name": "METADATA", "source": "plan", "operator": "is" },
{ "value": ["openreplay"], "name": "userId", "operator": "contains" }
],
"sort": "timestamp",
"order": "desc",
"limit": 10,
"page": 1
}'
Example Response
Section titled Example Response{
"data": {
"total": 1,
"sessions": [
{
"pageTitle": "OpenReplay Blog",
"sessionID": "6975518573799185",
"metadata": { "plan": "trial" },
"userID": "dev@openreplay.com",
"userUUID": "8998545b-553c-4f41-a39d-d7cba7fac2d1",
"projectKey": "aYYaFHiagqdXKEmVlmvJ",
"timestamp": 1656437966459,
"trackerVersion": "3.5.11",
"userOs": "Mac OS",
"userBrowser": "Chrome",
"userBrowserVersion": "103.0.0.0",
"userDeviceType": "desktop",
"userCountry": "FR",
"live": true,
"projectId": 3
}
],
"live": true
}
}