Setting the admin password

Use the following API to login as the admin.

POST /rest/v10.04/login?username=admin

A new session is started and a response code 268 is returned along with the message: "Session is restricted. Administrator password must be set before continuing."

NOTE:

This session is valid only to change the admin password and logout from the REST API UI. Any other request will return a Forbidden code (403).

Use the following API to change the admin password.

PUT /rest/v10.04/system/users/admin

```json

{

"password": "<enter the password>"

}

```

After the password is changed successfully, the session restriction is removed.