Update mode password NEW!
Sets, removes or checks the optional password of the update mode. The password protects the factory reset performed from the update mode, which removes the device administrators.
Available only on version V7.
POST /recovery_password.fcgi
Requires an administrator session. With any other access level, the call returns the error "Invalid access level for command recovery_password".
The action depends on the parameters sent:
- With password: sets or changes the password.
- Without password and with enabled set to
false: removes the password. - With neither: only checks whether a password is set.
If both parameters are sent, password takes precedence.
Parameters
- password (string): Optional. New update mode password. Must have exactly 6 numeric digits and cannot be
001818. Otherwise, the call returns the error "Invalid recovery password (6 digits expected)". - enabled (bool): Optional. Only
falseis accepted, which removes the password. To enable the password, use password. Any other value returns the error "Invalid enabled (only false is accepted, use password to enable)". Removing when no password is set does not return an error.
Response
- enabled (bool):
trueif an update mode password is set on the device, after the operation.
The password is never returned by the API nor written to the audit log.
Request example
Setting the password:
$.ajax({
url: "/recovery_password.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({
password: "482913"
})
});
Removing the password:
$.ajax({
url: "/recovery_password.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({
enabled: false
})
});
Checking whether a password is set:
$.ajax({
url: "/recovery_password.fcgi?session=" + session,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({})
});
Response example
{
"enabled": true
}