API Endpoints
Complete reference documentation for all IronWifi REST API endpoints. Use these endpoints to programmatically manage users, configure networks, generate vouchers, retrieve analytics reports, and integrate IronWifi with your existing systems.
tip
For interactive documentation with request/response examples, visit api.ironwifi.com
Users
List Users
GET /api/users
Response:
[
{
"id": 12345,
"username": "john.doe",
"email": "john@example.com",
"fullname": "John Doe",
"status": "enabled",
"created": "2024-01-15T10:30:00Z"
}
]
Get User
GET /api/users/{user_id}
Create User
POST /api/users
Body:
{
"username": "john.doe",
"email": "john@example.com",
"fullname": "John Doe"
}
Update User
PUT /api/users/{user_id}
Delete User
DELETE /api/users/{user_id}
Attributes
List User Attributes
GET /api/attributes?userid={user_id}&table=radcheck
Parameters:
userid- User IDtable-radcheckorradreply
Create Attribute
POST /api/attributes
Body:
{
"userid": 12345,
"attribute": "Cleartext-Password",
"operator": ":=",
"value": "password123",
"table": "radcheck"
}
Delete Attribute
DELETE /api/attributes/{attribute_id}?table=radcheck
Groups
List Groups
GET /api/groups
Create Group
POST /api/groups
Body:
{
"name": "Premium Users",
"description": "High bandwidth users"
}
Add User to Group
POST /api/groups/{group_id}/users
Body:
{
"userid": 12345,
"priority": 1
}
Networks
List Networks
GET /api/networks
Get Network Details
GET /api/networks/{network_id}
Captive Portals
List Portals
GET /api/captiveportals
Get Portal Details
GET /api/captiveportals/{portal_id}
Vouchers
List Vouchers
GET /api/vouchers
Create Voucher
POST /api/vouchers
Body:
{
"validity": 86400,
"usage_limit": 1,
"session_timeout": 3600
}
Generate Batch
POST /api/vouchers/batch
Body:
{
"quantity": 100,
"prefix": "GUEST",
"validity": 86400
}
Reports
Get Report Data (Sync)
For recent data (up to 4 hours):
GET /api/reports/{report_id}?earliest=-4h&latest=now&page=1
Get Report Data (Async)
For larger date ranges:
GET /api/reports/{report_id}?earliest=-1d@d&format=csvfile&latest=now
Response:
{
"task_name": "report_abc123"
}
Retrieve Async Report
GET /api/reports/tasks?task_name={task_name}&format=csvfile
Report IDs
| ID | Report |
|---|---|
| 110 | Authentication requests |
| 115 | User data |
| 120 | Session data |
Common Parameters
Pagination
GET /api/users?page=1&limit=50
Filtering
GET /api/users?status=enabled
GET /api/users?search=john
Date Ranges
earliest=-24h # Last 24 hours
earliest=-1d@d # Since start of yesterday
earliest=2024-01-01 # Specific date
latest=now # Up to now
Response Formats
Success
{
"id": 12345,
"username": "john.doe",
...
}
Error
{
"error": true,
"message": "User not found",
"code": 404
}
List
{
"data": [...],
"page": 1,
"total": 150,
"limit": 50
}
Rate Limits
- 100 requests/minute per API key
- 429 response when exceeded
- Retry-After header indicates wait time
Webhooks
Configure webhooks in the Console to receive push notifications for events.
Webhook Payload
{
"event": "user.authenticated",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"user_id": 12345,
"username": "john.doe",
"ap_mac": "AA:BB:CC:DD:EE:FF"
}
}