Skip to content

Commit ff8fdb8

Browse files
committed
Update command from ejabberd git: improved markdown of many descriptions
1 parent 9a28755 commit ff8fdb8

File tree

1 file changed

+61
-52
lines changed

1 file changed

+61
-52
lines changed

content/developer/ejabberd-api/admin-api.md

Lines changed: 61 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ __Examples:__
8282
Add an item to a user's roster (supports ODBC)
8383

8484

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`
8686

8787
__Arguments:__
8888

@@ -396,7 +396,7 @@ __Examples:__
396396
Check if the password hash is correct
397397

398398

399-
Allows hash methods from crypto application
399+
Allows hash methods from the Erlang/OTP [crypto](https://www.erlang.org/doc/man/crypto) application.
400400

401401
__Arguments:__
402402

@@ -761,7 +761,7 @@ __Examples:__
761761
Create a MUC room name@service in host with given options
762762

763763

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`.
765765

766766
__Arguments:__
767767

@@ -794,9 +794,13 @@ __Examples:__
794794
"name": "members_only",
795795
"value": "true"
796796
},
797+
{
798+
"name": "affiliations",
799+
"value": "owner:bob@example.com,member:peter@example.com"
800+
},
797801
{
798802
"name": "subscribers",
799-
"value": "bob@example.com:Bob:messages"
803+
"value": "bob@example.com:Bob:messages:subject,anne@example.com:Anne:messages"
800804
}
801805
]
802806
}
@@ -949,11 +953,11 @@ __Examples:__
949953
Delete MAM messages older than DAYS
950954

951955

952-
Valid message TYPEs: "chat", "groupchat", "all".
956+
Valid message TYPEs: `chat`, `groupchat`, `all`.
953957

954958
__Arguments:__
955959

956-
- *type* :: string : Type of messages to delete (chat, groupchat, all)
960+
- *type* :: string : Type of messages to delete (`chat`, `groupchat`, `all`)
957961
- *days* :: integer : Days to keep messages
958962

959963
__Result:__
@@ -989,12 +993,12 @@ __Examples:__
989993
Delete MAM messages older than DAYS
990994

991995

992-
Valid message TYPEs: "chat", "groupchat", "all".
996+
Valid message TYPEs: `chat`, `groupchat`, `all`.
993997

994998
__Arguments:__
995999

9961000
- *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`)
9981002
- *days* :: integer : Days to keep messages
9991003
- *batch_size* :: integer : Number of messages to delete per batch
10001004
- *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
12431247

12441248

12451249
To protect admin accounts, configure this for example:
1250+
```
12461251
access_rules:
12471252
protect_old_users:
12481253
- allow: admin
12491254
- deny: all
1255+
```
12501256

12511257

12521258
__Arguments:__
@@ -1286,10 +1292,12 @@ Delete users that didn't log in last days in vhost, or that never logged
12861292

12871293

12881294
To protect admin accounts, configure this for example:
1295+
```
12891296
access_rules:
12901297
delete_old_users:
12911298
- deny: admin
12921299
- allow: all
1300+
```
12931301

12941302

12951303
__Arguments:__
@@ -1544,7 +1552,7 @@ __Examples:__
15441552
Export virtual host information from Mnesia tables to SQL file
15451553

15461554

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.
15481556

15491557
__Arguments:__
15501558

@@ -1681,7 +1689,7 @@ __Arguments:__
16811689

16821690
- *file* :: string : Path to file where generated documentation should be stored
16831691
- *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
16851693

16861694
__Result:__
16871695

@@ -1717,7 +1725,7 @@ __Arguments:__
17171725

17181726
- *file* :: string : Path to file where generated documentation should be stored
17191727
- *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
17211729

17221730
__Result:__
17231731

@@ -1816,7 +1824,7 @@ __Examples:__
18161824
Get last activity information
18171825

18181826

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`
18201828

18211829
__Arguments:__
18221830

@@ -1927,16 +1935,18 @@ __Examples:__
19271935
Retrieve the resource with highest priority, and its presence (show and status message) for a given user.
19281936

19291937

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)
19381948

1939-
'status' is a free text defined by the user client.
1949+
`status` is a free text defined by the user client.
19401950

19411951
__Arguments:__
19421952

@@ -2675,7 +2685,7 @@ __Examples:__
26752685
Import data from Prosody
26762686

26772687

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).
26792689

26802690
__Arguments:__
26812691

@@ -2741,8 +2751,7 @@ __Examples:__
27412751
Install Mnesia database from a binary backup file
27422752

27432753

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).
27462755

27472756
__Arguments:__
27482757

@@ -2998,7 +3007,7 @@ __Examples:__
29983007
Restore Mnesia database from a text dump file
29993008

30003009

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).
30023011

30033012
__Arguments:__
30043013

@@ -4569,7 +4578,7 @@ __Examples:__
45694578
Restore the Mnesia database from a binary backup file
45704579

45714580

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).
45734582

45744583
__Arguments:__
45754584

@@ -4636,11 +4645,11 @@ __Examples:__
46364645
Destroy the rooms that have no messages in archive
46374646

46384647

