Update User
POST/updateUser
This method updates a specific "user" record in SSM, based on the input parameter username
of the relevant user.
All the input parameters it requires are attributes which could be updated for the relevant user record. The attributes which are supplied with valid values as input to the method, will get updated, if the operation is successfully executed.
The Authorization
must have Bearer
followed by Token
.
Mandatory params:
username
OR
propertytosearch
Note - If both params are passed, propertytosearch will take precedence.
Optional params:
validateagainstpolicy
- Values: Y/N, default is Y. Checks for the password policy,
allowpastdate
- true / false (default). If true, allows startdate to be less than current date,
statuskey
- Values:1/0, 0 - Inactive, 1 - Active,
updatedusername
- update username,
User params
like
firstname,
preferedFirstName,
lastname,
middlename,
street,
city,
comments,
statuskey,
startdate(MM-dd-yyyy),
enddate(MM-dd-yyyy),
manager (manager username),
password,
location,
jobCode,
jobDescription,
employeeType,
systemUserName,
departmentNumber,
title,
state,
companyname,
costcenter,
departmentname,
employeeclass,
entity,
jobcodedesc,
locationdesc,
locationnumber,
siteid,
orgunitid,
region,
regioncode,
owner,
employeeid,
lastsyncdate,
createdate,
email,
phonenumber,
job_function,
country,
displayname,
enabled(can be "1"/"true" or "0"/"false"),
passwordExpired(can be "1"/"true" or "0"/"false"),
accountExpired(can be "1"/"true" or "0"/"false"),
accountLocked(can be "1"/"true" or "0"/"false"),
secondaryManager,
createdBy,
termDate,
vendorManager,
secondaryPhone,
secondaryEmail,
customproperty<1-50>,
hcp<1-5>,
ecp<1-5>,
customer(pass the organization name),
securityQuestions
-
Example: "securityQuestions":[ { "securityQuestion":"What is your first Pet's name?", "securityAnswer":"kitty" }, { "securityQuestion":"What is your favorite food?", "securityAnswer":"food" } ],
checkrules
- true/ false (default : true), if true, then rules will be evaluated immediately, if false rules will be evaluated by a job. If checkrulesforapi configuration(true/false/null) is set in the configuration table, then it will take precendence over checkrules parameter.
inlineruleevaluation
- true/ false (default is true), if true then rules will be evaluated immediately, if false rules will be evaluated by a job.
Note - UpdateUser API will not invoke workflow based on the User Modification Workflow configuration. Please use updateUserRequest API instead.
Note - Both checkrules
and inlineruleevaluation
need to be set as true for the user update rules to be evaluated immediately.
batchidentifier
- When inlineruleevaluation=false, this Rule Run Unique Identifier can be set and user update rules can be processed later by calling /api/processrules API
Note - This API supports PUT HTTP method along with POST.
It's highly recommended to pass inlineruleevaluation:"false" for bulk load and call processrules api to evaluate and run the rules after the load is done.
Request
- application/json
Body
Responses
- 200
Update User / Update User - Inactive Manager / Update User - propertytosearch param
Response Headers
Access-Control-Allow-Credentials
string
Access-Control-Allow-Origin
string
Cache-Control
string
Date
string
Expires
string
Referrer-Policy
string
Server
string
Set-Cookie
string
Strict-Transport-Security
string
X-Content-Type-Options
string
X-Frame-Options
string
- application/json
- Schema
- Example (from schema)
- Update User
- Update User - Inactive Manager
- Update User - propertytosearch param
Schema
{
"errorCode": "0",
"message": "SUCCESS User Updated Successfully"
}
{
"errorCode": "0",
"message": "SUCCESS User Updated Successfully"
}
{
"errorCode": "0",
"message": " manager with username A007825 is inactive. User Updated Successfully"
}
{
"errorCode": "0",
"message": " User Updated Successfully"
}