Online Sessions API
Retrieve all currently active VPN sessions for a specific user in real-time
Online Sessions API
Monitor active VPN sessions in real-time. Track currently connected sessions with detailed connection information for any user.
Live Sessions
Real-time active connections.
Connection Status
Monitor session health.
Location Data
Server and IP information.
Endpoint Overview
/graphqlRetrieve all currently active VPN sessions for a specific user, including connection details and server information.
Request Parameters
userIdInt!RequiredThe unique identifier of the user to retrieve online sessions for.
GraphQL Query
query getOnlineSessions($userId: Int!) {
getOnlineSessions(userId: $userId) {
id
sessionId
nasIpAddress
nasPortId
nasPortType
startTime
connectInfoStart
callingStationId
framedIpAddress
}
}Variables:
{
"userId": 12345
}HTTP Request:
curl -X POST https://api.orbnet.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"query": "query getOnlineSessions($userId: Int!) { getOnlineSessions(userId: $userId) { id sessionId nasIpAddress startTime framedIpAddress connectInfoStart } }",
"variables": {
"userId": 12345
}
}'Response
{
"data": {
"getOnlineSessions": [
{
"id": "active_001",
"sessionId": "sess_live_abc123",
"nasIpAddress": "192.168.1.100",
"nasPortId": "1001",
"nasPortType": "Virtual",
"startTime": "2024-01-15T10:30:00Z",
"connectInfoStart": "WireGuard",
"callingStationId": "AA:BB:CC:DD:EE:FF",
"framedIpAddress": "10.0.0.50"
},
{
"id": "active_002",
"sessionId": "sess_live_def456",
"nasIpAddress": "192.168.1.101",
"nasPortId": "1002",
"nasPortType": "Virtual",
"startTime": "2024-01-15T12:00:00Z",
"connectInfoStart": "OpenConnect",
"callingStationId": "11:22:33:44:55:66",
"framedIpAddress": "10.0.0.51"
}
]
}
}{
"data": {
"getOnlineSessions": []
}
}Response Fields
idID!Unique identifier for the active session.
sessionIdString!RADIUS session identifier.
nasIpAddressString!IP address of the VPN server handling the connection.
nasPortIdStringPort identifier on the Network Access Server.
nasPortTypeStringType of connection (typically "Virtual" for VPN).
startTimeDateTime!Timestamp when the session started.
connectInfoStartStringVPN protocol being used (WireGuard, OpenConnect, etc.).
callingStationIdStringMAC address or device identifier.
framedIpAddressStringVPN IP address assigned to this session.
Use Cases
User Support
Verify if a user is currently connected.
Session Management
Identify sessions for disconnection.
Concurrent Limits
Check device count against limits.
Real-time Monitoring
Build live connection dashboards.
Related Endpoints
Live Data
Online sessions are queried in real-time from the RADIUS server. Results reflect the current connection state at the moment of the query.
Force Disconnect
Need to terminate a session? Disconnect users by session ID.