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 a subscriber's live PPPoE / Hotspot session. Issues a real RADIUS Packet-of-Disconnect (CoA) to the NAS — not just a DB-level mark.
Updated in v2.22.26
The endpoint now sends a real CoA via RadiusServices so the subscriber is actually dropped on the NAS, not only flagged in radacct. The input contract is also updated: pass subscriber_id (preferred) or session_id.
| Property | Value |
|---|---|
| Endpoint | Disconnect Session |
| Method | POST |
| URL | /api/v1/radius/disconnect |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Content-Type | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 5,
"subscriber_id": 42
}| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | Action-by user ID (admin/staff) |
subscriber_id | integer | Conditional | Required if session_id is not provided |
session_id | string | Conditional | RADIUS acctsessionid. Required if subscriber_id is not provided |
Success Response (200 OK):
json
{
"status": "success",
"message": "Disconnect request sent successfully.",
"data": {
"subscriber_id": 42,
"username": "subscriber001"
}
}Error Responses:
json
// 404 Not Found — subscriber or active session not found
{
"status": "error",
"message": "Subscriber not found."
}json
// 409 Conflict — subscriber is not currently online
{
"status": "error",
"message": "Subscriber Not Online!"
}json
// 422 Validation Error — neither subscriber_id nor session_id supplied
{
"status": "error",
"message": ["The subscriber id field is required when session id is not present."]
}