To change your own password, you can either use the web interface of TestEngine or send a request to the TestEngine API using curl, ReadyAPI, or any other similar tool.
Using API
Use the following operation:
PUT http:///api/v1/users/{username}
Authentication
Basic authentication by a TestEngine user.
Note: |
As a non-admin user, you will be able to change only your own password. |
Headers
Content-Type: application/json
Body
A JSON body that specifies the new password:
{
"password" : "string"
}
See details on SwaggerHub.
Example
ExampleHide example
Use the following command line:
curl -u "user:currentPassword" -X PUT "http://localhost:8080/api/v1/users/{username}" -H "Content-Type: application/json" -d "{\"password\":\"newPassword\"}"
In this example:
-u user:currentPassword
Authenticates the request with the user’s credentials.
-X PUT
Specifies the PUT method.
"http://localhost:8080/api/v1/users/{username}"
The endpoint of the request.
-H "Content-Type: application/json"
The content type of the body.
-d "{\"password\":\"newPassword\"}"
A JSON string that specifies the new password.
-
Create a project by using the TestEngine API definition. See Creating Project From OpenAPI/Swagger Definition to learn how to do it.
-
Select the PUT request to the /api/v1/users/{username} resource:
Click the image to enlarge it.
-
Enter the username in the Value field of the username parameter:
-
Enter the new password in a JSON body:
{
"password" : "string",
}
-
Open the Auth panel.
-
Select the Basic (Built-in) authorization type.
-
Specify the username and the current password and select the Authenticate pre-emptively option:
Click the image to enlarge it.
-
Send the request:
Click the image to enlarge it.
Using Web UI
-
Open the user menu and select Change password:
Click the image to enlarge it.
– or –
Go to the account settings page:
http://<testengine-host>:<port>/account
For example, if TestEngine is installed on your local machine and you run it on the default port, use the following link:
-
On the Account page, enter the current and new passwords, confirm the new password, and click Save Changes:
Click the image to enlarge it.
Tip: |
Click to reveal the password. |
The address and port of your TestEngine installation.
See Also
Manage Users