Monitor Device Reachability

Asynchronous Request for Monitoring Reachability and Loss-Of-Connectivity Status of the Devices Over a Duration:
POST /diagnostics/basic/devicereachability #

Contents

Uses and Requirements

The API can be used in bulk mode, i.e., multiple device identifiers can be supplied in the API request. The API allows specifying reachability for IP Data, SMS, and Loss of Connectivity in any combination in a single API request. The API also allows the application to specify the monitoring expiration time which could amount to up to 10 years (3650 days) of monitoring duration for a set of devices. The API first provides a synchronous (200 OK) response after which it sends an asynchronous callback confirming the registration of the monitoring request for the duration. This callback may contain the reachability status of the device only if the device is reachable. The calling application will get individual (per device) callbacks providing updates to the reachability status (as specified in the request) for the entire duration of monitoring. The expected frequency of such updates from a single device is dependent on the sleep mode timer settings for the device (using the worst-case assumption that the device does not initiate data itself).

Request

HTTP Request

POST https://thingspace.verizon.com/m2m/v1/diagnostics/basic/devicereachability

Query Parameters

None.

Header Parameters

Parameter Name Mandatory or Optional Data Type Description
Authorization Mandatory string HTTP Authorization bearer token.
VZ-M2M-Token Mandatory string A valid session token returned by POST /api/m2m/v1/session/login.
Content-Type Mandatory string Must be application/json.

Request Body

Parameter Name Mandatory or Optional Data Type Description
accountName Mandatory String The name of a billing account, which is usually in the format of 10 digits, a hyphen, and then five more digits. Must include any leading zeros.
devices Mandatory Array of device identifier objects Each object in the array identifies a device that you want to know reachability:
  • kind: the type of the identifier (IMEI, MDN, MSISDN, ICCID); Required for IoT devices; not needed for consumer devices.
  • id: a device identifier value; Required for IoT devices; not needed for consumer devices.
Note: the kind has to be the same across the list, mixed kind is not supported today.
requestType Mandatory Integer REACHABLE_FOR_DATA, REACHABLE_FOR_SMS, REACHABLE_FOR_DATA_SMS, LOSS_OF_CONNECTIVITY, REACHABLE_FOR_DATA_AND_LOSS, REACHABLE_FOR_SMS_AND_LOSS, REACHABLE_FOR_DATA_SMS_AND_LOSS
monitorExpirationTime Mandatory String

Identifies the absolute time at which the reachability request is considered to expire, from 6 months to 10 years.

The format should be aligned with RFC3339, example: “2017-12-19T16:39:57-08:00” (in UTC passed as String)

Minimum 6 months to 10 years Maximum (up to 3650 days, to be precise).

Example Request Body