4639-
The MUC service argument can be 'global' to get all hosts.
4648+
The MUC service argument can be `global` to get all hosts.
46404649

46414650
__Arguments:__
46424651

4643-
- *service* :: string : MUC service, or 'global' for all
4652+
- *service* :: string : MUC service, or `global` for all
46444653

46454654
__Result:__
46464655

@@ -4677,11 +4686,11 @@ __Examples:__
46774686
List the rooms that have no messages in archive
46784687

46794688

4680-
The MUC service argument can be 'global' to get all hosts.
4689+
The MUC service argument can be `global` to get all hosts.
46814690

46824691
__Arguments:__
46834692

4684-
- *service* :: string : MUC service, or 'global' for all
4693+
- *service* :: string : MUC service, or `global` for all
46854694

46864695
__Result:__
46874696

@@ -4718,11 +4727,11 @@ __Examples:__
47184727
Destroy the rooms that are unused for many days in the service
47194728

47204729

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.
47224731

47234732
__Arguments:__
47244733

4725-
- *service* :: string : MUC service, or 'global' for all
4734+
- *service* :: string : MUC service, or `global` for all
47264735
- *days* :: integer : Number of days
47274736

47284737
__Result:__
@@ -4761,11 +4770,11 @@ __Examples:__
47614770
List the rooms that are unused for many days in the service
47624771

47634772

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.
47654774

47664775
__Arguments:__
47674776

4768-
- *service* :: string : MUC service, or 'global' for all
4777+
- *service* :: string : MUC service, or `global` for all
47694778
- *days* :: integer : Number of days
47704779

47714780
__Result:__
@@ -4837,15 +4846,15 @@ Send a direct invitation to several destinations
48374846

48384847
Since ejabberd <a href="/archive/20_12/">20.12</a>, this command is asynchronous: the API call may return before the server has send all the invitations.
48394848

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 `:`.
48414850

48424851
__Arguments:__
48434852

48444853
- *name* :: string : Room name
48454854
- *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
48494858

48504859
__Result:__
48514860

@@ -4883,11 +4892,11 @@ __Examples:__
48834892
Send a message to a local or remote bare of full JID
48844893

48854894

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.
48874896

48884897
__Arguments:__
48894898

4890-
- *type* :: string : Message type: normal, chat, headline, groupchat
4899+
- *type* :: string : Message type: `normal`, `chat`, `headline`, `groupchat`
48914900
- *from* :: string : Sender JID
48924901
- *to* :: string : Receiver JID
48934902
- *subject* :: string : Subject, or empty string
@@ -4968,7 +4977,7 @@ __Examples:__
49684977
Send a stanza from an existing C2S session
49694978

49704979

4971-
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.
49724981

49734982
__Arguments:__
49744983

@@ -5012,7 +5021,7 @@ __Examples:__
50125021
Set last activity information
50135022

50145023

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`
50165025

50175026
__Arguments:__
50185027

@@ -5088,7 +5097,7 @@ __Examples:__
50885097
Set master node of the clustered Mnesia tables
50895098

50905099

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.
50925101

50935102
__Arguments:__
50945103

@@ -5166,8 +5175,8 @@ __Arguments:__
51665175
- *user* :: string : User name
51675176
- *host* :: string : Server name
51685177
- *resource* :: string : Resource
5169-
- *type* :: string : Type: available, error, probe...
5170-
- *show* :: string : Show: away, chat, dnd, xa.
5178+
- *type* :: string : Type: `available`, `error`, `probe`...
5179+
- *show* :: string : Show: `away`, `chat`, `dnd`, `xa`.
51715180
- *status* :: string : Status text
51725181
- *priority* :: string : Priority, provide this value as an integer
51735182

@@ -5428,10 +5437,10 @@ Create a Shared Roster Group
54285437

54295438

54305439
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`
54335442
For example:
5434-
ejabberdctl srg_create group3 myserver.com name desc \"group1\\ngroup2\"
5443+
`ejabberdctl srg_create group3 myserver.com name desc \"group1\\ngroup2\"`
54355444

54365445
__Arguments:__
54375446

@@ -6015,7 +6024,7 @@ Inform users and rooms, wait, and stop the server
60156024

60166025

60176026
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.\"`
60196028

60206029
__Arguments:__
60216030

@@ -6087,7 +6096,7 @@ __Arguments:__
60876096
- *user* :: string : User JID
60886097
- *nick* :: string : a user's nick
60896098
- *room* :: string : the room to subscribe
6090-
- *nodes* :: string : nodes separated by commas: ,
6099+
- *nodes* :: string : nodes separated by commas: `,`
60916100

60926101
__Result:__
60936102

@@ -6127,13 +6136,13 @@ __Examples:__
61276136
Subscribe several users to a MUC conference
61286137

61296138

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`)
61316140

61326141
__Arguments:__
61336142

61346143
- *users* :: [{jid::string, nick::string}] : Users JIDs and nicks
61356144
- *room* :: string : the room to subscribe
6136-
- *nodes* :: string : nodes separated by commas: ,
6145+
- *nodes* :: string : nodes separated by commas: `,`
61376146

61386147
__Result:__
61396148

0 commit comments

Comments
 (0)