Tip of the day: Did you know that users are put in the security-group known-users based on their reputation score or if they are identified to Services?Users in this group receive a number of benefits, such as being able to send more messages per minute. |
JSON-RPC:Stats
Jump to navigation
Jump to search
JSON Methods
- rpc:
set_issuer
,info
,add_timer
,del_timer
- stats:
get
- log:
send
,list
,subscribe
,unsubscribe
- user:
list
,get
,set_nick
,set_username
,set_realname
,set_vhost
,set_mode
,set_snomask
,set_oper
- whowas:
get
- server:
list
,get
,rehash
,connect
,disconnect
- channel:
list
,get
,set_mode
,set_topic
,kick
- server_ban:
list
,get
,add
,del
- server_ban_exception:
list
,get
,add
,del
- spamfilter:
list
,get
,add
,del
- name_ban:
list
,get
,add
,del
JSON Basics
The stats.*
JSON RPC calls can be used to fetch statistics.
API Calls
stats.get
Get some quick basic statistics. This is for example used by the admin panel for the 'Overview' page.
Request arguments
Mandatory arguments:
- None
Optional arguments:
- object_detail_level: set the detail of the response object. The user.countries will be included from level 1+. The default object_detail_level is 1.
Response
Withing the result object the following fields are available that describe total counts network-wide (global):
"server": { "total": 1, "ulined": 0 }, "user": { "total": 1, "ulined": 0, "oper": 1, "record": 510, "countries": [ { "country": "NL", "count": 1 } ] }, "channel": { "total": 0 }, "server_ban": { "total": 27, "server_ban": 2, "spamfilter": 3, "name_ban": 18, "server_ban_exception": 4 }
The above fields should speak for themselves. One important thing to note is that users.oper does not include u-lines (so services bots with +o are not included in 'oper').
Example
Request:
{"jsonrpc": "2.0", "method": "stats.get", "params": {}, "id": 123}