JSON-RPC:Server ban

The server_ban.* JSON RPC calls can add, remove and list server bans such as KLINE, GLINE, etc.

= Structure of a server ban = The following object is used in both request and responses.

NOTE: Spamfilters are not changed through the  API but via spamfilter.*.

= API Calls =

server_ban.list
List server bans (*LINEs).

Request arguments
No mandatory arguments at the moment

Example
{"jsonrpc": "2.0", "method": "server_ban.list", "params": {}, "id": 123}

server_ban.get
Retrieve all details of a single server ban (*LINE).

Request arguments
Mandatory arguments (see structure of a server ban for an explanation of the fields):
 * type
 * name

Example
{"jsonrpc": "2.0", "method": "server_ban.get", "params": {"type":"kline","name":"*@127.1.2.3"}, "id": 123}

server_ban.add
Add a server ban (*LINE).

Request arguments
Mandatory arguments (see structure of a server ban for an explanation of the fields):
 * type
 * name
 * reason
 * the duration, either:
 * expire_at, OR
 * duration_string (important: broken in 6.0.5 stable!!)

Example request
{"jsonrpc": "2.0", "method": "server_ban.add", "params": {"type":"kline","name":"*@127.1.2.3","reason":"testing the API","duration_string":"1h"}, "id": 123}

server_ban.del
Delete a server ban (*LINE).

Request arguments
Mandatory arguments (see structure of a server ban for an explanation of the fields):
 * type
 * name

Example
{"jsonrpc": "2.0", "method": "server_ban.del", "params": {"type":"kline","name":"*@127.1.2.3"}, "id": 123}