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:
- When the LwM2M gateway receives and queues the command for transmission. The callback includes a timestamp that records the event.
- When the LwM2M gateway transmits the command to the device. The callback includes a timestamp that records the event.
- 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 Name | Data Type | Description |
|---|---|---|
| Authorization required | string | HTTP Authorization bearer token. |
| VZ-M2M-Token required | string | A valid session token returned by POST /session/login. |
| Content-Type required | string | Must be application/json. |
Request Body
| Parameter Name | Data Type | Description |
|---|---|---|
| accountName required | string | The name of the account. An account name is usually numeric, and must include any leading zeros. |
| devices required | array of devices objects | The devices for which you want to perform a factory reset or reboot. |
| device.id required | string | A device identifier value. |
| device.kind required | string | Type of identifier: IMEI ESN MEID |
| action required | string | The 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 Name | Data Type | Description |
|---|---|---|
| createdOn required | string($date-time) | The date and time of when this request was created. |
| transactionID required | string | The transaction ID of the diagnostics service that you started. |
| status required | string | Status 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 Name | Data Type | Description |
|---|---|---|
| accountName | string | The name of the account for which you are running Diagnostic Services. An account name is usually numeric, and must include any leading zeros. |
| action | string | The action you took on the device. |
| action.name | string | The name of the action you requested. |
| action.status | string | The 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.updatedOn | string($date-time) | The date and time the status was updated. |
| createdOn | string($date-time) | The date and time when this request was created. |
| device | array of objects | The device on which you are performing a factory reset or a reboot. |
| device.id | string | A device identifier value. |
| device.kind | string | Type of identifier: IMEI ESN MEID |
| error | string | The error code and error message. |
| transactionID | string | The 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"
}
