Skip to main content

Get password

The endpoint provides functionality to get a password for an existing user.

HTTP request

GET https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId/password

Parameters

ParameterInTypeRequired / OptionalDescription
instanceIdpathstringrequiredThe ID of your Identity Cloud instance
userIdpathstringrequiredThe ID of the user

Example request

Set the ID of the user.

userId=your-user-id-123
curl --request GET "https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId/password" \
--header "Authorization: Bearer $accessKey"

HTTP response

On success

HTTP/1.1 200 is returned if the password is found.

ParameterTypeDescription
stateNameenumThe state of the password Default: active Values: active,initial, temporaryLocked
lastSuccessfulLoginDatestringTimestamp of last successful login
successfulLoginCountintegerCounts successful logins with this credential since last initialization or reset
lastFailedLoginDatestringDate of last non-technical login failure, for example, wrong password
failedLoginCountintegerCounts non-technical login failures since the last successful login, initialization or reset
createdstringThe date of the password creation
lastModifiedstringDate when the password was last modified
modificationCommentstringTextual comment regarding the last modification
versionintegerThe version of the password, used for optimistic locking
lastChangeDatestringDate when the password was changed last time
userIdstringThe ID of the user to whom the password belongs to

Example response

{
"created": "2023-03-22T14:20:36Z",
"lastModified": "2023-03-22T14:20:36Z",
"version": 1,
"lastChangeDate": "2023-03-22T14:20:36Z",
"userId": "4a5e7346-488b-46f9-914f-79ddb1131e0ba",
"stateName": "active",
"lastSuccessfulLoginDate": "2023-03-22T14:23:24Z",
"successfulLoginCount": 1,
"lastFailedLoginDate": "2023-03-22T14:20:57Z",
"failedLoginCount": 0
}

On missing credential

HTTP/1.1 404 is returned if no user is found with the given userId or user has no password.

Example response

note

The referred extId field in the response equals the userId.

User has no password credential

{
"code": "errors.noRecord",
"message": "User with extId 4a5e7346-488b-46f9-914f-79ddb1131e0ba has no Password credential"
}

User is not found

{
"errors": [
{
"code": "errors.noRecord",
"message": "A user with extId 4a5e7346-488b-46f9-914f-79ddb1131e0ba doesn't exist on client with name Client-users"
}
]
}

On failure

HTTP/1.1 401 is returned if the authorization fails due to an invalid access key.

HTTP/1.1 500 is returned if an unexpected error occurs.