requestFactoryReset
Request a factory reset for a device.
requestFactoryReset(deviceId: ID!, mode: FactoryResetRequestState!): Device!
What this mutation does
- Validates that the device exists.
- Validates that there is no reset already pending (
shouldBeResetmust beIDLE). - Creates a new device configuration from the current software version template.
- Updates the device reset state to the selected mode (
PARTIALorTOTAL). - Writes a
FACTORY_RESET_REQUESTEDlog.
Arguments
deviceId(ID!): ID of the target device.mode(FactoryResetRequestState!): reset mode.
Permissions
Requires FACTORY_RESET_REQUEST.
Modes
PARTIAL: keeps the lastsystemOptions.simManagementandconnectivity.wifivalues.TOTAL: restores the full template values.
Example
mutation REQUEST_FACTORY_RESET($deviceId: ID!, $mode: FactoryResetRequestState!) {
requestFactoryReset(deviceId: $deviceId, mode: $mode) {
id
uniqueIdNumber
shouldBeReset
isConfigured
hasBeenAppliedByDeviceAt
lastDeviceConfig {
id
version
createdAt
}
}
}
{
"deviceId": "58d8f810-e641-4ea4-a3e3-cf5df49e81f5",
"mode": "PARTIAL"
}
Typical errors
Device <id> not found!A factory reset is already requested for this device.
Important
requestFactoryReset only requests the reset and prepares the configuration.
For third-party API users, this is the only mutation you need to call.