For monitoring purpose (using Zabbix), I'd like to get some statistics like amount of users, of files, etc., on my server. I know I can log in to the admin panel, but I'd like to get those from CLI.

Thanks for taking the time to write this. A quick question that I still have:

Do you want those to be publicly available on a HTTP endpoint? Like /api/statistics? If so, wouldn't it be useful to put some kind of authentication on top of that?