API
From Wiki of WFilter NG Firewall
(Difference between revisions)
Line 79: | Line 79: | ||
= SDK Download = | = SDK Download = | ||
== php == | == php == | ||
− | Download URL: [[Media:WFilterNGF_SDK_php.zip|SDK for php]] | + | Download URL: [[Media:WFilterNGF_SDK_php.zip|WFilter SDK for php]] |
= Links = | = Links = | ||
* [http://blog.wfilterros.com/?p=520 API overview of WFilter NGF] | * [http://blog.wfilterros.com/?p=520 API overview of WFilter NGF] |
Revision as of 17:40, 19 July 2017
Contents |
1 Introduction
WFilter NGF has a built-in API library for developers to manipulate the entire system or integrate WFilter features. With APIs, you’re able to:
1. Monitor system/network status. 2. Monitor bandwidth and online users. 3. Set client access policy.
Available APIs are listed in below:
2 Network Status
2.1 List network interfaces
- Function: get_network_interfaces
- Parameter: none
- Return: JSON
- Result format
2.2 Get interface status and statistics
- Function: get_network_status
- Parameter: none
- Return: JSON
- Result format
3 Bandwidth and user status
3.1 Get bandwidth history of past N seconds
- Function: list_bandwidth
- Parameter: seconds
- Return: JSON
- Result format
3.2 List online users
- Function: list_online_users
- Parameters: return rows(max 1000), search string
- Return: JSON
- Result format
3.3 List online connections of a client
- Function: list_online_connections
- Parameter: IP address
- Return: JSON
- Result format
4 Get Basic Settings
4.1 List groups
- Function: list_group
- Parameter: none
- Return: JSON
- Result format
4.2 List WFilter accounts
- Function: list_account
- Parameter: none
- Return: JSON
- Result format
5 Set client access policy
5.1 Terminate connections(kick off user)
- Function: kill_connection
- Parameters:
- port : connection local port, 0 for all ports
- type: "ALL"-- all protocols, "RESET"-- reset to default, "REMOVE"-- bypass all blocking, others -- protocol name.
- minutes: blocking minutes
- message: message to be displayed(urlencoded)
- Return: TRUE or FALSE
5.2 Add IP into a virtual group
- Function: add_virtual_group
- Parameters:
- groupid: group ID
- ip: client IP
- minutes: stay in this group for N minutes
- Return: TRUE or FALSE
5.3 Remove IP from a virtual group
- Function: rm_virtual_group
- Paramter: IP
- Return: TRUE or FALSE
6 SDK Download
6.1 php
Download URL: WFilter SDK for php