From 7079634f184aa196dded154467538e748c8cfacb Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 16 Jul 2019 12:53:06 +0200 Subject: [PATCH] Documentation of mod_http_api moved from source code to Docs page --- src/mod_http_api.erl | 45 -------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl index fbbdb648d..9a694a672 100644 --- a/src/mod_http_api.erl +++ b/src/mod_http_api.erl @@ -23,51 +23,6 @@ %%% %%%---------------------------------------------------------------------- -%% Example config: -%% -%% in ejabberd_http listener -%% request_handlers: -%% "/api": mod_http_api -%% -%% To use a specific API version N, add a vN element in the URL path: -%% in ejabberd_http listener -%% request_handlers: -%% "/api/v2": mod_http_api -%% -%% Access rights are defined with: -%% commands_admin_access: configure -%% commands: -%% - add_commands: user -%% -%% -%% add_commands allow exporting a class of commands, from -%% open: methods is not risky and can be called by without any access check -%% restricted (default): the same, but will appear only in ejabberdctl list. -%% admin – auth is required with XMLRPC and HTTP API and checked for admin privileges, works as usual in ejabberdctl. -%% user - can be used through XMLRPC and HTTP API, even by user. Only admin can use the commands for other users. -%% -%% Then to perform an action, send a POST request to the following URL: -%% http://localhost:5280/api/ -%% -%% It's also possible to enable unrestricted access to some commands from group -%% of IP addresses by using option `admin_ip_access` by having fragment like -%% this in configuration file: -%% modules: -%% mod_http_api: -%% admin_ip_access: admin_ip_access_rule -%%... -%% access: -%% admin_ip_access_rule: -%% admin_ip_acl: -%% - command1 -%% - command2 -%% %% use `all` to give access to all commands -%%... -%% acl: -%% admin_ip_acl: -%% ip: -%% - "127.0.0.1/8" - -module(mod_http_api). -author('cromain@process-one.net').