Introduction to Webhooks

Print Friendly and PDF

Webhooks enable users to subscribe to data from Netradyne. In this case, Netradyne pushes data as and when the event occurs or at a pre-defined frequency. For example, events such as Alerts (Traffic Light Violation) may be pushed when the event occurs, whereas Inertial Measurement Unit (IMU) data such as Gyrometer readings will be pushed at a pre-defined frequency because the vehicles constantly generate this data during the drive. 

Webhooks are available for the events described in the following table. When one of the below events is triggered, an HTTPS POST payload is sent to the Webhook's configured URL. All the below Webhooks also support multiple subscriptions. For example, consider the case of the alert Webhook. A client may want to:

  • Push “Potential Collision” alerts to an insurance company.
  • Push High-G alerts of subtype “Rough Road” to a public Department of Transportation.
  • Push any alert configured by the client to an e-learning company.

In this scenario, the client can have multiple subscriptions to the alert Webhook.

The configurations can be set up in the Netradyne system based on URLs provided by the user.

Event

Description

alert

Alert event detected.

distilledObsData

Observation data such as GPS, Accelerometer, Gyrometer, etc., that are reported by the Driver•i device.

driverAssignment

Drive Time assigned to the Driver.

entityChange

Notify changes in the properties of an entity. This event is currently supported for the Vehicle entity.

 

 
Careful consideration and subscription to events will limit the number of HTTP requests made to the server. The list of subscribed events can be changed through the API. API information is available at https://resources.netradyne.com/ . 

Prerequisites

Ensure that the following requirements are met before receiving data through Webhooks: 

  • The Webhooks API uses the HTTPS protocol. Users who want to receive data through Webhooks must set up an HTTPS server. This is the Webhooks URL configured in the Netradyne system, where the data will be posted. All endpoints accept and return JSON.
  • Netradyne creates a unique Tenant name for each user. Users must contact Netradyne Support to know their unique Tenant name. 

Order of Events

Netradyne does not guarantee delivery of events in the order in which they were generated.

Specifications for Registered POST API Handler

Return a 2xx HTTP status code

To acknowledge receipt of an event, the client’s endpoint must return a 2XX HTTP status code to Netradyne server.

All response codes outside this range, including 3xx codes, indicates that the client did not receive the event. If Netradyne server does not receive a 2XX HTTP status code, the post data attempt is repeated twelve times for a total duration of 90 minutes, as follows:

  • 0th min (time of event) : 3 retry attempts
  • 15th min: 3 retry attempts
  • 45th min: 3 retry attempts
  • 90th min: 3 retry attempts

Security

The following practices are recommended:

  • Receive events with an HTTPS server.
  • Netradyne supports signing of Webhook requests based on a shared secret between Netradyne and its users using HMAC-based authentication. Users can verify that requests are generated by Netradyne and can protect against spoofing.
Was this article helpful?

We're sorry to hear that!

Please tell us why.
0 out of 0 found this helpful