Assist

Only available for Enterprise Edition (EE).

Returns the list of live sessions for a particular project.

GET

/api/v1/:projectKey/assist/sessions

NameTypeDescription
projectKeystringThe ID of the project you’re tracking (required)

Authorization: {YOUR_ORGANIZATION_API_KEY}: The key can be found in ‘Preferences’ > ‘Account’ > ‘Organization API Key’.

200: Response sent as JSON in body

curl -X GET \
  https://openreplay.example.com/api/v1/aYYaFHiagqdXKEmVlmvJ/assist/sessions \
  -H 'content-type: application/json' \
  -H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
{
  "data": {
    "total": 1,
    "sessions": [
      {
        "pageTitle": "OpenReplay Blog",
        "sessionID": "6975518573799938",
        "metadata": {},
        "userID": "",
        "userUUID": "8998545b-553c-4f41-a39d-d7cba7fac2d1",
        "projectKey": "aYYaFHiagqdXKEmVlmvJ",
        "revID": "",
        "timestamp": 1656437966459,
        "trackerVersion": "3.5.11",
        "isSnippet": true,
        "userOs": "Mac OS",
        "userBrowser": "Chrome",
        "userBrowserVersion": "103.0.0.0",
        "userDevice": null,
        "userDeviceType": "desktop",
        "userCountry": "FR",
        "active": false,
        "live": true,
        "projectId": 3
      }
    ]
  }
}

Search in the list of live sessions for a particular project.

POST

/api/v1/:projectKey/assist/sessions

NameTypeDescription
projectKeystringThe ID of the project you’re tracking (required)
NameTypeDescription
sortstringThe sort attribute (default
)
orderstringThe sort order, can be “DESC” or “ASC” (default
)
pageintegerThe page number for pagination (default:1)
limitintegerThe number of sessions per page (default:200)
filtersarray of filterThe list of filters, check next table (default:[])

filter object:

NameTypeDescription
valuearray of case insensitive stringsThe list of values (default:[])
typecase insensitive stringThe filter attribute (required)
sourcecase insensitive stringThe metadata attribue name for type=metadata (default:"")
operatorcase sensitive stringThe operator to use for each value, can be “contains” or “is” (default:“contains”)

The search will look for the live-sessions that have an attribute name that contains the given type and have a value that contains 1 of the given value.

PS: if values=[]; the search will look for the live-sessions that have a given attribute.

For example if you are looking for sessions that have a specific metadata (any value):

{"value": [], "type": "METADATA", "source": "myMeta"}

Authorization: {YOUR_ORGANIZATION_API_KEY}: The key can be found in ‘Preferences’ > ‘Account’ > ‘Organization API Key’.

200: Response sent as JSON in body

The following example will look for the first 10 live-sessions (reverse sort by timestamp) that have a userId contains ‘openreplay’ and metadata.plan contains ‘trial’ or ‘free’.

curl -X POST \
  https://openreplay.example.com/api/v1/aYYaFHiagqdXKEmVlmvJ/assist/sessions \
  -H 'content-type: application/json' \
  -H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
  --data-raw '{
    "filters": [
        {
            "value": [
                "trial", "free"
            ],
            "type": "METADATA",
            "source": "plan",
            "operator": "is"
        },
        {
            "value": [
                "openreplay"
            ],
            "type": "USERID",
            "operator": "contains"
        }
    ],
    "sort": "timestamp",
    "order": "DESC",
    "limit": 10,
    "page": 1
   }'
{
  "data": {
    "total": 1,
    "sessions": [
      {
        "pageTitle": "OpenReplay Blog",
        "sessionID": "6975518573799185",
        "metadata": {
          "plan": "trial"
        },
        "userID": "dev@openreplay.com",
        "userUUID": "8998545b-553c-4f41-a39d-d7cba7fac2d1",
        "projectKey": "aYYaFHiagqdXKEmVlmvJ",
        "revID": "",
        "timestamp": 1656437966459,
        "trackerVersion": "3.5.11",
        "isSnippet": true,
        "userOs": "Mac OS",
        "userBrowser": "Chrome",
        "userBrowserVersion": "103.0.0.0",
        "userDevice": null,
        "userDeviceType": "desktop",
        "userCountry": "FR",
        "active": false,
        "live": true,
        "projectId": 3
      }
    ]
  }
}