]> 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 9dc240a113608bfbc1e54ca4cdb50b248649b05b..7ea2100d3f80396d4ade386d053f7a2fb23a24c6 100644 (file)
@@ -164,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
@@ -204,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 :)