Change a device password
Change the localadmin password for one or more devices in the system.
Request
Security
| Any | Super User | System Admin | Security Admin | Operator |
|---|---|---|---|---|
| superUser | systemAdmin |
HTTP method
POST /manager/api/{apiResponseType}/1.0/changeDevicePassword.adm HTTP/1.1
Host:{manager.dsnet}
deviceId={device1}&deviceId={device2}&oldPassword={oldPass}&newPassword={newPass}8&confirmPassword={newPass}
Curl method
curl -u {admin}:{password} -k
“https://{manager.dsnet}/manager/api/{apiResponseType}/1.0/changeDevicePassword.adm” -d “
deviceId={device1}&deviceId={device2}&oldPassword={oldPass}&newPassword={newPass}8&confirmPassword={newPass}”
Parameters
| Parameter | Type | Usage | Default | Description |
|---|---|---|---|---|
| deviceId | Set[{deviceId}] | Required |
IDs for devices on which to change localadmin password. |
|
| oldPassword | String | Required |
Current localadmin password on devices. |
|
| newPassword | String | Required |
New password to set for localadmin on devices. |
|
| confirmPassword | String | Required |
New password to confirm for localadmin on devices. |
Response
Returns success or failure status.
JSON response full success example
Default JSON success or failure response that is shown in Default JSON success response and Default JSON failure response.
JSON response partial success example
{
“responseStatus”: “fail”,
“responseHeader”: {
“now”: 1399574761168,
“requestId”: “U2vQ58CoDkMAACkJCGAAAAAT”,
“status”: “fail”
},
“responseData”: {
“devices”: [
{
“id”: 1,
“status”: “success”
},
{
“id”: 2,
“status”: “success”
},
{
“code”: 5,
“id”: 3,
“message”: “Current password is incorrect”,
“status”: “error”
},
{
“code”: 5,
“id”: 4,
“message”: “Current password is incorrect”,
“status”: “error”
}
]
}
}JSON response failure example invalid fields
{
“responseStatus”: “fail”,
“responseHeader”: {
“status”: “fail”,
“now”: 1399574771489,
“requestId”: “U2vQ88CoDkMAACkKB84AAABJ”
},
“responseData”: {
“errors”: [
{
“field”: “deviceId”,
“message”: “Please select one or more devices”,
“code”: “deviceId.empty”
},
{
“field”: “oldPassword”,
“message”: “Please enter the devices' current localadmin
password”,
“code”: “oldPassword.empty”
},
{
“field”: “newPassword”,
“message”: “Please enter the devices' new localadmin password”,
“code”: “newPassword.empty”
},
{
“field”: “confirmPassword”,
“message”: “Please enter a confirm password for this account”,
“code”: “confirmPassword.empty”
}
]
}
}Parameters
| Parameter | Type | Description |
|---|---|---|
| devices | array |
List of devices. |
| code | Integer |
Status code when an error is encountered. |
| id | Long |
Device ID. |
| message | String |
Text that is shown to the user when password reset fails. |
| status | String |
Status of request, either success or error. |
| errors | array |
List of fields that were improperly provided. |
| field | String |
Field with bad data that is entered into it. |
| message | String |
Text that is shown to the user when field has improper data. |
| code | String |
Text to identify error. |