{
  "accountName": "0242072320-00001",
  "requestType": "REACHABLE_FOR_DATA",
  "devices": [
    {
      "deviceIds": [
        {
          "id": "12016560696",
          "kind": "msisdn"
        },
      "deviceIds": [
        {
          "id": "89148111004292931234",
          "kind": "iccid"
        },
      ]
    }
  ],
  "monitorExpirationTime": "2019-12-02T15:00:00-08:00Z"
}

Success Response

Status 200

Success Response with the body of the response includes requestID that can be used to correlate the callbacks.

Parameter Name Mandatory or Optional Data Type Description
requestID Mandatory string

A unique string that associates the request with the reachability information that is sent in asynchronous callback message.

ThingSpace will send a separate callback message for each device that was in the request. All of the callback messages will have the same requestID (tansactionID).

Example Success Response

Status OK 200

{
  "requestId": "595f5c44-c31c-4552-8670-020a1545a84d"
}

Error response

Status 400

Failure Response with the body of the response includes errorResponse.

Parameter Name Mandatory or Optional Data Type Description
errorResponse Optional errorResponse object errorResponse object contains:
  • errorCode
  • errorMessage

Reachability Parameters

reachabilityReport CallBack Parameters

Parameter Name Mandatory or Optional Data Type Description
requestId Mandatory string

A unique string that associates the request with the reachability information that is sent in asynchronous callback message.

ThingSpace will send a separate callback message for each device that was in the request. All of the callback messages will have the same requestId.

deviceIds Mandatory Array of device identifier objects Only one object with {kind, id} where kind shall be same as the one in initial request from customer:
  • kind: the type of the identifier (IMEI, MDN, MSISDN, ICCID)
  • id: a device identifier value
status Mandatory String Success, Failed

diagnosticsResponse.deviceReachabilityResponse CallBack Parameters

Parameter Name Mandatory or Optional Data Type Description
deviceIdentifierCollection Optional Array of device identifier objects All the non-null device identifiers for the device:
  • kind: the type of the identifier (IMEI, MDN, MSISDN, ICCID)
  • id: a device identifier value
Only included in Initial Callback of registration of event
monitorId Optional String The ID of the registered monitor (UUID), which could be used by the customer when stopping the monitoring on this particular monitor.

This field is present only if status is SUCCESS.

accountName Mandatory String The name of a billing account, which is usually in the format of 10 digits, a hyphen, and then five more digits. Must include any leading zeros.
reportedTime Mandatory String

Identifies the absolute time at which the reachability report is received from SCEF.

The format should be aligned with RFC3339, example: “2017-12-19T16:39:57-08:00” (in UTC passed as String)

registrationType Optional String

EVENT_REGISTER_FOR_DATA EVENT_REGISTER_FOR_SMS EVENT_REGISTER_FOR_CONNECTION_LOSS

Only included in Initial Callback of registration of event

reason Optional String “Internal error”, “Device doesn’t belong to the account”

Only included if status is Failed

notificationReport Optional String REACHABLE_FOR_DATA REACHABLE_FOR_SMS LOSS_OF_CONNECTIVITY

Example Success Callback Responses

Register Success for DATA with callback (Device Sleeping):

{
  "username" : "user",
  "password" : "pwd",
  "requestId" : "7a110138-9532-400e-bdb9-29c1b7309446",
  "deviceIds" : [ {
    "id" : "89148001113852613236",
    "kind" : "ICCID"
  } ],
  "diagnosticsResponse" : {
    "deviceReachabilityResponse" : {
      "deviceIdentifierCollection" : [ {
        "id" : "865284098763723",
        "kind" : "IMEI"
      }, {
        "id" : "311270000033319",
        "kind" : "IMSI"
      }, {
        "id" : "6197823337",
        "kind" : "MDN"
      }, {
        "id" : "6194013229",
        "kind" : "MIN"
      }, {
        "id" : "16197825597",
        "kind" : "MSISDN"
      }, {
        "id" : "89148004443852613236",
        "kind" : "ICCID"
      } ],
      "monitorId" : "c3dfe020-816d-4656-843f-a2cc3d42bbdf",
      "accountName" : "0242666520-00001",
      "reportedTime" : "10/9/2019 6:18:08 PM",
      "registrationType" : "EVENT_REGISTER_FOR_DATA"
    }
  },
  "status" : "Success",
  "callbackCount" : 1,
  "maxCallbackThreshold" : 4
}

Register Success for DATA with callback (Device Sleeping):

{
  "username" : "user",
  "password" : "pwd",
  "requestId" : "7a110138-9532-400e-bdb9-29c1b7309446",
  "deviceIds" : [ {
    "id" : "89148001113852613236",
    "kind" : "ICCID"
  } ],
  "diagnosticsResponse" : {
    "deviceReachabilityResponse" : {
      "deviceIdentifierCollection" : [ {
        "id" : "865284098763723",
        "kind" : "IMEI"
      }, {
        "id" : "311270000033319",
        "kind" : "IMSI"
      }, {
        "id" : "6197823337",
        "kind" : "MDN"
      }, {
        "id" : "6194013229",
        "kind" : "MIN"
      }, {
        "id" : "16197825597",
        "kind" : "MSISDN"
      }, {
        "id" : "89148004443852613236",
        "kind" : "ICCID"
      } ],
      "monitorId" : "c3dfe020-816d-4656-843f-a2cc3d42bbdf",
      "accountName" : "0242666520-00001",
      "reportedTime" : "10/9/2019 6:18:08 PM",
      "registrationType" : "EVENT_REGISTER_FOR_CONNECTION_LOSS"
    }
  },
  "status" : "Success",
  "callbackCount" : 1,
  "maxCallbackThreshold" : 4
}

Register Failed for SMS with callback (Device Sleeping):

{
  "username" : "user",
  "password" : "pwd",
  "requestId" : "7a110138-9532-400e-bdb9-29c1b7309446",
  "deviceIds" : [ {
    "id" : "89148001113852613236",
    "kind" : "ICCID"
  } ],
  "diagnosticsResponse" : {
    "deviceReachabilityResponse" : {
      "monitorId" : "5e84365e-0a6f-41de-9476-074e89cb7f63",
      "accountName" : "0242666520-00001",
      "reportedTime" : "10/9/2019 6:18:09 PM",
      "registrationType" : "EVENT_REGISTER_FOR_SMS",
      "reason" : "Internal error"
    }
  },
  "status" : "Failed",
  "callbackCount" : 1,
  "maxCallbackThreshold" : 4
}

Register Success for DATA with callback (Device Awake):

{
  "username" : "user",
  "password" : "pwd",
  "requestId" : "7a110138-9532-400e-bdb9-29c1b7309446",
  "deviceIds" : [ {
    "id" : "89148001113852613236",
    "kind" : "ICCID"
  } ],
  "diagnosticsResponse" : {
    "deviceReachabilityResponse" : {
      "deviceIdentifierCollection" : [ {
        "id" : "865284098763723",
        "kind" : "IMEI"
      }, {
        "id" : "311270000033319",
        "kind" : "IMSI"
      }, {
        "id" : "6197823337",
        "kind" : "MDN"
      }, {
        "id" : "6194013229",
        "kind" : "MIN"
      }, {
        "id" : "16197825597",
        "kind" : "MSISDN"
      }, {
        "id" : "89148004443852613236",
        "kind" : "ICCID"
      } ],
      "monitorId" : "c3dfe020-816d-4656-843f-a2cc3d42bbdf",
      "accountName" : "0242666520-00001",
      "reportedTime" : "10/9/2019 6:18:08 PM",
      "registrationType" : "EVENT_REGISTER_FOR_DATA",
      "notificationReport" : "REACHABLE_FOR_DATA"
    }
  },
  "status" : "Success",
  "callbackCount" : 1,
  "maxCallbackThreshold" : 4
}

Register Success for SMS with callback (Device Awake):

{
  "username" : "user",
  "password" : "pwd",
  "requestId" : "7a110138-9532-400e-bdb9-29c1b7309446",
  "deviceIds" : [ {
    "id" : "89148001113852613236",
    "kind" : "ICCID"
  } ],
  "diagnosticsResponse" : {
    "deviceReachabilityResponse" : {
      "deviceIdentifierCollection" : [ {
        "id" : "865284098763723",
        "kind" : "IMEI"
      }, {
        "id" : "311270000033319",
        "kind" : "IMSI"
      }, {
        "id" : "6197823337",
        "kind" : "MDN"
      }, {
        "id" : "6194013229",
        "kind" : "MIN"
      }, {
        "id" : "16197825597",
        "kind" : "MSISDN"
      }, {
        "id" : "89148004443852613236",
        "kind" : "ICCID"
      } ],
      "monitorId" : "c3dfe020-816d-4656-843f-a2cc3d42bbdf",
      "accountName" : "0242666520-00001",
      "reportedTime" : "10/9/2019 6:18:08 PM",
      "registrationType" : "EVENT_REGISTER_FOR_SMS",
      "notificationReport" : "REACHABLE_FOR_SMS"
    }
  },
  "status" : "Success",
  "callbackCount" : 1,
  "maxCallbackThreshold" : 4
}

Reachability Notification for DATA with callback (When Device comes out of Sleep):

Note: Reachability Notification callback to have an original identifier ONLY that was passed in the request.

{
  "username" : "user",
  "password" : "pwd",
  "requestId" : "7a110138-9532-400e-bdb9-29c1b7309446",
  "deviceIds" : [ {
    "id" : "89148001113852613236",
    "kind" : "ICCID"
  } ],
  "diagnosticsResponse" : {
    "deviceReachabilityResponse" : {
      "monitorId" : "c3dfe020-816d-4656-843f-a2cc3d42bbdf",
      "accountName" : "0242666520-00001",
      "reportedTime" : "10/9/2019 6:18:08 PM",
      "notificationReport" : "REACHABLE_FOR_DATA"
    }
  },
  "status" : "Success",
  "callbackCount" : 1,
  "maxCallbackThreshold" : 4
}

Reachability Notification for SMS with callback (When Device comes out of Sleep):

Note: Reachability Notification callback to have an original identifier ONLY that was passed in the request.

{
  "username" : "user",
  "password" : "pwd",
  "requestId" : "7a110138-9532-400e-bdb9-29c1b7309446",
  "deviceIds" : [ {
    "id" : "89148001113852613236",
    "kind" : "ICCID"
  } ],
  "diagnosticsResponse" : {
    "deviceReachabilityResponse" : {
      "monitorId" : "c3dfe020-816d-4656-843f-a2cc3d42bbdf",
      "accountName" : "0242666520-00001",
      "reportedTime" : "10/9/2019 6:18:08 PM",
      "notificationReport" : "REACHABLE_FOR_SMS"
    }
  },
  "status" : "Success",
  "callbackCount" : 1,
  "maxCallbackThreshold" : 4
}

Status 200

Success Response with no body.

Try It Out!