Changing a password

Ops Center Analyzer Detail View REST API Reference Guide

Version
11.0.x
Audience
anonymous
Part Number
MK-99ANA004-10

You can change the password of the local user. You cannot change the password of the Active Directory users.

HTTP request syntax (URI)

POST  baseURL/userapi.do?action=changePassword

Request payload is a JSON user object.

Request body

{
  "username":"",
  "password":""
}

Request example

POST /userapi.do?action=changePassword
Authorization: Basic <user authentication token>
{
  "username":"jonh.s",
  "password":"axCd2!43mn"
}

Request parameters

Parameter Type Description
username String User name of the normal user.

Up to 20 characters except <,>,[,]

password String Password for the user name.
  • Password must be a minimum of six characters, by default.
  • You cannot reuse the previous six passwords when resetting the password.
  • Password must not contain the user name string in it.
  • Password must contain one uppercase letter and one lowercase letter.
  • Password must contain one digit and one special character. The following special characters are supported: !, ~, `, @, #, $, %, ^, &, *, (, ), -, _, +, =.

Note: The password minimum requirements are not applicable for Active Directory users.

Response body

{
  "updated":{
    "john.s":"<auth_token>"
  }
}

Response example

{
  "updated":{
    "john.s":"<auth_token>"
  }
}

Return codes

Status code

Message

Description

400 BAD REQUEST Request URL or request body validation failed. Check the response body for details.
401 UNAUTHORIZED Supplied authentication token is invalid or does not have the appropriate credentials to access the resource.
404 NOT FOUND API server could not find a resource matching the request.
405 METHOD NOT ALLOWED Request HTTP method is not allowed for the operation.

Response codes

The following table lists the common API response codes that might be generated through the standard API. If an error response is not listed, examine the HTTP status codes to determine the best method for addressing the issue.

Response code Message Condition
C30100E0 HTTP method [GET] is not supported for action [changePassword] HTTP method is not POST.
C3010001 Authorization failed. Request is sent with an invalid authentication token.
C3040001 Invalid Authentication. User does not have admin rights.
C3010002 Invalid JSON Request. Specified JSON input is invalid.
C3010003 Mandatory parameter {username} is not specified Username is not specified in the parameter {username}.
C3010004 Invalid value specified for parameter {username}. Specified username is invalid.
C3010003 Mandatory parameter {password} is not specified. Password is not specified in the parameter {password}.
C3010004 Invalid value specified for parameter {password}. Specified password is invalid.
C3040007 Operation {changePassword} is not allowed for Active Directory users. Active directory user is specified in the parameter {changePassword}.
C3040009 Password did not meet the criteria. Specified password did not meet the criteria.
C3040006 User name that is specified in the parameter {username} does not exist. Specified username does not exist.