-
Notifications
You must be signed in to change notification settings - Fork 127
Developer: xmpp api
This page will describe the XMPP API used by Archipel. This API is the only way to communicate with agents. The Archipel Client is using this exact API. You can use it to develop your own client, or to be able to send stanza using the tool archipel-command
. This document will describe all available command, module by module.
Archipel core is implemented by every Archipel entity, hypervisors or virtual machines.
Commands in this namespace will allow to make archipel entities to manage subscription with other users
Ask the entity to ask to subscribe to the given user
-
Permissions:
subscription_add
-
Input stanza:
<iq to='<TARGET_JID>' type='set'>
<query xmlns='archipel:subscription'>
<archipel action='add' jid='<PARAM_JID>' />
</query>
</iq>
- Input parameters:
name | possible values | description |
---|---|---|
PARAM_JID |
valid JID | the bare JID to subscribe to |
-
Result stanza: Standard
result
in case of success -
Result formatting: None
Ask the entity to ask to unsubscribe from the given user
-
Permissions:
subscription_remove
-
Input stanza:
<iq to='TARGET_JID' type='set'>
<query xmlns='archipel:subscription'>
<archipel action='remove' jid='PARAM_JID' />
</query>
</iq>
- Input parameters:
name | possible values | description |
---|---|---|
PARAM_JID |
valid JID | the bare JID to unsubscribe from |
-
Result stanza: Standard
result
in case of success -
Result formatting: None
This namespace allow to manage the permissions of an entity
Get the set of permissions of a random user
-
Permissions:
permission_get
-
Input stanza:
<iq to='TARGET_JID' type='get'>
<query xmlns='archipel:permission'>
<archipel action='get' permission_target='PARAM_PERM_TARGET' permission_type='PARAM_PERM_TYPE'/>
</query>
</iq>
- Input parameters:
name | possible values | description |
---|---|---|
PARAM_PERM_TARGET |
JID | the bare JID you want the permission |
PARAM_PERM_TYPE |
user |
Not used for now. always set user
|
- Result stanza:
<iq type="result">
<query xmlns="archipel:permissions'>
<permission name='PERM_NAME_1' />
<permission name='PERM_NAME_2' />
...
<permission name='PERM_NAME_N' />
</query>
</iq>
-
Result formatting:
The query will return a list
<permission/>
element, containing the attributename
, containing the name of the permissions. If use has no permission, it will return no<permission>
tag.
Get the set of permissions of a requester
-
Permissions: Always granted
-
Input stanza:
<iq to='TARGET_JID' type='get'>
<query xmlns='archipel:permission'>
<archipel action='get' permission_target='PARAM_PERM_TARGET' permission_type='PARAM_PERM_TYPE'/>
</query>
</iq>
- Input parameters:
name | possible values | description |
---|---|---|
PARAM_PERM_TARGET |
JID | the bare JID of the sender |
PARAM_PERM_TYPE |
user |
Not used for now. always set user
|
- Result stanza:
<iq type='result'>
<query xmlns='archipel:permissions'>
<permission name='PERM_NAME_1' />
<permission name='PERM_NAME_2' />
...
<permission name='PERM_NAME_N' />
</query>
</iq>
-
Result formatting:
The query will return a list
<permission/>
element, containing the attributename
, containing the name of the permissions. If use has no permission, it will return no<permission>
tag.
List all entity's existing permissions
-
Permissions:
permissions_list
-
Input stanza:
<iq to='TARGET_JID' type='get'>
<query xmlns='archipel:permission'>
<archipel action='list'/>
</query>
</iq>
-
Input parameters: None
-
Result stanza:
<iq type='result'>
<query xmlns='archipel:permissions'>
<permission name='PERM_NAME_1' default='PERM_DEFAULT_1' description='PERM_DESCRIPTION_1'/>
<permission name='PERM_NAME_2' default='PERM_DEFAULT_2' description='PERM_DESCRIPTION_2'/>
...
<permission name='PERM_NAME_N' default='PERM_DEFAULT_N' description='PERM_DESCRIPTION_N'/>
</query>
</iq>
-
Result formatting: The query will return a list
<permission/>
element, containing the attributes -
name
: name of the permissions. -
default
: The default policy of the permission: True|False (True means that the permission if granted if not explicitly prohibited) -
description
: Textual description of the permission