Premium APIsDevice DiagnosticsAPI EndpointsDiagnostics Factory Reset

API Reference

Perform a Factory Reset or Reboot a Device

POST /devices/actions/restart

Performs a device reboot or a factory reset on the modem portion of the device.

Uses and Requirements

This API is available to all customers with LwM2M certified devices with a bundle SKU.

This API uses a list of device identifiers (for example, MDNs, MSISDNs, or IMEIs or ICCIDs) and the option to either reboot or factory reset the device.

The API returns three callbacks after a synchronous response that includes the transaction ID:

  1. When the LwM2M gateway receives and queues the command for transmission. The callback includes a timestamp that records the event.
  2. When the LwM2M gateway transmits the command to the device. The callback includes a timestamp that records the event.
  3. When the device completes the operation and re-registers with the LwM2M server. The callback includes a timestamp that records the event.

Request Components

HTTP Request

POST https://thingspace.verizon.com/api/diagnostics/v1/devices/actions/restart}

Resource Path and Query Parameters

None

Header Parameters

The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token, and must set the content-type to JSON.

Parameter NameData TypeDescription
Authorization requiredstringHTTP Authorization bearer token.
VZ-M2M-Token requiredstringA valid session token returned by POST /session/login.
Content-Type requiredstringMust be application/json.

Request Body

Parameter NameData TypeDescription
accountName requiredstringThe name of the account. An account name is usually numeric, and must include any leading zeros.
devices requiredarray of devices objectsThe devices for which you want to perform a factory reset or reboot.
device.id requiredstringA device identifier value.
device.kind requiredstringType of identifier: IMEI ESN MEID
action requiredstringThe action you want to take on the device. For example, “factory_reset” or “reboot”.

Example Request Body

POST /diagnostics/v1/devices/actions/restart

{
   "accountName":"0642233522-00003",
   "action":"reboot",
   "devices":[{
      "id":"355154080648401",
      "kind":"IMEI"

    }
  ]
}

Success Responses

Status 200

Parameter NameData TypeDescription
createdOn requiredstring($date-time)The date and time of when this request was created.
transactionID requiredstringThe transaction ID of the diagnostics service that you started.
status requiredstringStatus of the request.

Example Success Response

{
    "createdOn": "2019-09-10T19:05:33.330579352Z",
    "transactionID": "9c7bb124-11f5-4ff3-8a88-0eec1ba99205",
    "status": "FACTORY_RESET_PENDING"
}

Asynchronous Callback

Parameter NameData TypeDescription
accountNamestringThe name of the account for which you are running Diagnostic Services. An account name is usually numeric, and must include any leading zeros.
actionstringThe action you took on the device.
action.namestringThe name of the action you requested.
action.statusstringThe status of the action you requested. Valid values include: FACTORY_RESET_PENDING FACTORY_RESET_QUEUED FACTORY_RESET_INPROGRESS FACTORY_RESET_SUCCESS FACTORY_RESET_FAILURE REBOOT_PENDING REBOOT_QUEUED REBOOT_INPROGRESS REBOOT_SUCCESS REBOOT_FAILURE
action.updatedOnstring($date-time)The date and time the status was updated.
createdOnstring($date-time)The date and time when this request was created.
devicearray of objectsThe device on which you are performing a factory reset or a reboot.
device.idstringA device identifier value.
device.kindstringType of identifier: IMEI ESN MEID
errorstringThe error code and error message.
transactionIDstringThe transaction ID of the device that you rebooted or performed a factory reset.

Example Callback

{
   "accountName":"0642233522-00003",
   "action": {
      "name":"factory_reset",
      "status":"FACTORY_RESET_INPROGRESS",
      "updatedOn":"2020-02-21T20:54:16.263Z"
   },
   "createdOn":"2020-02-21T20:54:16.263Z",
   "device":{
      "id":"355154080648401",
      "kind":"IMEI"
   },
   "error":{
       "errorCode": "",
       "errorMessage": ""
   },
   "transactionID":"7c2d1d71-0b50-4d8a-ab13-aeb733d5e909"
}

Example Callback with an error

{  
     "accountName":"0642233522-00003",
     "action":{
       "name":"reboot",
       "status":"REBOOT_FAILURE",
       "updatedOn":"2020-02-21T20:54:16:263z"
     },
     "device":{
        "id":355154080648401,
        "kind":"IMEI"
     },
     "error":{
              "errorCode":"INTERNAL_SYSTEM_ERROR",
              "errorMessage":"9000, Internal system error"
    },
    "transactionID":"7c2d1d71-0b50-4d8a-ab13-aeb733d5e909"
}

Failure Responses

Status 400 All error messages are returned in this format:

{
  "errorCode": "error code string",
  "errorMessage": "error message string"
}

On this page