The ejabberd:config protocol can be used to configure an ejabberd server from a Jabber client. This text describes how the protocol works. This text is obsolete since ejabberd 1.1.0 and beyond use Ad-Hoc Commands instead.
This protocol uses Data Forms, which see.
A client can find out what nodes support configuration by Service Discovery; those nodes that advertise the feature "ejabberd:config" on disco#info can be configured. Getting the configuration form is done like this:
<iq type="get" to="server" id="42"> <query xmlns="ejabberd:config" node="node"/> </iq>
The server may return many kinds of errors here, including not-allowed
, item-not-found
, internal-server-error
, and service-unavailable
. On success, it returns the following:
<iq type="result" from="server" to="client" id="42"> <query xmlns="ejabberd:config"> <x xmlns="jabber:x:data"> ... </x> </query> </iq>
Note that the server doesn't repeat the "node" attribute in the reply.
The client may either submit or cancel the form, as described in JEP-0004. Here a submit is shown:
<iq type="set" to="server" id="43"> <query xmlns="ejabberd:config" node="node"> <x xmlns="jabber:x:data" type="submit"> ... </x> </query> </iq>
The server may reply with success:
<iq type="result" to="client" from="server" id="43"> <query xmlns="ejabberd:config"/> </iq>
Or with an error. bad-request
indicates a syntax error, and other error codes are possible as well.