Accounts-accountId-users-userName:PUT

From Hostway API Documentation
Jump to: navigation, search

PUT /accounts/{accountId}/users/{userName}

Modify the password and/or security question/answer of a user

Contents


Request

PUT /accounts/{accountId}/users/{userName}

Request Parameters

accountId
The ID of the account
userName
The username of the user

URI Parameters

None

Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.

= Request Body

{
  "userName": "{userName}",
  "password": "{password}",
  "securityQuestion": "{securityQuestionCode}",
  "securityAnswer": "{securityAnswer}"
}
 

Parameters

userName
Required. A name for the user that's about to be created. This needs to be unique within the entire security realm (not just within the account).
password
Required only if securityQuestion and securityAnswer were not provided. A password for the user. This needs to be between 8 and 50 characters long inclusive, must contain at least one alpha and at least one numeric character, and must not contain any of the following characters: & ` ' " \ / < > $
securityQuestionCode
Required if password was not provided. The reference code for a question that the user can use to recover the password in case (s)he forgot it. This must be selected from a pre-approved list of questions. If securityQuestion was provided, a securityAnswer must also be provided.
securityAnswer
Required if password was not provided. An answer to the security question. If the user provides the correct answer during password recovery, the password will be reset and (s)he will be allowed to access the account. If securityAnswer was provided, a securityQuestion must also be provided. The API will automatically normalize the security answer by removing starting and ending spaces, lowercase the security answer and replace each sequence of whitespaces with just one single space character.

Response

Status Code

204 No Content
The user was successfully updated
400 Bad Request
The request body was missing a required field or one of the fields did not comply with the requirements (in this case, the response body will contain hints for what went wrong)
401 Unauthorized
Authentication failed
403 Forbidden
Authentication succeeded, but the authenticated user is not allowed to view this user resource. The only authenticated users allowed to view this user resource are this very user, the account owner(s) of this account, and sales/support agents, the user which authorization credentials match the requested user's credentials. An account owner is a user within the account that has the role "sitecontrol_account_owner".
404 Not Found
Either the account or user does not exist

Response Headers

None

Response Body

None

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox