-
Notifications
You must be signed in to change notification settings - Fork 0
Whitelist IP
sadhasivam edited this page Sep 10, 2024
·
1 revision
URL: /api/admin/whitelist/updateOrCreate
Method: POST
Description: Adds or updates a whitelist IP.
| Parameter | Type | Required/Optional | Description |
|---|---|---|---|
whitelist_host_ip |
String | Required | The IP address to be added to the whitelist. |
whitelist_host_comments |
String | Optional | Additional comments or notes about the whitelisted IP. |
id |
Integer | Optional | The ID of the whitelist entry to update. If not provided, a new entry will be created. |
{
"success": true,
"message": "WhiteList Ip has been Created",
"data": {
"whitelist_host_id": 1,
"whitelist_host_ip": "121.0.0.4.3",
"whitelist_host_comments": "add new whitelist",
"updated_at": "2024-09-10T05:10:02.000000Z",
"created_at": "2024-09-10T05:10:02.000000Z"
}
}URL: /api/admin/whitelist-edit/{id}
Method: GET
Description: Fetches details for editing a whitelist IP.
| Parameter | Type | Required/Optional | Description |
|---|---|---|---|
whitelist_host_id |
Integer | Required | The ID of the whitelist entry to be retrieved for editing. |
{
"success": true,
"message": "data",
"data": {
"host_data": {
"whitelist_host_id": 1,
"whitelist_host_ip": "121.0.0.4.4",
"whitelist_host_comments": "add new whitelist",
"created_at": "2024-09-10T05:10:02.000000Z",
"updated_at": "2024-09-10T05:10:23.000000Z"
}
}
}URL: /api/admin/delete-whitelist-ip
Method: POST
Description: Deletes a whitelist IP.
| Parameter | Type | Required/Optional | Description |
|---|---|---|---|
whitelist_host_id |
Integer | Required | The ID of the whitelist entry to be deleted. |
{
"success": true,
"message": "The record you have selected has been deleted successfully",
"data": 1
}URL: /api/admin/view-Whitelist
Method: GET
Description: Displays the list of whitelist IPs.
This endpoint does not require any parameters.
{
"success": true,
"message": "List of Whitelist API",
"data": [
{
"whitelist_host_id": 2,
"whitelist_host_date": "2024-09-10",
"whitelist_host_ip": "121.0.0.45",
"whitelist_host_comments": "test"
},
{
"whitelist_host_id": 1,
"whitelist_host_date": "2024-09-10",
"whitelist_host_ip": "121.0.0.4.4",
"whitelist_host_comments": "add new whitelist"
}
],
}