1. Home
  2. SureMDM
  3. How to capture specific device-related events in real-time on Webhooks using SureMDM?

How to capture specific device-related events in real-time on Webhooks using SureMDM?

KB ID: 42G2006016
Views: 771
Updated: August 2021

SureMDM supports capturing of notifications for specific device-related events in real-time on the Webhook URL. Webhooks offer a way to quickly find out the changes that have been made to specific device-related events through SureMDM. Once you enable the events of interest, SureMDM will post the data to the URL you specify whenever one of those events occurs.

Following steps are involved in capturing the event notifications on your Webhook URL:

  • Configure Webhooks in SureMDM
  • Create a notification policy job and apply it to a device

Configure Webhooks in SureMDM

To configure Webhooks in SureMDM, follow these steps:

  1. Navigate to SureMDM Web Console > Settings (icon located at the top right of the console) > Account Settings > Webhooks.
  2. Select Enable Webhooks.
  3. Click Add New Endpoint.
  4. Enter the Webhook Name and Webhook Endpoint.
  5. Note: Webhook Endpoint is your Webhook URL, where specified device-related events are captured.

  6. Click Test Connection to confirm the connection with your Webhook URL.
  7. Click Save > Apply.

Create notification policy job and apply it to a device

To configure an event notification and capture it on the Webhook URL, follow these steps:

1.  On the SureMDM Web Console, navigate to Jobs > New Job > Android > Notification Policy.

2.  Name the job and configure notification settings for the following events:

  • Battery percentage or battery charging status change – Send a notification when an enrolled device’s battery power falls below the set threshold and battery charging status changes.
  • Device connection status change – Send a notification when the device remains offline for a set period.
  • Device data usage threshold change – Send a notification when the device’s data consumption exceeds the set threshold.
  • Device status change – Send a notification when SureMDM Agent application status becomes online after being offline.
  • Send a notification when a SIM is changed or the device is rooted, or when SureMDM Agent is granted root permission.

3. Enable Webhook and select the Endpoint URL given in step no.4, Configure Webhook in  SureMDM to send an alert to the selected Webhook URL.

4. Click Done > OK.

The newly created job will be listed under Jobs List .

5.  Go back to Home and select the Android device.

6.  Click Apply to launch the Apply Job/Profile To Device prompt.

7.  In the Apply Job/Profile To Device prompt, select the created job and click Apply.

Once the job is applied to a device, you can see a real-time event notification captured on your Webhook URL in JSON format whenever the status of the policies configured on the enrolled device changes (as shown below).

post image

The above example is that of an event notification captured on the Webhook URL that occurred as a result of the device battery power dropping below set threshold.

Note: You can also capture event notifications for Android Wear, Windows CE, Windows Mobile, Windows 7, 8 and 10 devices on the Webhooks.

Related Articles