Live Lens API (1.1.0)
- Navigate to the Rescue Live Admin Center
- Select Admin API from the menu on the bottom left side
- Click the Generate API key button
- Add name and select Reporting API. This name helps you to identify the API key later.
- Copy and store the generated API key
- Go to the Admin API page
- Click the Revoke API Key button or the trash icon if the API key is expired.
The Live Lens Reporting GraphQL API allows users to query sessions.
To use this API, the authenticated user must have an API key for the authorization. This feature does not work with IdSrv2 (see details below) provided tokens.
Execute GraphQL query
Examples
To query sessions between two timestamps, use the sessions query with the start
and end
arguments (seconds since UNIX epoch):
curl -X "POST" "https://reporting.console.logmeinrescue.com" \
-H 'Authorization: {api-key}' \
-H 'Content-Type: application/json' \
-d '{"query":"{sessions(start: 1713330000, end: 1713335492) { id pin started ended duration sessionType recordingUrl agent { id name email } } }"}'
To get a specific session, use the session query with the id
argument:
curl -X "POST" "https://reporting.console.logmeinrescue.com" \
-H 'Authorization: {api-key}' \
-H 'Content-Type: application/json' \
-d '{"query":"{session(id: \"9ce63d28-b935-464d-8420-ce95fb803c7f\") {id pin started ended duration sessionType recordingUrl agent { id name email } } }"}'
Request Body schema: application/json
GraphQL query
query required | string GraphQL operation to invoke |
variables | object Values of the variables used in graphQL query. |
Responses
Response Schema: application/json
Array of objects (Error) | |
required | object |
Request samples
- Payload
- Node + Axios
- Shell + Curl
- Python + Python3
- Php + Http2
- Ruby + Native
{- "query": "string",
- "variables": { }
}
Response samples
- 200
{- "errors": [
- {
- "message": "Failed to execute query"
}
], - "data": {
- "session": {
- "id": "716d0803-b6d8-4f3b-8abd-cf14581cf9cb",
- "companyId": "7427502502870536406",
- "pin": "225583087",
- "started": 1670264061,
- "ended": 1670264110,
- "duration": 49,
- "sessionType": "LiveGuide",
- "recording": true,
- "agent": {
- "id": "5033729290277940364",
- "name": "First Last",
- "email": "name@company.com"
}, - "agentGroupId": 0,
- "agentIp": "string",
- "customerIp": "string",
- "externalFields": {
- "customerName": "First Last",
- "externalCaseId": "string",
- "notes": "string",
- "accountingInfo": "string",
- "customerDeviceType": "string",
- "customerOs": "string"
}
}
}
}
Rescue Live session endpoints support authentication using Rescue's OAuth2 identity provider, IdSrv2. See the list of supported endpoints below.
All required information on the workings and usage of IdSrv2 may be found here.
Wherever this document refers to the IdSrv2 documentation, use this link to access the required information.
To use Rescue Live's session endpoints with IdSrv2 issued tokens, you must request tokens using the authorization code flow (or subsequent refresh token flow) and the weblens;settings scope.
You may provide tokens for the session endpoints using the Authorization HTTP header and Bearer scheme.
Example Authorization header: Bearer eyJhb...DUx-g
All relevant information about the access tokens may be found in IdSrv2's documentation.
Example call to start a new LiveLens session using an IdSrv2 issues access token:
curl --location 'https://console.logmeinrescue.com/api/v2/session/LiveLens' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhb...DUx-g' \
--data '{
"CustomerName": "Customer"
}'
Note: this feature is most likely not required for your needs, you may still use the API with IdSrv2 issued tokens without doing this.
To log in to Rescue live using IdSrv2 you have to append the auth_type=OAuth_v2 URL query parameter to the login URL.
Example: https://console.logmeinrescue.com?auth_type=OAuth_v2
/api/v2/Session/LiveLens
Request Body schema:
sourceApp | string or null |
customerName | string or null |
agentEmail | string or null |
Array of objects or null (SessionWebhook) |
Responses
Response Schema:
agentUrl | string or null |
clientUrl | string or null |
Request samples
- Payload
- Node + Axios
- Shell + Curl
- Python + Python3
- Php + Http2
- Ruby + Native
{- "sourceApp": "string",
- "customerName": "string",
- "agentEmail": "string",
- "webhooks": [
- {
- "targetUrl": "string",
- "authorizationToken": "string",
- "type": 1
}
]
}
Response samples
- 201
{- "agentUrl": "string",
- "clientUrl": "string"
}
/api/v1/Session Deprecated
Request Body schema:
customerName | string or null |
sourceApp | string or null |
agentEmail | string or null |
sessionType | integer <int32> (SessionType) Enum: 0 1 2 3 4
|
Array of objects or null (SessionWebhook) |
Responses
Response Schema:
customerName | string or null |
sourceApp | string or null |
agentEmail | string or null |
sessionType | integer <int32> (SessionType) Enum: 0 1 2 3 4
|
Array of objects or null (SessionWebhook) |
Request samples
- Payload
- Node + Axios
- Shell + Curl
- Python + Python3
- Php + Http2
- Ruby + Native
{- "customerName": "string",
- "sourceApp": "string",
- "agentEmail": "string",
- "sessionType": 0,
- "webhooks": [
- {
- "targetUrl": "string",
- "authorizationToken": "string",
- "type": 1
}
]
}
Response samples
- 201
{- "customerName": "string",
- "sourceApp": "string",
- "agentEmail": "string",
- "sessionType": 0,
- "webhooks": [
- {
- "targetUrl": "string",
- "authorizationToken": "string",
- "type": 1
}
]
}
/api/v2/Session
Request Body schema:
sessionId | string <uuid> |
endSource | string or null |
showWrapup | boolean |
Responses
Request samples
- Payload
- Node + Axios
- Shell + Curl
- Python + Python3
- Php + Http2
- Ruby + Native
{- "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459",
- "endSource": "string",
- "showWrapup": true
}