Premium APIsDevice DiagnosticsAPI EndpointsDiagnostics Callbacks

API Reference

Register a Diagnostics Callback Listener URL

POST /callbacks

You can register a URL endpoint at which an account will receive callback messages containing Live Streamed RF data for an IOT device from the Diagnostics Service. To receive these callbacks you have to set up a device Diagnostics observation using Start Diagnostics Observation.

The callback messages will be REST messages POSTed to the target URLs. You are responsible for creating and running a listening process on your server at those URLs to receive and parse the messages.

Diagnostics observation callbacks will be issued at the frequency and duration requested in Start Diagnostics Observation.

Uses and Requirements

Callback messages are secured with a shared secret key and SHA256 HMAC signatures. The response to this request (to register a callback listener) will contain the secret key in the header, and you must save the shared key to be able to authenticate and validate callback messages.

Request Components

HTTP Request

POST https://thingspace.verizon.com/api/diagnostics/v1/callbacks

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

The body specifies the callback service that is being subscribed to and the URL where the listening service is running.

Parameter NameData TypeDescription
accountName requiredstringThe name of the billing account for which callback messages will be sent.
serviceName requiredstringThe name of the callback service, which identifies the type and format of messages that will be sent to the registered URL.
endpoint requiredstringThe URL for your web server.
httpHeadersstringYour http headers.

Example Request Body

{
  "accountName": "TestQAAccount",
  "serviceName": "Diagnostics",
  "endpoint": "https://yourwebsite.com",
  "httpHeaders": {}
}

Success Responses

Status 200

Parameter NameData TypeDescription
accountNamestringThe name of the billing account for which callback messages will be sent.
serviceNamestringThe name of the callback service, which identifies the type and format of messages that will be sent to the registered URL.
endpointstringThe URL for your web server.
httpHeadersstringYour http headers.
createdOnstring($date-time)The date and time of when this request was created.

Example Success Response

{
  "accountName": "TestQAAccount",
  "serviceName": "string",
  "endpoint": "https://yourwebsite.com",
  "httpHeaders": {},
  "createdOn": "2019-09-07T23:57:53.292Z"
}

Failure Responses

Status 400 All error messages are returned in this format:

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

On this page