Stop Device Reachability Monitoring

Stop Device Reachability Monitoring:
DELETE /diagnostics/basic/devicereachability

Contents

Uses and Requirements

Using this API, an enterprise application will be able to request to stop monitoring the Reachability of devices. At least one Monitor ID (the parameter that is provided when a monitoring request is first made) must be specified in this request for deletion.

Request

HTTP Request

DELETE https://thingspace.verizon.com/api/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.
monitorIds Mandatory Array of monitor ID Objects The array contains the monitorIDs (UUID) for which the monitor is to be deleted.

Example Request Body

Delete given monitors under an account:

{
  "accountName": "0242123520-00001",
  "monitorIds": [
    "35596ca6-bab4-4333-a914-42b4fc2da54c"
  ]
}

Success Response

Status 200

Success Response with the body of the response includes transaction ID 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 delete request with the results that are sent via a callback message (Callback Service set to “DiagnosticsService”).

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

Example Success Response

Status 200

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

Parameters

Reachability reachablenotificationdelete Callback Parameters (one per monitorID)

Parameter Name Mandatory or Optional Data Type Description
requestId Mandatory string A unique string that associates the delete request for group of devices.
deviceIds Optional device identifier object

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.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.
diagnosticsResponse.deviceReachabilityResponse.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)

diagnosticsResponse.deviceReachabilityResponse.monitorId Mandatory String The monitorIds (UUID) for which the monitor is deleted.
diagnosticsResponse.deviceReachabilityResponse.registrationType Optional String EVENT_UNREGISTER_FOR_DATA EVENT_UNREGISTER_FOR_SMS EVENT_UNREGISTER_FOR_CONNECTION_LOSS
diagnosticsResponse.deviceReachabilityResponse.reason Optional String “Internal error”
“Monitor id not found” – callback for each invalid monitorID
“Device not found associated with a monitorId.”

Example Success Callback Responses

Callback MonitorId found and deleted:

{
    "username": "user",
    "password": "pwd",
    "requestId": "ca80f3ae-04ca-4a4a-bca6-4b2198d044a2",
    "deviceIds": [
        {
            "id": "6196662397",
            "kind": "MDN"
        }
    ],
    "diagnosticsResponse": {
        "deviceReachabilityResponse": {
            "monitorId": "c389c1c8-da34-4554-995c-6b6537376420",
            "accountName": "0242123520-00001",
            "reportedTime": "10/30/2019 10:13:22 PM",
            "registrationType": "EVENT_UNREGISTER_FOR_DATA"
        }
    },
    "status": "Success",
    "callbackCount": 1,
    "maxCallbackThreshold": 4
}

Callback MonitorId not found:

{
   "username":"user",
   "password":"user",
   "requestId":"2c90bd28-ece4-42ef-9f02-7e3bd4fbff33",
   "diagnosticsResponse":{
      "deviceReachabilityResponse":{
         "accountName":"0242123520-00001",
         "reportedTime":"2018-11-11T16:39:58-08:00",
         "monitorId":"12345-ece4-42ef-9f02-4434002",
         "reason":"Monitor id not found"
      }
   },
   "status":"Failed",
   "callbackCount":1,
   "maxCallbackThreshold":4
}

Callback Device associated with MonitorId not found:

{
   "username":"user",
   "password":"user",
   "requestId":"2c90bd28-ece4-42ef-9f02-7e3bd4fbff33",
   "diagnosticsResponse":{
      "deviceReachabilityResponse":{
         "accountName":"0242123520-00001",
         "reportedTime":"2018-11-11T16:39:58-08:00",
         "monitorId":"12345-ece4-42ef-9f02-4434002",
         "reason":"Device not found associated with a monitorId."
      }
   },
   "status":"Failed",
   "callbackCount":1,
   "maxCallbackThreshold":4
}

Status 200

Success Response with no body.

Try It Out!