Skip to main content

Webhook support in watchRTC

watchRTC offers the ability to set up custom alerts. You can use webhooks in order to catch these custom alerts in your application or external monitoring service.

Setting up webhooks in watchRTC

  1. Navigate to Settings section
  2. Click the watchRTC tab
  3. Insert your chosen webhook format

The webhooks for watchRTC follow the testRTC webhook format alternatives.

When do webhooks fire in watchRTC?

Once a room is “closed” and analyzed by watchRTC, the custom alerts are checked against. If any of these custom rules apply, then a webhook will be invoked on that given room. The webhook is invoked on the room, detailing all peers and alerts associated with them.

You’ll get the webhook invoked on the room level, but you’ll know exactly which peers had which issues.

Example | watchRTC webhook result

Below is an example body from a watchRTC alert webhook which includes custom keys. It indicates the time and roomId along with an array of the alerts for that room:
{
  "time": "2023-10-20T06:46:11.000Z",
  "project": {
    "id": "651e523ad8a39e001293b940",
    "name": "Chirag - Nailup Call Testing"
  },
  "room_id": "decorousinsuranceroom1",
  "peers": [
    {
      "peer_id": "decorousinsurance1",
      "keys": {
        "searchPeer": "decorousinsurance1",
        "datacenter": "West-US",
        "company": "Cyara"
      },
      "notifications": [
        {
          "calculation": "Score 7.70 > 7",
          "metric": "score",
          "value": "7.70",
          "operator": ">",
          "threshold": "7",
          "status": "error"
        }
      ]
    },
    {
      "peer_id": "decorousinsurance2",
      "keys": {
        "searchPeer": "decorousinsurance2",
        "datacenter": "East-US",
        "company": "Cyara"
      },
      "notifications": [
        {
          "calculation": "Score 7.50 > 7",
          "metric": "score",
          "value": "7.50",
          "operator": ">",
          "threshold": "7",
          "status": "error"
        }
      ]
    }
  ]
}

Example | Test results as displayed in the UI

Figure 1. Results as seen in the UI

Was this article helpful?

0 out of 0 found this helpful