Wiki

Clone wiki

Numera.LibrisAPI / identity.update

Home > API Reference Documentation > identity.update

identity.update

The identity.update action is used to update an existing user identity. You should include the parameters for the information you actually want to update, so if you don't want to update the person's email address or profile information, then do not send those items. We have to make a service call into the identity platform for those changes, so you can increase performance if you don't need to update that information. This will only work for users with the role of Agent Supervisor or above.

Input Parameters

PropertyRequiredDescription
account_idyesThe account_id of the user to change
provider_loginnoIf the provider is Numera.NIS and you want to change the login the user uses
rolenoA new role for the user
realmnoA new realm for the user
emailnoIf you want to update the user's email address
secretnoIf you want to update the user's secret (only SUPERUSERs can do this)
first_namenoIf you want to update the first name
last_namenoIf you want to update the last name
countrynoIf you want to update the country
culturenoIf you want to update the culture
date_of_birthnoIf you want to update the DOB, expects a string as YYYYMMDD
timezonenoIf you want to update the timezone

Output

If everything worked successfully, the result object will have an identity object (documented here) filled out completely reflecting the changes. In addition, it may contain the following items reporting all the work that was done on behalf of this update action:

PropertyDescription
updated_profile_apiIf you updated profile information, this reports the changes were saved successfully in the identity platform
updated_profile_librisIf you updated profile information, this reports the changes were saved successfully in the platform
updated_emailIf you updated the email address, this reports the success
updated_login_apiIf you updated the login, this reports the changes were saved successfully in the identity platform
updated_login_librisIf you updated the login, this reports the changes were saved successfully in the platform
updated_realmIf you updated the realm, this reports the changes were saved successfully in the platform
updated_roleIf you updated the role, this reports the changes were saved successfully in the platform
updated_login_secretIf you updated the secret, this reports the changes were saved successfully in the platform

If there is a failure, the result object may contain more information (in a attempted_on_exception property) detailing where it failed in the chain. The properties detailed above will give you some idea of how much of what you asked for was completed since there are many systems involved, but you will also see other information:

ValueDescription
UPDATE_SECRETAttempting to update the secret
UPDATE_ROLEAttempting to update the role
UPDATE_REALMAttempting to update the realm
UPDATE_LOGINAttempting to update the login
UPDATE_PROFILEAttempting to update the profile
UPDATE_EMAILAttempting to update the email
LOAD_PROFILEAttempting to re-load the profile after an update
SAVE_PROFILEAttempting to save the updated profile

Possible Status Codes

Status CodeReasonDescription
1000NOT_IN_REALMIf the current user is not a Superuser, and their realm does not match the realm of the user they are trying to update, then the request will fail.
1001API_EXCEPTIONThe api_status_code, api_reason property of the result object will contain the code returned by Numera.Net if there was some type of API exception, if there was an http issue, the http_response_code will have the status code
1003INVALID_USERWe could not locate a user with the account_id you provided
1004ROLE_OUT_OF_BOUNDSYou tried to give a user a role you don't have the privilege to grant
1005INVALID_PROVIDERYou can't update the login for a non-Numera.NIS account
1006DUPLICATE_EMAILThe email you are trying to update to already exists for another user
1007SECRET_UPDATE_RESTRICTEDUser does not have permissions to update the secret

Updated