Appearance
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.
| Property | Value |
|---|---|
| Endpoint | Online Sessions |
| Method | GET |
| URL | /api/v1/radius/online-sessions |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
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.
| Property | Value |
|---|---|
| Endpoint | Session History |
| Method | GET |
| URL | /api/v1/radius/session-history |
| Authentication | Bearer Token |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Subscriber username |
from_date | date | No | Start date filter |
to_date | date | No | End 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.
| Property | Value |
|---|---|
| Endpoint | Get Radcheck |
| Method | GET |
| URL | /api/v1/radius/radcheck/{username} |
| Authentication | Bearer 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.
| Property | Value |
|---|---|
| Endpoint | Get Radreply |
| Method | GET |
| URL | /api/v1/radius/radreply/{username} |
| Authentication | Bearer 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.
| Property | Value |
|---|---|
| Endpoint | Get Radusergroup |
| Method | GET |
| URL | /api/v1/radius/radusergroup/{username} |
| Authentication | Bearer Token |
Success Response (200 OK):
json
{
"success": true,
"data": [
{
"groupname": "10MB-Package",
"priority": 1
}
]
}Get Usage Stats
Retrieve bandwidth usage statistics for a subscriber.
| Property | Value |
|---|---|
| Endpoint | Get Usage Stats |
| Method | GET |
| URL | /api/v1/radius/usage-stats/{username} |
| Authentication | Bearer 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.
| Property | Value |
|---|---|
| Endpoint | Disconnect Session |
| Method | POST |
| URL | /api/v1/radius/disconnect |
| Authentication | Bearer Token |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"username": "subscriber001"
}| Parameter | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Subscriber 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"
}