Connection History API

Retrieve detailed VPN connection history for a specific user including session data and termination causes

Devices

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

QUERY/graphql

Retrieve the connection history for a specific user, including detailed session information, IP addresses, and termination causes.

Authentication:Bearer Token
Required scopes:adminreseller

Request Parameters

userIdInt!Required

The 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

200History Retrieved Successfully
{
  "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"
      }
    ]
  }
}
404User Not Found
{
  "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).

nasPortIdString

Port identifier on the NAS.

nasPortTypeString

Type of connection port (e.g., Virtual, Ethernet).

startTimeDateTime!

Timestamp when the connection session started.

stopTimeDateTime

Timestamp when the connection session ended.

connectInfoStartString

Protocol used for the connection (e.g., WireGuard, OpenConnect).

callingStationIdString

MAC address or identifier of the connecting device.

terminateCauseString

Reason for session termination (e.g., User-Request, Session-Timeout).

framedIpAddressString

VPN 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.



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.

View Online Sessions