JAMES-1789 Remove documentation from the sources for webadmin
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/39bd19d0 Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/39bd19d0 Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/39bd19d0 Branch: refs/heads/master Commit: 39bd19d010231b6eee2defb65d0bc284025b47f3 Parents: 27118d1 Author: benwa <[email protected]> Authored: Thu Jun 8 20:26:00 2017 +0700 Committer: benwa <[email protected]> Committed: Wed Jun 14 15:01:25 2017 +0700 ---------------------------------------------------------------------- server/protocols/webadmin/README.adoc | 358 ----------------------------- 1 file changed, 358 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/39bd19d0/server/protocols/webadmin/README.adoc ---------------------------------------------------------------------- diff --git a/server/protocols/webadmin/README.adoc b/server/protocols/webadmin/README.adoc deleted file mode 100644 index 34f69e3..0000000 --- a/server/protocols/webadmin/README.adoc +++ /dev/null @@ -1,358 +0,0 @@ -= Web administration for JAMES - -The web administration supports for now the CRUD operations on the domains, the users and the users mailboxes, and quotas, as described in the following sections. - -**WARNING**: This API allow authentication only via the use of JWT. It means that, otherwise, an administrator should ensure an attacker can not use this API. - -== Administrating domains - -=== Create a domain - -.bash -==== -curl -XPUT http://ip:port/domains/domainToBeCreated -==== - -Resource name domainToBeCreated: - - - can not be null or empty - - can not contain '@' - - can not be more than 255 characters - - can not contain '/' - -Response codes: - - - 204: The domain was successfully added - - 400: The domain name is invalid - - 500: Internal error while adding the domain - -=== Delete a domain - -.bash -==== -curl -XDELETE http://ip:port/domains/domainToBeDeleted -==== - -Response codes: - - - 204: The domain was successfully removed - - 500: Internal error while removing the domain - -=== Test if a domain exists - -.bash -==== -curl -XGET http://ip:port/domains/domainName -==== - -Response codes: - - - 204: The domains exists - - 404: The domain does not exist - - 500: Internal error while accessing the domains - -=== Get the list of domains - -.bash -==== -curl -XGET http://ip:port/domains -==== - -Possible response: - -.json -==== -{"domains":["domain1", "domain2"]} -==== - -Response codes: - - - 200: The domain list was successfully retrieved - - 500: Internal error while accessing the domains - -== Administrating users - -=== Create a user - -.bash -==== -curl -XPUT http://ip:port/users/usernameToBeUsed -d '{"password":"passwordToBeUsed"}' -==== - -Resource name usernameToBeUsed: - - - can not be null or empty - - can not be more than 255 characters - - can not contain '/' - -Response codes: - - - 204: The user was successfully created - - 400: The user name or the payload is invalid - - 409: Conflict: A concurrent modification make that query to fail - - 500: Internal error while adding the user - -Note: if the user is already, its password will be updated. - -=== Updating a user password - -Same than Create, but a user need to exist. - -If the user do not exist, then it will be created. - -=== Deleting a user - -.bash -==== -curl -XDELETE http://ip:port/users/userToBeDeleted -==== - -Response codes: - - - 204: The user was successfully deleted - - 500: Internal error while deleting the user - -=== Retrieving the user list - -.bash -==== -curl -XGET http://ip:port/users -==== - -The answer looks like: - -.json -==== -[{"username":"[email protected]"},{"username":"[email protected]"}] -==== - -Response codes: - - - 200: The user name list was successfully retrieved - - 500: Internal error while retrieving the users - -== Administrating user mailboxes - -=== Creating a mailbox - -.bash -==== -curl -XPUT http://ip:port/users/usernameToBeUsed/mailboxes/mailboxNameToBeCreated -==== - -Resource name usernameToBeUsed should be an existing user -Resource name mailboxNameToBeCreated should not be empty, nor contain # & % * characters. - -Response codes: - - - 204: The mailbox now exists on the server - - 400: Invalid mailbox name - - 404: The user name does not exist - - 500: Internal error - - To create nested mailboxes, for instance a work mailbox inside the INBOX mailbox, people should use the . separator. The sample query is: - - .bash - ==== - curl -XDELETE http://ip:port/users/usernameToBeUsed/mailboxes/INBOX.work - ==== - -=== Deleting a mailbox and its children - -.bash -==== -curl -XDELETE http://ip:port/users/usernameToBeUsed/mailboxes/mailboxNameToBeCreated -==== - -Resource name usernameToBeUsed should be an existing user -Resource name mailboxNameToBeCreated should not be empty - -Response codes: - - - 204: The mailbox now does not exist on the server - - 400: Invalid mailbox name - - 404: The user name does not exist - - 500: Internal error - -=== Testing existence of a mailbox - -.bash -==== -curl -XGET http://ip:port/users/usernameToBeUsed/mailboxes/mailboxNameToBeCreated -==== - -Resource name usernameToBeUsed should be an existing user -Resource name mailboxNameToBeCreated should not be empty - -Response codes: - - - 204: The mailbox exists - - 400: Invalid mailbox name - - 404: The user name does not exist, the mailbox does not exist - - 500: Internal error - -=== Listing user mailboxes - -.bash -==== -curl -XGET http://ip:port/users/usernameToBeUsed/mailboxes -==== - -The answer looks like: - -.json -==== -[{"mailboxName":"INBOX"},{"mailboxName":"outbox"}] -==== - -Resource name usernameToBeUsed should be an existing user - -Response codes: - - - 200: The mailboxes list was successfully retrieved - - 404: The user name does not exist - - 500: Internal error - -=== Deleting user mailboxes - -.bash -==== -curl -XDELETE http://ip:port/users/usernameToBeUsed/mailboxes -==== - -Resource name usernameToBeUsed should be an existing user - -Response codes: - - - 204: The user do not have mailboxes anymore - - 404: The user name does not exist - - 500: Internal error - -== Administrating quotas - -A quota with a value of -1 means unlimited - -=== Reading per quotaroot mail count limitation - -.bash -==== -curl -XGET http://ip:port/quota/count -==== - -The answer looks like: - -.json -==== -100000 -==== - -Response codes: - - 200: Nothing special - - 500: Internal error - -=== Updating per quotaroot mail count limitation - -.bash -==== -curl -XPUT http://ip:port/quota/count -d '1024000000' -==== - -Response codes: - - - 204: Value updated - - 400: The body is not a positive integer - - 500: Internal error - -=== Removing per quotaroot mail count limitation - -It removes the limitation, and the quota becomes UNILIMITED. - -.bash -==== -curl -XPUT http://ip:port/quota/count -d '1024000000' -==== - -Response codes: - - - 204: Value updated to UNLIMITED - - 500: Internal error - -=== Reading per quotaroot size limitation - -.bash -==== -curl -XGET http://ip:port/quota/size -==== - -The answer looks like: - -.json -==== -100000 -==== - -It represent the allowed Byte count of the mailboxes belonging to this quotaroot. - -Response codes: - - - 200: Nothing special - - 500: Internal error - -=== Updating per quotaroot size limitation - -.bash -==== -curl -XPUT http://ip:port/quota/size -d '1024000000' -==== - -Response codes: - - - 204: Value updated - - 400: The body is not a positive integer - - 500: Internal error - -=== Removing per quotaroot size limitation - -It removes the limitation, and the quota becomes UNILIMITED. - -.bash -==== -curl -XPUT http://ip:port/quota/size -d '1024000000' -==== - -Response codes: - - - 204: Value updated to UNLIMITED - - 500: Internal error - -=== Managing count and size at the same time - -.bash -==== -curl -XGET http://ip:port/quota/ -==== - -Will return: - -.json -==== -{"count":52,"size":42} -==== - -Response codes: - - - 200: Success - - 500: Internal error - -You can also write the value the same way: - -.bash -==== -curl -XPUT http://ip:port/quota/ -d '{"count":52,"size":42}' -==== - -Response codes: - - - 204: Success - - 400: Invalid JSON, or numbers are less than -1. - - 500: Internal error \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
