Aaa Accounting
Retrieve and view AAA (Authentication, Authorization, and Accounting) accounting records for network access sessions.
Base URL: https://gate.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Endpoints
GET /aaa_accounting/
Retrieves a paginated list of AAA accounting records with optional filtering by date range, user, access point, location, client, and session status.
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| start_date | string | query | No | Filter by start datetime in ISO format (2000-01-01, 2000-01-01 00:01:00, 2000-01-01 00:01:00+00:00) |
| end_date | string | query | No | Filter by end datetime in ISO format (2000-01-01, 2000-01-01 00:01:00, 2000-01-01 00:01:00+00:00) |
| user | integer | query | No | Filter by username field (user ID) |
| access_point | integer | query | No | Filter by access point ID |
| location | integer | query | No | Filter by location ID |
| client | integer | query | No | Filter by client ID |
| cursor | string | query | No | Pagination cursor for retrieving next page of results |
| limit | integer | query | No | Number of results to return per page (default varies) |
| session_status | string | query | No | Filter by session active status |
Example Request:
GET /api/v1/aaa_accounting/?start_date=2024-01-01&limit=50&session_status=active
Example Response:
{
"count": 234,
"next": "https://gate.zequenze.com/api/v1/aaa_accounting/?cursor=eyJpZCI6MTIzfQ%3D%3D",
"previous": null,
"results": [
{
"radacctid": 12345,
"username": "john.doe",
"access_point": 101,
"location": 5,
"client": 25,
"session_id": "abc123def456",
"start_time": "2024-01-01T09:30:00Z",
"end_time": "2024-01-01T17:45:00Z",
"session_duration": 29700,
"bytes_sent": 1048576,
"bytes_received": 5242880,
"session_status": "completed",
"nas_ip_address": "192.168.1.10"
}
]
}
| Status | Description |
|---|---|
| 200 | Success - Returns paginated list of accounting records |
| 401 | Unauthorized - Invalid or missing Bearer token |
GET /aaa_accounting/{radacctid}/
Retrieves detailed information for a specific AAA accounting record by its RADIUS accounting ID.
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| radacctid | integer | path | Yes | The unique RADIUS accounting ID of the record to retrieve |
Example Request:
GET /api/v1/aaa_accounting/12345/
Example Response:
{
"radacctid": 12345,
"username": "john.doe",
"access_point": 101,
"location": 5,
"client": 25,
"session_id": "abc123def456",
"start_time": "2024-01-01T09:30:00Z",
"end_time": "2024-01-01T17:45:00Z",
"session_duration": 29700,
"bytes_sent": 1048576,
"bytes_received": 5242880,
"packets_sent": 2048,
"packets_received": 8192,
"session_status": "completed",
"nas_ip_address": "192.168.1.10",
"nas_port": "wireless-1",
"calling_station_id": "aa:bb:cc:dd:ee:ff",
"called_station_id": "00:11:22:33:44:55:SSID-Guest",
"terminate_cause": "User-Request"
}
| Status | Description |
|---|---|
| 200 | Success - Returns detailed accounting record |
| 401 | Unauthorized - Invalid or missing Bearer token |
| 404 | Not Found - Accounting record with specified radacctid does not exist |
Best Practices
- Use date filters to limit large result sets and improve response times
- Implement pagination using the
cursorparameter for efficient browsing of large datasets - Set appropriate
limitvalues based on your application's needs to balance performance and usability - Cache frequently accessed accounting records to reduce API calls
- Use specific filters (user, access_point, location, client) to narrow down results for targeted analysis
- Handle timezone considerations when working with datetime fields - all times are returned in UTC
- Monitor session status for real-time network access tracking and troubleshooting