Support & information center

Webhook support in qualityRTC

When a user runs a network test in qualityRTC, that test gets collected by the testRTC backend. At that point in time, testRTC can also send the results via webhook to wherever you choose.

The webhook includes a JSON structure with all the metrics collected during the test. You can use this data to conduct your own analysis and to collect it in your company’s BI tool.

Note: Webhooks are offered as a premium feature of qualityRTC

Setting up webhooks in qualityRTC

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

Format

The webhook’s data structure is JSON. It varies between one client to another based on the customizations done in your account and the type of network tests conducted.

The webhook can be invoked in several formats.

Future releases may expose more fields than shared in the example below.

{
  "testResult": {
    "testPageUrl": "http://networktest.your-website-here.com",
    "fingerprint": {
      "platform": "MacIntel",
      "effectiveConnectionType": "4g",
      "fingerprint": "<machine-fingerprint>",
      "cpuClass": "not available",
      "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36",
      "timezone": {
        "title": "Europe/Kiev",
        "hours": 3
      },
      "devices": [
        {
          "deviceId": "default",
          "kind": "audioinput",
          "label": "Default - drevm (Bluetooth)",
          "groupId": "2a2ba5a06ee09af85038b265803e89cee8c65224b0bf75b9cf5fc49e8efb7ca9"
        },
        {
          "deviceId": "e80b7b3d55873fe63d406bb72fc6db5fe8759dbde2c7e79e718a597b7af6d54d",
          "kind": "audioinput",
          "label": "drevm (Bluetooth)",
          "groupId": "2a2ba5a06ee09af85038b265803e89cee8c65224b0bf75b9cf5fc49e8efb7ca9"
        },
        ...
      ]
    },
    "checkBrowser": {
      "browser": "chrome",
      "version": 84,
      "canRun": true
    },
    "networkInformation": {
      "effectiveType": "4g",
      "downlink": 10,
      "rtt": 50,
      "proxy": false
    },
    "throughput": {
      "averageBandwidth": 6162.7,
      "concurrentConnections": 123,
      "highestBandwidth": 8945.7,
      "lowestBandwidth": 1089.5,
      "maxThroughouts": 178,
      "minThroughouts": 21
    },
    "testCall": {
      "codec": "Opus",
      "avgJit": 0,
      "avgPl": 0,
      "avgRtt": 53.8,
      "mark": 4.4,
      "maxJit": 0,
      "maxPl": 0,
      "maxRtt": 54,
      "minJit": 0,
      "minPl": 0,
      "minRtt": 53,
      "remotePort": 11236,
      "remoteAddress": "3.122.181.196"
    },
    "turnTest": {
      "tcpConnectionTime": 615,
      "tcpGatheringTime": 320,
      "udpConnectionTime": 577,
      "udpGatheringTime": 319,
      "tlsConnectionTime": 660,
      "tlsGatheringTime": 311,
      "behindProxy": false
    },
    "videoBandwidthTest": {
      "bandwidthEstimate": 3702.1484375,
      "bitrate": null,
      "roundTripTime": 88.66666666666667,
      "fractionLoss": 0,
      "jitter": 0.011966666666666667
    },
    "videoQualityTest": {
      "bitrate": 1012,
      "fractionLoss": 0
    },
    "speedTest": {
      "best": {
        "download": 63.3,
        "jitter": 0,
        "upload": 26.59,
        "region": "EU (Frankfurt)"
      },
    },
    "pingTest": {
      "best": {
        "ping": 47,
        "region": "EU (Frankfurt)"
      },
      "all": [
        {
          "ping": 46,
          "region": "EU (Frankfurt)"
        },
        {
          "ping": 139,
          "region": "US East (N. Virginia)"
        },
        {
          "ping": 216,
          "region": "US West (Oregon)"
        }
      ]
    },
    "location": {
      "ip": "188.191.234.7",
      "city": "Chernivtsi",
      "country": "Ukraine",
      "organization": "Buknet LLC",
      "coordinates": {
        "latitude": 48.2932,
        "longitude": 25.9448
      }
    },
    "dnsLookup": {
      "totalConnections": 5,
      "successfulConnections": 5,
      "shortestConnectionTime": 248,
      "highestConnectionTime": 1705,
      "averageConnectionTime": 856
    },
    "videoPlayback": {
      "blocked": false
    },
    "getUserMedia": {},
    "dnsSetup": {},
    "videoP2P": {
      "bitrate": 1489.7,
      "bitrateOut": 2588.8,
      "fractionLoss": 0,
      "fractionLossOut": 0,
      "jitter": 0,
      "roundTripTime": 117.9
    }
  },
  "logs": [
    {
      "message": {
        "Fingerprint": "User Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36"
      },
      "color": "black",
      "time": "19:01:26"
    },
    {
      "message": {
        "Connection": "4g",
        "OS": "MacIntel",
        "Timezone": "Mon, 27 Jul 2020 16:01:26 GMT; Europe/Kiev - UTC/GMT+3"
      },
      "color": "black",
      "time": "19:01:26"
    },
    ...
  ],
  "email": "[email protected]",
  "title": "run all tests",
  "timestamp": "Mon, 27 Jul 2020 16:01:26 GMT; Europe/Kiev - UTC/GMT+3"
}

Was this article helpful?

Related Articles