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/me
POST /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 Content
POST /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:
none
login_only
all
- 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 Content
GET /user/me/settings
POST /user/me/settings
204 No Content
GET /user/me/settings/:key
POST /user/me/settings/:key
204 No Content
DELETE /user/me/settings/:key
204 No Content
GET /user/me/token
POST /user/me/token
GET /user/me/token/:token_name
DELETE /user/me/token/:token_name
204 No Content
GET /user/:target_user_id_or_email
POST /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 Content
POST /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 Content
DELETE /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:
none
login_only
all
- 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 Content
GET /user
POST /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/token
GET /user/:target_user_id_or_email/token/:token_name
DELETE /user/:target_user_id_or_email/token/:token_name
204 No Content
Copyright 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/.