]> git.defcon.no Git - hermes/blobdiff - api-nodes.txt
Small edits after meeting about UI
[hermes] / api-nodes.txt
index 9dc240a113608bfbc1e54ca4cdb50b248649b05b..2d6e76acac149da1687f345c96919a87f66e3ce3 100644 (file)
@@ -80,14 +80,21 @@ user/change_email?user=foo@bar.bz&email=user@example.com
 user/remove?username=foo&domain=bar
 user/remove?user=foo@bar.bz
        Removes user account from Kamailio, if present, and removes user from
-       provisioning.  Will fail if user has associated hardphones, remove
-       phones before removing user.
+       provisioning.  
+
+       Will fail if user has associated hardphones, remove phones before
+       removing user. 
+
+       TODO: Should fail if user has associated aliases. Remove aliases before
+       removing user.
 
        Returns 'ok' on success.
 
 user/gen_pw
-       Test-node, generates a random password on the same form as that used by
-       user/add_local. May be used with the to-be-implemented change_pw node.
+       Generates a random password on the same form as that used by
+       user/add_local. 
+
+       Return is always a password in plain text, with no formatting.
 
 phone/get?mac=f00ba2ba5c00
 phone/get?user=foo@bar.bz
@@ -164,7 +171,22 @@ alias/list
 alias/list?destination=foo@bar.bz
 alias/list?destination=foo@bar.bz&e164=true
 alias/list?alias=foo@bar.bz
-       Currently not implemented
+       With no parameters, this will return all defined aliases (potentially a
+       huge list). With the destination parameter set, only aliases dfor that
+       destination will be listed, and with the e164 option set to true, only
+       an e164 alias will be returned (if one/it exists). The alias parameter
+       gives the same behaviour, butr looks up an alias address instead of the
+       destination. The e164 option is not valid for the alias search
+       (naturally).
+
+       Returns 'ok' on success, with an array of 'destination' and 'alias'
+       pairs.
+
+       Returns 'ok' with an empty array if the search gave no results.
+
+       Returns 'ok' with an empty array if the database search fails.
+
+       Returns 'failed' with 'cause' = 'invalid' on invalid SIP addresses.
 
 alias/add?alias_username=foo&alias_domain=bar.bz&destination=bar@qux.zx
 alias/add?alias=foo@bar.bz&destination=bar@qux.zx
@@ -202,12 +224,20 @@ alias/remove?alias=foo@bar.bz
        Returns 'invalid' with 'cause' = 'address' if the given alias is not a
        valid SIP adress.
 
+BUGS:
+---------------------
+
+api/alias/list?destination=foo@bar.bz&e164=true
+       should return an empty array, returns false
+
 TODO list:
 ---------------------
-Planned, but not implemented nodes/functions:
-       user/update?username=foo&domain=bar
-       alias/list
-       alias/user?destination=foo@bar.bz
+
+Add a node to test a destination (pre-flight testing of user/add and alias/add)
+
+Read list of kamailio domains (domains/list ?) RW?
+Default server-settings for domains (domains/server ? ) (registrar, proxy, ports...) RW.
+Permissions! (user/permissions?user=...)
 
 authentication-mechanism :)