]> git.defcon.no Git - hermes/blobdiff - api-nodes.txt
Added alias/list functionality! Also, moved some data around in lib/alias_functions...
[hermes] / api-nodes.txt
index b01058a9f5946e489845e0820e465e329bd685ab..7ea2100d3f80396d4ade386d053f7a2fb23a24c6 100644 (file)
@@ -60,10 +60,22 @@ user/change_pw?user=foo@bar.bz&password=baz
 
 user/update?username=foo&domain=bar
 user/update?user=foo@bar.bz
-  optionals: &displayname=baz&dialplan=(.*)&linetext=lalala
+  optionals: &displayname=baz&dialplan=(.*)&linetext=lalala&email=foo@bar.baz
        Not implemented! Will only be implemented for Local users.
        Remote users will have to be removed, and re-added.
 
+user/change_email?username=foo&domain=bar&email=user@example.com
+user/change_email?user=foo@bar.bz&email=user@example.com
+       Changes the email address for the given user, returns 'ok' with
+       'user' set to the requested username and 'email' set to the
+       email address.  This only applies to kamailio local users.
+
+       Returns 'failed' with 'cause' = 'nonexistant' if user does not exist.
+       
+       Returns 'failed' with 'cause' = 'dbfail' if the database request
+       failed. Note that this may be because the given password was identical
+       to the old.
+
 
 user/remove?username=foo&domain=bar
 user/remove?user=foo@bar.bz
@@ -152,7 +164,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
@@ -192,10 +219,6 @@ alias/remove?alias=foo@bar.bz
 
 TODO list:
 ---------------------
-Planned, but not implemented nodes/functions:
-       user/update?username=foo&domain=bar
-       alias/list
-       alias/user?destination=foo@bar.bz
 
 authentication-mechanism :)