Skip to content

User - RADIUS

Base URL: https://your-domain.com

Admin endpoints for RADIUS session management and monitoring. All endpoints require admin/staff authentication.


Online Sessions

Retrieve all currently active RADIUS sessions.

PropertyValue
EndpointOnline Sessions
MethodGET
URL/api/v1/radius/online-sessions
AuthenticationBearer Token

Request Headers:

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer your-auth-tokenYes

Success Response (200 OK):

json
{
    "success": true,
    "data": [
        {
            "username": "subscriber001",
            "nas_ip": "192.168.1.1",
            "framed_ip": "10.0.0.5",
            "session_time": 3600,
            "input_octets": 1048576,
            "output_octets": 5242880,
            "start_time": "2024-01-15 09:30:00"
        }
    ],
    "total": 250
}

Session History

Retrieve session history for a specific subscriber.

PropertyValue
EndpointSession History
MethodGET
URL/api/v1/radius/session-history
AuthenticationBearer Token

Query Parameters:

ParameterTypeRequiredDescription
usernamestringYesSubscriber username
from_datedateNoStart date filter
to_datedateNoEnd date filter

Success Response (200 OK):

json
{
    "success": true,
    "data": [
        {
            "session_id": "abc123",
            "start_time": "2024-01-15 09:30:00",
            "stop_time": "2024-01-15 10:30:00",
            "session_time": 3600,
            "input_octets": 1048576,
            "output_octets": 5242880,
            "terminate_cause": "User-Request"
        }
    ]
}

Get Subscriber Radcheck

Retrieve radcheck attributes for a subscriber.

PropertyValue
EndpointGet Radcheck
MethodGET
URL/api/v1/radius/radcheck/{username}
AuthenticationBearer Token

Success Response (200 OK):

json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "attribute": "Cleartext-Password",
            "op": ":=",
            "value": "***hidden***"
        }
    ]
}

Get Subscriber Radreply

Retrieve radreply attributes for a subscriber.

PropertyValue
EndpointGet Radreply
MethodGET
URL/api/v1/radius/radreply/{username}
AuthenticationBearer Token

Success Response (200 OK):

json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "attribute": "Framed-IP-Address",
            "op": ":=",
            "value": "10.0.0.5"
        }
    ]
}

Get Subscriber Radusergroup

Retrieve group membership for a subscriber.

PropertyValue
EndpointGet Radusergroup
MethodGET
URL/api/v1/radius/radusergroup/{username}
AuthenticationBearer Token

Success Response (200 OK):

json
{
    "success": true,
    "data": [
        {
            "groupname": "10MB-Package",
            "priority": 1
        }
    ]
}

Get Usage Stats

Retrieve bandwidth usage statistics for a subscriber.

PropertyValue
EndpointGet Usage Stats
MethodGET
URL/api/v1/radius/usage-stats/{username}
AuthenticationBearer Token

Success Response (200 OK):

json
{
    "success": true,
    "data": {
        "total_download": "15.5 GB",
        "total_upload": "2.3 GB",
        "total_sessions": 45,
        "total_session_time": "120 hours",
        "current_month_download": "5.2 GB",
        "current_month_upload": "800 MB"
    }
}

Disconnect Session

Force disconnect an active RADIUS session.

PropertyValue
EndpointDisconnect Session
MethodPOST
URL/api/v1/radius/disconnect
AuthenticationBearer Token

Request Body:

json
{
    "isp_id": 1,
    "branch_id": 1,
    "user_id": 1,
    "username": "subscriber001"
}
ParameterTypeRequiredDescription
usernamestringYesSubscriber username to disconnect

Success Response (200 OK):

json
{
    "success": true,
    "message": "Session disconnected successfully"
}

Error Response (404 Not Found):

json
{
    "success": false,
    "message": "No active session found"
}

www.onezeroart.com