Connection History API
POST /getConnectionHistory
Description
This API endpoint retrieves the connection history for a specific user, including detailed session information.
Request Body
The request uses GraphQL to perform the getConnectionHistory
query.
Query:
query getConnectionHistory ($userId: Int!) {
getConnectionHistory (userId: $userId) {
id
sessionId
nasIpAddress
nasPortId
nasPortType
startTime
stopTime
connectInfoStart
callingStationId
terminateCause
framedIpAddress
}
}
GraphQL Variables:
{
"userId": 0
}
Example Request:
curl --location '' \
--header 'Content-Type: application/json' \
--data '{"query":"query getConnectionHistory ($userId: Int!) {\n getConnectionHistory (userId: $userId) {\n id\n sessionId\n nasIpAddress\n nasPortId\n nasPortType\n startTime\n stopTime\n connectInfoStart\n callingStationId\n terminateCause\n framedIpAddress\n }\n}","variables":{"userId":0}}'
Response:
-
Success (200 OK):
- The response includes a list of connection history records for the specified user.
{
"data": {
"getConnectionHistory": [
{
"id": 1,
"sessionId": "sess123",
"nasIpAddress": "192.168.1.1",
"nasPortId": "port1",
"nasPortType": "ethernet",
"startTime": "2024-08-11T12:00:00Z",
"stopTime": "2024-08-11T12:30:00Z",
"connectInfoStart": "connection start info",
"callingStationId": "station123",
"terminateCause": "user request",
"framedIpAddress": "192.168.1.100"
}
]
}
}- Fields:
id
: Unique identifier for the connection record.sessionId
: Identifier for the session.nasIpAddress
: IP address of the Network Access Server (NAS).nasPortId
: Identifier for the NAS port.nasPortType
: Type of the NAS port.startTime
: Timestamp when the connection started.stopTime
: Timestamp when the connection ended.connectInfoStart
: Information at the start of the connection.callingStationId
: Identifier for the calling station.terminateCause
: Reason for connection termination.framedIpAddress
: IP address assigned to the session.
-
Error (4XX/5XX):
- If there is an issue with the request or if there is a server error, the response will include an error message and status code.
Parameters:
- userId (Int): The unique identifier of the user for whom the connection history is being retrieved.
Note:
This endpoint provides detailed information about connection sessions for a specific user, useful for tracking and auditing purposes. Ensure that you provide a valid userId
to retrieve the relevant connection history records.