Knowledge base
Tips and tricks Best practice guides, FAQ & more
Find tutorials, guides and use case examples in the
Learning centerhttp://{controllerMachine}:{controllerPort}/api/v4/user/password/{userId}
Field |
Type |
Description |
Comment |
accessKey |
string |
An access key is required to restrict unauthorized access to the API. |
Access Key should include user scope to access user related APIs. |
userId |
string |
Unique identifier for the user |
Can be obtained from the Get All Users endpoint with UserType as “Leapwork” |
requestBody |
application/json |
Unique identifiers for the Leapwork User comprising the following parameters: |
|
|
|
Password |
Password should meet password complexity security policy |
|
|
ForceChangePasswordOnFirstLogin |
Possible values: true| false |
curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'accessKey: UsctfG8Mg1LVa29L' -d '{ \
"Password": "Newpassword%40123", \
"ForceChangePasswordOnFirstLogin": true \
}' 'http://localhost:9001/api/v4/user/password/3940e00a-164c-4693-be0b-14ff4746c4a6'
$headers = @{}
$headers.Add("accessKey","UsctfG8Mg1LVa29L")
$requestBody = @'
{
"Password": "Newpassword%40123",
"ForceChangePasswordOnFirstLogin": true
}
'@
Invoke-WebRequest -Uri "http://localhost:9001/api/v4/user/password/3940e00a-164c-4693-be0b-14ff4746c4a6" -ContentType "application/json" -Headers $headers -Method PUT -Body $requestBody
Update password and returns true for successful operation completion in the response.
{
"$id": "1",
"OperationCompleted": true
}
Field |
Type |
Description |
Values |
$id |
string |
ID of internal object |
|
OperationCompleted |
bool |
Returns ‘true’ if the user’s password is changed successfully |
true | false |
©2024, Leapwork. All rights reserved.