Skip to content

Banned IP

sadhasivam edited this page Sep 10, 2024 · 1 revision

Add Banned Host

URL: /api/admin/bannedHosts/add

Method: POST

Description: Adds a new banned host.

Parameters

Parameter Type Required/Optional Description
api_key_secret String Required The API key secret used for authentication.
banned_host_ip String Required The IP address to be banned.
banned_host_comments String Optional Comments or notes related to the banned IP.
banned_host_blocks Integer Optional Number of times the IP has been blocked.
banned_host_last_block_date DateTime Optional The date and time of the last block for the IP.

Response

{
    "success": true,
    "message": "A new Banned Host has been added from Auto Faveo Licenser",
    "data": {
        "banned_host_ip": "121.0.0.2",
        "banned_host_comments": "remove the ip",
        "banned_host_date": "24-09-10",
        "banned_host_blocks": 1,
        "banned_host_last_block_date": "2024-09-10T05:01:22.860561Z",
        "banned_host_id": 6
    }
}

Delete Banned Host

URL: /api/admin/bannedHosts/delete

Method: POST

Description: Deletes a banned host.

Parameters

Parameter Type Required/Optional Description
api_key_secret String Required The API key secret used for authentication.
banned_host_id Integer Required The ID of the banned host to be removed.

Response

{
    "success": true,
    "message": "The record you have selected has been deleted successfully",
    "data": 1
}

Edit Banned Host

URL: /api/admin/bannedHosts/edit

Method: POST

Description: Updates details of a banned host.

Parameters

Parameter Type Required/Optional Description
banned_host_id Integer Required The ID of the banned host to be updated.
api_key_secret String Required The API key secret used for authentication.
banned_host_ip String Required The IP address of the banned host.
banned_host_comments String Optional Additional comments related to the banned host.

Response

{
    "success": true,
    "message": "Banned Host details of Auto Faveo Licenser has been updated",
    "data": 1
}

View Banned Hosts

URL: /api/admin/viewBannedHost

Method: GET

Description: Displays the list of banned hosts.

Parameters

This endpoint does not require any parameters.

Response

{
    "success": true,
    "message": "All the Details of the banned host's registered so far are displayed",
     "data": [
            {
                "banned_host_id": 6,
                "banned_host_ip": "121.0.0.2",
                "banned_host_comments": "remove the ip",
                "banned_host_date": "2024-09-10",
                "banned_host_blocks": 1,
                "banned_host_last_block_date": "2024-09-10",
                "created_at": null,
                "updated_at": null
            },
            {
                "banned_host_id": 7,
                "banned_host_ip": "121.0.0.3",
                "banned_host_comments": "hacking attempt",
                "banned_host_date": "2024-09-10",
                "banned_host_blocks": 1,
                "banned_host_last_block_date": "2024-09-10",
                "created_at": null,
                "updated_at": null
            },
        ],
}

View Banned Host Details

URL: /api/admin/viewBannedHost/{banned_host_id}

Method: GET

Description: Displays details of a specific banned host.

Parameters

Parameter Type Required/Optional Description
banned_host_id Integer Required The ID of the banned host to retrieve.

Response

{
    "success": true,
    "data": {
        "banned_host_data": {
            "banned_host_id": 6,
            "banned_host_ip": "121.0.0.2",
            "banned_host_comments": "remove the ip",
            "banned_host_date": "2024-09-10",
            "banned_host_blocks": 1,
            "banned_host_last_block_date": "2024-09-10",
            "created_at": null,
            "updated_at": null
        }
    }
}

Clone this wiki locally