JSON-RPC:Spamfilter

The  JSON RPC calls can add, remove and list spamfilters.

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

NOTE: Only spamfilters are changed through the  API. For server bans, see server_ban.*.

= API Calls =

spamfilter.list
List spamfilters.

Request arguments
No mandatory arguments at the moment

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

spamfilter.get
Retrieve all details of a single spamfilter.

Request arguments
Mandatory arguments (see structure of a spamfilter for an explanation of the fields):
 * name
 * match_type
 * spamfilter_targets
 * ban_action

Example
{"jsonrpc": "2.0", "method": "spamfilter.get", "params": {"name":"regex123","match_type": "regex","ban_action": "gline","spamfilter_targets": "cpnNPq"}, "id": 123}

spamfilter.add
Add a spamfilter.

Request arguments
Mandatory arguments (see structure of a spamfilter for an explanation of the fields):
 * name
 * match_type
 * spamfilter_targets
 * ban_action
 * reason
 * ban_duration

Example request
{"jsonrpc": "2.0", "method": "spamfilter.add", "params": {"name":"regex123","match_type": "regex","ban_action": "gline","ban_duration": 30,"spamfilter_targets": "cpnNPq","reason": "RPC test"}, "id": 123}

spamfilter.del
Delete a spamfilter.

Request arguments
Mandatory arguments (see structure of a spamfilter for an explanation of the fields):
 * name
 * match_type
 * spamfilter_targets
 * ban_action

Example
{"jsonrpc": "2.0", "method": "spamfilter.del", "params": {"name":"regex123","match_type": "regex","ban_action": "gline","spamfilter_targets": "cpnNPq"}, "id": 123}