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
Parameter | In | Type | Required / Optional | Description |
---|---|---|---|---|
instanceId | path | string | required | The ID of your Identity Cloud instance |
userId | path | string | required | The 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.
Parameter | Type | Description |
---|---|---|
stateName | enum | The state of the password Default: active Values: active ,initial , temporaryLocked |
lastSuccessfulLoginDate | string | Timestamp of last successful login |
successfulLoginCount | integer | Counts successful logins with this credential since last initialization or reset |
lastFailedLoginDate | string | Date of last non-technical login failure, for example, wrong password |
failedLoginCount | integer | Counts non-technical login failures since the last successful login, initialization or reset |
created | string | The date of the password creation |
lastModified | string | Date when the password was last modified |
modificationComment | string | Textual comment regarding the last modification |
version | integer | The version of the password, used for optimistic locking |
lastChangeDate | string | Date when the password was changed last time |
userId | string | The 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.