Conch API

Logo

Datacenter build and management service

View the Project on GitHub joyent/conch-api

NAME

Conch::Route::User

METHODS

routes

Sets up the routes for /user:

Unless otherwise noted, all routes require authentication.

GET /user/me

POST /user/me/revoke?send_mail=<1|0>& login_only=<0|1> or ?api_only=<0|1>

Optionally accepts the following query parameters:

By default it will revoke both login/session and API tokens. If both api_only and login_only are set, no tokens will be revoked.

POST /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:

If the clear_tokens parameter is set to 0, no, false then 204 NO CONTENT will be returned but the user session will remain..

GET /user/me/settings

POST /user/me/settings

GET /user/me/settings/:key

POST /user/me/settings/:key

DELETE /user/me/settings/:key

GET /user/me/token

POST /user/me/token

GET /user/me/token/:token_name

DELETE /user/me/token/:token_name

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=<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.

POST /user/:target_user_id_or_email/revoke?login_only=<0|1> or ?api_only=<0|1>

Optionally accepts the following query parameters:

By default it will revoke both login/session and API tokens. If both api_only and login_only are set, no tokens will be revoked.

DELETE /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:

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

LICENSING

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 http://mozilla.org/MPL/2.0/.