You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/developer/ejabberd-api/admin-api.md
+61-52Lines changed: 61 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ __Examples:__
82
82
Add an item to a user's roster (supports ODBC)
83
83
84
84
85
-
Group can be several groups separated by ; for example: "g1;g2;g3"
85
+
Group can be several groups separated by `;` for example: `g1;g2;g3`
86
86
87
87
__Arguments:__
88
88
@@ -396,7 +396,7 @@ __Examples:__
396
396
Check if the password hash is correct
397
397
398
398
399
-
Allows hash methods from crypto application
399
+
Allows hash methods from the Erlang/OTP [crypto](https://www.erlang.org/doc/man/crypto) application.
400
400
401
401
__Arguments:__
402
402
@@ -761,7 +761,7 @@ __Examples:__
761
761
Create a MUC room name@service in host with given options
762
762
763
763
764
-
To set affilitions string value must have format 'Type:JID,Type:JID' for example 'owner:bob@example.com,member:peter@example.com'. Subscribers can be define with string 'JID:Nick:Node1:Node2,JID:Nick:Node3' for example 'bob@example.com:Bob:messages:subject,anne@example.com:Anne:messages'.
764
+
The syntax of `affiliations` is: `Type:JID,Type:JID`. The syntax of `subscribers` is: `JID:Nick:Node:Node2:Node3,JID:Nick:Node`.
-*type* :: string : Type of messages to delete (chat, groupchat, all)
960
+
-*type* :: string : Type of messages to delete (`chat`, `groupchat`, `all`)
957
961
-*days* :: integer : Days to keep messages
958
962
959
963
__Result:__
@@ -989,12 +993,12 @@ __Examples:__
989
993
Delete MAM messages older than DAYS
990
994
991
995
992
-
Valid message TYPEs: "chat", "groupchat", "all".
996
+
Valid message TYPEs: `chat`, `groupchat`, `all`.
993
997
994
998
__Arguments:__
995
999
996
1000
-*host* :: string : Name of host where messages should be deleted
997
-
-*type* :: string : Type of messages to delete (chat, groupchat, all)
1001
+
-*type* :: string : Type of messages to delete (`chat`, `groupchat`, `all`)
998
1002
-*days* :: integer : Days to keep messages
999
1003
-*batch_size* :: integer : Number of messages to delete per batch
1000
1004
-*rate* :: integer : Desired rate of messages to delete per minute
@@ -1243,10 +1247,12 @@ Delete users that didn't log in last days, or that never logged
1243
1247
1244
1248
1245
1249
To protect admin accounts, configure this for example:
1250
+
```
1246
1251
access_rules:
1247
1252
protect_old_users:
1248
1253
- allow: admin
1249
1254
- deny: all
1255
+
```
1250
1256
1251
1257
1252
1258
__Arguments:__
@@ -1286,10 +1292,12 @@ Delete users that didn't log in last days in vhost, or that never logged
1286
1292
1287
1293
1288
1294
To protect admin accounts, configure this for example:
1295
+
```
1289
1296
access_rules:
1290
1297
delete_old_users:
1291
1298
- deny: admin
1292
1299
- allow: all
1300
+
```
1293
1301
1294
1302
1295
1303
__Arguments:__
@@ -1544,7 +1552,7 @@ __Examples:__
1544
1552
Export virtual host information from Mnesia tables to SQL file
1545
1553
1546
1554
1547
-
Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [delete_mnesia](/developer/ejabberd-api/admin-api/#delete-mnesia) command.
1555
+
Configure the modules to use SQL, then call this command. After correctly exported the database of a vhost, you may want to delete from mnesia with the [`delete_mnesia`](/developer/ejabberd-api/admin-api/#delete-mnesia) command.
1548
1556
1549
1557
__Arguments:__
1550
1558
@@ -1681,7 +1689,7 @@ __Arguments:__
1681
1689
1682
1690
-*file* :: string : Path to file where generated documentation should be stored
1683
1691
-*regexp* :: string : Regexp matching names of commands or modules that will be included inside generated document
1684
-
-*examples* :: string : Comma separated list of languages (chosen from java, perl, xmlrpc, json)that will have example invocation include in markdown document
1692
+
-*examples* :: string : Comma separated list of languages (chosen from `java`, `perl`, `xmlrpc`, `json`) that will have example invocation include in markdown document
1685
1693
1686
1694
__Result:__
1687
1695
@@ -1717,7 +1725,7 @@ __Arguments:__
1717
1725
1718
1726
-*file* :: string : Path to file where generated documentation should be stored
1719
1727
-*regexp* :: string : Regexp matching names of commands or modules that will be included inside generated document
1720
-
-*examples* :: string : Comma separated list of languages (chosen from java, perl, xmlrpc, json)that will have example invocation include in markdown document
1728
+
-*examples* :: string : Comma separated list of languages (chosen from `java`, `perl`, `xmlrpc`, `json`) that will have example invocation include in markdown document
1721
1729
1722
1730
__Result:__
1723
1731
@@ -1816,7 +1824,7 @@ __Examples:__
1816
1824
Get last activity information
1817
1825
1818
1826
1819
-
Timestamp is UTC and XEP-0082 format, for example: 2017-02-23T22:25:28.063062Z ONLINE
1827
+
Timestamp is UTC and XEP-0082 format, for example: `2017-02-23T22:25:28.063062Z ONLINE`
1820
1828
1821
1829
__Arguments:__
1822
1830
@@ -1927,16 +1935,18 @@ __Examples:__
1927
1935
Retrieve the resource with highest priority, and its presence (show and status message) for a given user.
1928
1936
1929
1937
1930
-
The 'jid' value contains the user jid with resource.
1931
-
The 'show' value contains the user presence flag. It can take limited values:
1932
-
- available
1933
-
- chat (Free for chat)
1934
-
- away
1935
-
- dnd (Do not disturb)
1936
-
- xa (Not available, extended away)
1937
-
- unavailable (Not connected)
1938
+
The `jid` value contains the user JID with resource.
1939
+
1940
+
The `show` value contains the user presence flag. It can take limited values:
1941
+
1942
+
-`available`
1943
+
-`chat` (Free for chat)
1944
+
-`away`
1945
+
-`dnd` (Do not disturb)
1946
+
-`xa` (Not available, extended away)
1947
+
-`unavailable` (Not connected)
1938
1948
1939
-
'status' is a free text defined by the user client.
1949
+
`status` is a free text defined by the user client.
1940
1950
1941
1951
__Arguments:__
1942
1952
@@ -2675,7 +2685,7 @@ __Examples:__
2675
2685
Import data from Prosody
2676
2686
2677
2687
2678
-
Note: this requires ejabberd compiled with --enable-lua and include the optional 'luerl' library.
2688
+
Note: this requires ejabberd to be [compiled with `--enable-lua`](http://localhost:8098/admin/installation/#configure) (which installs the `luerl` library).
2679
2689
2680
2690
__Arguments:__
2681
2691
@@ -2741,8 +2751,7 @@ __Examples:__
2741
2751
Install Mnesia database from a binary backup file
2742
2752
2743
2753
2744
-
The binary backup file is installed as fallback: it will be used to restore the database at the next ejabberd start. This means that, after running this command, you have to restart ejabberd. This command requires less memory than
2745
-
'restore'.
2754
+
The binary backup file is installed as fallback: it will be used to restore the database at the next ejabberd start. This means that, after running this command, you have to restart ejabberd. This command requires less memory than [`restore`](/developer/ejabberd-api/admin-api/#restore).
2746
2755
2747
2756
__Arguments:__
2748
2757
@@ -2998,7 +3007,7 @@ __Examples:__
2998
3007
Restore Mnesia database from a text dump file
2999
3008
3000
3009
3001
-
Restore immediately. This is not recommended for big databases, as it will consume much time, memory and processor. In that case it's preferable to use 'backup' and 'install_fallback'.
3010
+
Restore immediately. This is not recommended for big databases, as it will consume much time, memory and processor. In that case it's preferable to use [`install_fallback`](/developer/ejabberd-api/admin-api/#backup[backup] and http://./#install-fallback).
3002
3011
3003
3012
__Arguments:__
3004
3013
@@ -4569,7 +4578,7 @@ __Examples:__
4569
4578
Restore the Mnesia database from a binary backup file
4570
4579
4571
4580
4572
-
This restores immediately from a binary backup file the internal Mnesia database. This will consume a lot of memory if you have a large database, you may prefer 'install_fallback'.
4581
+
This restores immediately from a binary backup file the internal Mnesia database. This will consume a lot of memory if you have a large database, you may prefer [`install_fallback`](/developer/ejabberd-api/admin-api/#install-fallback).
4573
4582
4574
4583
__Arguments:__
4575
4584
@@ -4636,11 +4645,11 @@ __Examples:__
4636
4645
Destroy the rooms that have no messages in archive
4637
4646
4638
4647
4639
-
The MUC service argument can be 'global' to get all hosts.
4648
+
The MUC service argument can be `global` to get all hosts.
4640
4649
4641
4650
__Arguments:__
4642
4651
4643
-
-*service* :: string : MUC service, or 'global' for all
4652
+
-*service* :: string : MUC service, or `global` for all
4644
4653
4645
4654
__Result:__
4646
4655
@@ -4677,11 +4686,11 @@ __Examples:__
4677
4686
List the rooms that have no messages in archive
4678
4687
4679
4688
4680
-
The MUC service argument can be 'global' to get all hosts.
4689
+
The MUC service argument can be `global` to get all hosts.
4681
4690
4682
4691
__Arguments:__
4683
4692
4684
-
-*service* :: string : MUC service, or 'global' for all
4693
+
-*service* :: string : MUC service, or `global` for all
4685
4694
4686
4695
__Result:__
4687
4696
@@ -4718,11 +4727,11 @@ __Examples:__
4718
4727
Destroy the rooms that are unused for many days in the service
4719
4728
4720
4729
4721
-
The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be 'global' to get all hosts.
4730
+
The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be `global` to get all hosts.
4722
4731
4723
4732
__Arguments:__
4724
4733
4725
-
-*service* :: string : MUC service, or 'global' for all
4734
+
-*service* :: string : MUC service, or `global` for all
4726
4735
-*days* :: integer : Number of days
4727
4736
4728
4737
__Result:__
@@ -4761,11 +4770,11 @@ __Examples:__
4761
4770
List the rooms that are unused for many days in the service
4762
4771
4763
4772
4764
-
The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be 'global' to get all hosts.
4773
+
The room recent history is used, so it's recommended to wait a few days after service start before running this. The MUC service argument can be `global` to get all hosts.
4765
4774
4766
4775
__Arguments:__
4767
4776
4768
-
-*service* :: string : MUC service, or 'global' for all
4777
+
-*service* :: string : MUC service, or `global` for all
4769
4778
-*days* :: integer : Number of days
4770
4779
4771
4780
__Result:__
@@ -4837,15 +4846,15 @@ Send a direct invitation to several destinations
4837
4846
4838
4847
Since ejabberd <ahref="/archive/20_12/">20.12</a>, this command is asynchronous: the API call may return before the server has send all the invitations.
4839
4848
4840
-
Password and Message can also be: none. Users JIDs are separated with :
4849
+
Password and Message can also be: `none`. Users JIDs are separated with `:`.
4841
4850
4842
4851
__Arguments:__
4843
4852
4844
4853
-*name* :: string : Room name
4845
4854
-*service* :: string : MUC service
4846
-
-*password* :: string : Password, or none
4847
-
-*reason* :: string : Reason text, or none
4848
-
-*users* :: string : Users JIDs separated with : characters
4855
+
-*password* :: string : Password, or `none`
4856
+
-*reason* :: string : Reason text, or `none`
4857
+
-*users* :: string : Users JIDs separated with `:` characters
4849
4858
4850
4859
__Result:__
4851
4860
@@ -4883,11 +4892,11 @@ __Examples:__
4883
4892
Send a message to a local or remote bare of full JID
4884
4893
4885
4894
4886
-
When sending a groupchat message to a MUC room, FROM must be the full JID of a room occupant, or the bare JID of a MUC service admin, or the bare JID of a MUC/Sub subscribed user.
4895
+
When sending a groupchat message to a MUC room, `from` must be the full JID of a room occupant, or the bare JID of a MUC service admin, or the bare JID of a MUC/Sub subscribed user.
USER@HOST/RESOURCE must be an existing C2S session. As an alternative, use send_stanza instead.
4980
+
`user`@`host`/`resource` must be an existing C2S session. As an alternative, use [`send_stanza`](/developer/ejabberd-api/admin-api/#send-stanza) instead.
4972
4981
4973
4982
__Arguments:__
4974
4983
@@ -5012,7 +5021,7 @@ __Examples:__
5012
5021
Set last activity information
5013
5022
5014
5023
5015
-
Timestamp is the seconds since 1970-01-01 00:00:00 UTC, for example: date +%s
5024
+
Timestamp is the seconds since `1970-01-01 00:00:00 UTC`. For example value see `date +%s`
5016
5025
5017
5026
__Arguments:__
5018
5027
@@ -5088,7 +5097,7 @@ __Examples:__
5088
5097
Set master node of the clustered Mnesia tables
5089
5098
5090
5099
5091
-
If you provide as nodename "self", this node will be set as its own master.
5100
+
If you provide as nodename `self`, this node will be set as its own master.
-*priority* :: string : Priority, provide this value as an integer
5173
5182
@@ -5428,10 +5437,10 @@ Create a Shared Roster Group
5428
5437
5429
5438
5430
5439
If you want to specify several group identifiers in the Display argument,
5431
-
put \ " around the argument and
5432
-
separate the identifiers with \ \ n
5440
+
put `\ "` around the argument and
5441
+
separate the identifiers with `\ \ n`
5433
5442
For example:
5434
-
ejabberdctl srg_create group3 myserver.com name desc \"group1\\ngroup2\"
5443
+
`ejabberdctl srg_create group3 myserver.com name desc \"group1\\ngroup2\"`
5435
5444
5436
5445
__Arguments:__
5437
5446
@@ -6015,7 +6024,7 @@ Inform users and rooms, wait, and stop the server
6015
6024
6016
6025
6017
6026
Provide the delay in seconds, and the announcement quoted, for example:
6018
-
ejabberdctl stop_kindly 60 \"The server will stop in one minute.\"
6027
+
`ejabberdctl stop_kindly 60 \"The server will stop in one minute.\"`
6019
6028
6020
6029
__Arguments:__
6021
6030
@@ -6087,7 +6096,7 @@ __Arguments:__
6087
6096
-*user* :: string : User JID
6088
6097
-*nick* :: string : a user's nick
6089
6098
-*room* :: string : the room to subscribe
6090
-
-*nodes* :: string : nodes separated by commas: ,
6099
+
-*nodes* :: string : nodes separated by commas: `,`
6091
6100
6092
6101
__Result:__
6093
6102
@@ -6127,13 +6136,13 @@ __Examples:__
6127
6136
Subscribe several users to a MUC conference
6128
6137
6129
6138
6130
-
This command accept up to 50 users at once (this is configurable with `subscribe_room_many_max_users` option)
6139
+
This command accepts up to 50 users at once (this is configurable with the [mod_muc_admin](/admin/configuration/modules/#mod-muc-admin) option `subscribe_room_many_max_users`)
6131
6140
6132
6141
__Arguments:__
6133
6142
6134
6143
-*users* :: [{jid::string, nick::string}] : Users JIDs and nicks
6135
6144
-*room* :: string : the room to subscribe
6136
-
-*nodes* :: string : nodes separated by commas: ,
6145
+
-*nodes* :: string : nodes separated by commas: `,`
0 commit comments