Connection History API
Retrieve detailed VPN connection history for a specific user including session data and termination causes
Connection History API
Access complete connection history for any user. Track session details, connection times, IP addresses, and termination causes for comprehensive audit trails.
Full History
Complete session records.
Time Tracking
Start and stop timestamps.
Audit Trail
Detailed session logging.
Endpoint Overview
/graphqlRetrieve the connection history for a specific user, including detailed session information, IP addresses, and termination causes.
Request Parameters
userIdInt!RequiredThe unique identifier of the user to retrieve connection history for.
GraphQL Query
query getConnectionHistory($userId: Int!) {
getConnectionHistory(userId: $userId) {
id
sessionId
nasIpAddress
nasPortId
nasPortType
startTime
stopTime
connectInfoStart
callingStationId
terminateCause
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 getConnectionHistory($userId: Int!) { getConnectionHistory(userId: $userId) { id sessionId nasIpAddress startTime stopTime terminateCause framedIpAddress } }",
"variables": {
"userId": 12345
}
}'Response
{
"data": {
"getConnectionHistory": [
{
"id": "98765",
"sessionId": "sess_abc123def456",
"nasIpAddress": "192.168.1.100",
"nasPortId": "1001",
"nasPortType": "Virtual",
"startTime": "2024-01-15T10:30:00Z",
"stopTime": "2024-01-15T14:45:00Z",
"connectInfoStart": "WireGuard",
"callingStationId": "AA:BB:CC:DD:EE:FF",
"terminateCause": "User-Request",
"framedIpAddress": "10.0.0.50"
},
{
"id": "98764",
"sessionId": "sess_xyz789ghi012",
"nasIpAddress": "192.168.1.101",
"nasPortId": "1002",
"nasPortType": "Virtual",
"startTime": "2024-01-14T08:00:00Z",
"stopTime": "2024-01-14T18:30:00Z",
"connectInfoStart": "OpenConnect",
"callingStationId": "AA:BB:CC:DD:EE:FF",
"terminateCause": "Session-Timeout",
"framedIpAddress": "10.0.0.51"
}
]
}
}{
"errors": [
{
"message": "User not found",
"path": ["getConnectionHistory"],
"extensions": {
"code": "USER_NOT_FOUND"
}
}
],
"data": null
}Response Fields
idID!Unique identifier for the connection record.
sessionIdString!RADIUS session identifier for the connection.
nasIpAddressString!IP address of the Network Access Server (VPN server).
nasPortIdStringPort identifier on the NAS.
nasPortTypeStringType of connection port (e.g., Virtual, Ethernet).
startTimeDateTime!Timestamp when the connection session started.
stopTimeDateTimeTimestamp when the connection session ended.
connectInfoStartStringProtocol used for the connection (e.g., WireGuard, OpenConnect).
callingStationIdStringMAC address or identifier of the connecting device.
terminateCauseStringReason for session termination (e.g., User-Request, Session-Timeout).
framedIpAddressStringVPN IP address assigned to the user during the session.
Termination Causes
User-Request
User manually disconnected.
Session-Timeout
Session exceeded time limit.
Admin-Reset
Administrator terminated session.
Lost-Carrier
Connection lost unexpectedly.
Related Endpoints
Audit & Compliance
Connection history records are retained for compliance and troubleshooting purposes. Use this data to investigate connection issues or verify user activity.
Monitor Live Sessions
Track currently active connections in real-time.