Datacenter build and management service
https://github.com/joyent/conch-api/blob/master/lib/Conch/Route/User.pm
Sets up the routes for /user.
All routes require authentication.
GET /user/mePOST /user/me?send_mail=<1|0>Optionally take the query parameter send_mail (defaults to 1) to send
an email telling the user their account was updated.
204 No Content, plus Location headerPOST /user/me/revoke?send_mail=<1|0>&login_only=<0|1>&api_only=<0|1>Optionally accepts the following query parameters:
send_mail=<1|0> (default 1) - send an email telling the user their tokens were revokedlogin_only=<0|1> (default 0) - revoke only login/session tokensapi_only=<0|1> (default 0) - revoke only API tokensBy default it will revoke both login/session and API tokens.
api_only and login_only cannot both be 1.
204 No ContentPOST /user/me/password?clear_tokens=<login_only|none|all>Optionally takes a query parameter clear_tokens, to also revoke the session
tokens for the user, forcing the user to log in again. Possible options are:
nonelogin_onlyall - clear all tokens (login and api - affects all APIs and tools)If the clear_tokens parameter is set to none then the user session will remain;
otherwise, the user is logged out.
204 No ContentGET /user/me/settingsPOST /user/me/settings204 No ContentGET /user/me/settings/:keyPOST /user/me/settings/:key204 No ContentDELETE /user/me/settings/:key204 No ContentGET /user/me/tokenPOST /user/me/tokenGET /user/me/token/:token_nameDELETE /user/me/token/:token_name204 No ContentGET /user/:target_user_id_or_emailPOST /user/:target_user_id_or_email?send_mail=<1|0>Optionally take the query parameter send_mail (defaults to 1) to send
an email telling the user their account was updated.
204 No Content, plus Location headerDELETE /user/:target_user_id_or_email?clear_tokens=<1|0>When a user is deleted, all role entries (build, organization) are removed and are unrecoverable.
Optionally takes a query parameter clear_tokens (defaults to 1), to also
revoke all session tokens for the user forcing all tools to log in again.
204 No ContentPOST /user/:target_user_id_or_email/revoke?login_only=<0|1>&api_only=<0|1>Optionally accepts the following query parameters:
login_only=<0|1> (default 0) - revoke only login/session tokensapi_only=<0|1> (default 0) - revoke only API tokensBy default it will revoke both login/session and API tokens. If both
api_only and login_only cannot both be 1.
204 No ContentDELETE /user/:target_user_id_or_email/password?clear_tokens=<login_only|none|all>&send_mail=<1|0>Optionally accepts the following query parameters:
clear_tokens (default login_only) to also revoke tokens for the user, takes the following possible values:
nonelogin_onlyall - clear all tokens (login and api - affects all APIs and tools)send_mail which takes <1|0> (defaults to 1) to send an email to the user with password reset instructions.
204 No ContentGET /userPOST /user?send_mail=<1|0>Optionally takes a query parameter, send_mail (defaults to 1) to send an
email to the user with the new password.
GET /user/:target_user_id_or_email/tokenGET /user/:target_user_id_or_email/token/:token_nameDELETE /user/:target_user_id_or_email/token/:token_name204 No ContentCopyright Joyent, Inc.
This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://www.mozilla.org/en-US/MPL/2.0/.