Returns a list of OpenVPN sessions by batches (up to 100 in a single request).
For example:
GET /api/beta/sessions?startDate=2022-10-25T00:00:00.000Z&endDate=2022-10-26T00:00:00.000Z&size=100&status=ACTIVE
Will return:
{ "sessions": [ .. ], "nextCursor: "63527ce1d8e5811243db4902" }
If nextCursor
is not empty, then it should be passed in the subsequent request to retrieve the next 100 sessions:
GET /api/beta/sessions?startDate=2022-10-25T00:00:00.000Z&endDate=2022-10-26T00:00:00.000Z&size=100&status=ACTIVE&cursor=63527ce1d8e5811243db4902
When nextCursor
is missing in the response, then there are no more sessions.
If you encounter rate-limit issues, retry after 1 minute. If the issue persists, please open a Support Ticket.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
cursor | query | string | false | An opaque string value that represents a cursor pointer for the next batch of sessions. |
endDate | query | string(date-time) | false | Filter sessions by created or updated before this date (exclusive). |
returnOnlyNew | query | boolean | false |
|
size | query | integer(int32) | true | Session count to return in one batch min = 1 max = 100. |
startDate | query | string(date-time) | false | Filter sessions by created or updated after this date (inclusive). |
status | query | string | false | Filter by session status. |
Detailed descriptions
endDate: Filter sessions by created or updated before this date (exclusive).
Notes:
* Should use ISO_INSTANT
format, e.g. 2022-11-08T14:53:43Z
.
returnOnlyNew: Notes:
* If true, returns only new sessions created between specified dates (no duplicates).
* If false, returns updated sessions between specified dates (duplicates may be returned in subsequent requests).
size: Session count to return in one batch min = 1 max = 100.
startDate: Filter sessions by created or updated after this date (inclusive).
Notes:
* Max 7 days of history available.
* If value is before (now - 7 days), an error will be returned.
* Should use ISO_INSTANT
format, e.g. 2022-11-08T14:53:43Z
.
* Should be less than endDate, otherwise no sessions will be returned.
Default value : now - 1 day
Enumerated Values
Parameter | Value |
---|---|
status | ACTIVE |
status | COMPLETED |
status | FAILED |
Responses
Status | Meaning | Description |
---|---|---|
200 | OK | |
400 | Bad Request | |
401 | Unauthorized | |
403 | Access Forbidden | |
404 | Not Found | |
406 | Not Acceptable | |
429 | Too Many Requests | |
500 | Internal Server Error |
{ "nextCursor": "string", "sessions": [ { "bytesIn": 0, "bytesOut": 0, "clientUUID": "string", "connectorId": "string", "connectorName": "string", "deviceId": "string", "deviceName": "string", "disconnectReason": "string", "email": "string", "firstName": "string", "hostId": "string", "hostName": "string", "id": "string", "lastName": "string", "networkId": "string", "networkName": "string", "osType": "string", "osVersion": "string", "protocol": "string", "publicIp": "string", "region": "string", "sessionDurationSeconds": 0, "sessionEndTime": "2023-07-21T14:49:53.940Z", "sessionStartTime": "2023-07-21T14:49:53.940Z", "status": "string", "tunnelIpV4": "string", "tunnelIpV6": "string", "userGroup": "string", "userId": "string", "userName": "string" } ] }
To perform this operation, you must be authenticated by means of one of the following methods: OAuth_authorization