Datacenter build and management service
Conch::Route::User
Sets up the routes for /user:
Unless otherwise noted, all routes require authentication.
GET /user/mePOST /user/me/revoke?send_mail=<1|0>& login_only=<0|1> or ?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. If both
api_only and login_only are set, no tokens will be revoked.
204 NO CONTENTPOST /user/me/password?clear_tokens=<login_only|0|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:
0, no, falselogin_only, 1 (default, for backcompat, 1 is treated as login_only)all - also affects all API tokens (and thus other tools).If the clear_tokens parameter is set to 0, no, false then
204 NO CONTENT will be returned but the user session will remain..
204 NO CONTENT (The user session is terminated).GET /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=<1|0> (default 1) - send
an email telling the user their tokens were revoked
DELETE /user/:target_user_id_or_email?clear_tokens=<1|0>When a user is deleted all workspace permissions 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> or ?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 are set, no tokens will be revoked.
204 NO CONTENTDELETE /user/:target_user_id_or_email/password?clear_tokens=<login_only|0|all>&send_password_reset_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
0, no, falselogin_only, 1 (default, for backcompat, 1 is treated as login_only)all - also affects all API tokens (and thus other tools).send_password_reset_mail which takes <1|0> (default 1). If set to 1 this will cause an email to be sent 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 http://mozilla.org/MPL/2.0/.