Appearance
User - IP Pools
Base URL:
https://your-domain.com
Admin endpoints for managing IP address pools. All endpoints require admin/staff authentication.
Fetch All IP Pools
Retrieve all IP pools configured in the system.
| Property | Value |
|---|---|
| Endpoint | Fetch All IP Pools |
| Method | GET |
| URL | /api/v1/ip-pools |
| 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": [
{
"id": 1,
"name": "Pool-A",
"start_ip": "192.168.1.1",
"end_ip": "192.168.1.254",
"total_ips": 254,
"used_ips": 150,
"available_ips": 104
}
]
}Fetch IP Pool
Retrieve details of a specific IP pool.
| Property | Value |
|---|---|
| Endpoint | Fetch IP Pool |
| Method | GET |
| URL | /api/v1/ip-pools/{id} |
| Authentication | Bearer Token |
Success Response (200 OK):
json
{
"success": true,
"data": {
"id": 1,
"name": "Pool-A",
"start_ip": "192.168.1.1",
"end_ip": "192.168.1.254",
"total_ips": 254,
"used_ips": 150,
"available_ips": 104
}
}Create IP Pool
Create a new IP address pool.
| Property | Value |
|---|---|
| Endpoint | Create IP Pool |
| Method | POST |
| URL | /api/v1/ip-pools |
| Authentication | Bearer Token |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"name": "Pool-A",
"start_ip": "192.168.1.1",
"end_ip": "192.168.1.254"
}| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Pool name |
start_ip | string | Yes | Starting IP address |
end_ip | string | Yes | Ending IP address |
Success Response (201 Created):
json
{
"success": true,
"message": "IP Pool created successfully",
"data": {
"id": 1
}
}Update IP Pool
Update an existing IP pool.
| Property | Value |
|---|---|
| Endpoint | Update IP Pool |
| Method | PUT |
| URL | /api/v1/ip-pools/{id} |
| Authentication | Bearer Token |
Request Body:
json
{
"name": "Pool-Updated"
}Success Response (200 OK):
json
{
"success": true,
"message": "IP Pool updated successfully"
}Delete IP Pool
Delete an IP pool from the system.
| Property | Value |
|---|---|
| Endpoint | Delete IP Pool |
| Method | DELETE |
| URL | /api/v1/ip-pools/{id} |
| Authentication | Bearer Token |
Success Response (200 OK):
json
{
"success": true,
"message": "IP Pool deleted successfully"
}Generate IPs
Generate individual IP addresses from the pool range.
| Property | Value |
|---|---|
| Endpoint | Generate IPs |
| Method | POST |
| URL | /api/v1/ip-pools/{id}/generate |
| Authentication | Bearer Token |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1
}Success Response (200 OK):
json
{
"success": true,
"message": "IPs generated successfully",
"data": {
"generated": 254
}
}