Skip to content

Commit d6c5d61

Browse files
authored
Merge pull request #106 from svenvg93/2592-add-results-to-payload
Update webhook payloads
2 parents 5a1ef19 + 9318cb5 commit d6c5d61

File tree

1 file changed

+34
-28
lines changed

1 file changed

+34
-28
lines changed

settings/notifications/webhook.md

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,59 +6,65 @@ A webhook will send a JSON payload to a receiver of your choice
66

77
### Payload
88

9-
Payload sent for a completed test
10-
11-
```json
12-
{
13-
"result_id": 1,
14-
"site_name": "Speedtest Tracker",
15-
"server_name": "Speedtest",
16-
"server_id": 52365,
17-
"isp": "Super Speed",
18-
"ping": 2.782,
19-
"download": 937874216,
20-
"upload": 937797864,
21-
"packet_loss": 0,
22-
"speedtest_url": "https://www.speedtest.net/result/c/af8ddebf-7ef7-4b8d-b0c1-aaaaaaaaaaaa",
23-
"url": "http://localhost/admin/results"
24-
}
25-
```
26-
27-
Payload sent for a threshold failure
28-
9+
{% tabs %}
10+
{% tab title="Threshold Failure " %}
2911
```json
3012
{
31-
"result_id": 1,
13+
"result_id": 14,
3214
"site_name": "Speedtest Tracker",
33-
"isp": "Super Speed",
15+
"isp": "Speedy Communications",
3416
"benchmarks": {
3517
"download": {
3618
"bar": "min",
3719
"passed": false,
3820
"type": "absolute",
39-
"value": 2000,
21+
"test_value": 1022,
22+
"benchmark_value": 2000,
4023
"unit": "mbps"
4124
},
4225
"upload": {
4326
"bar": "min",
4427
"passed": false,
4528
"type": "absolute",
46-
"value": 2000,
29+
"test_value": 1018,
30+
"benchmark_value": 2000,
4731
"unit": "mbps"
4832
},
4933
"ping": {
5034
"bar": "max",
5135
"passed": false,
5236
"type": "absolute",
53-
"value": 1,
37+
"test_value": 3,
38+
"benchmark_value": 1,
5439
"unit": "ms"
5540
}
5641
},
57-
"speedtest_url": "https://www.speedtest.net/result/c/af8ddebf-7ef7-4b8d-b0c1-aaaaaaaaa",
58-
"url": "http://localhost/admin/results"
42+
"speedtest_url": "https://www.speedtest.net/result/c/1433a2de-eb3c-4a0e-ab29-xxxxxx",
43+
"url": "http://192.168.1.5/admin/results"
44+
}
45+
```
46+
{% endtab %}
47+
48+
{% tab title="Completed test" %}
49+
```json
50+
{
51+
"result_id": 17,
52+
"site_name": "Speedtest Tracker",
53+
"server_name": "Speedtest",
54+
"server_id": 52365,
55+
"status": "completed",
56+
"isp": "Speedy Communications",
57+
"ping": 3,
58+
"download": 1026,
59+
"upload": 1012,
60+
"packet_loss": 0,
61+
"speedtest_url": "https://www.speedtest.net/result/c/288aa4aa-a52e-493c-8d60-xxxx",
62+
"url": "http://192.168.1.5/admin/results"
5963
}
6064
```
65+
{% endtab %}
66+
{% endtabs %}
6167

6268
### Triggers
6369

64-
<table><thead><tr><th width="237">Name</th><th>Description</th></tr></thead><tbody><tr><td>on every scheduled speedtest run</td><td>On each successful scheduled speedtest a notification will be send to the application.</td></tr><tr><td>on threshold failures for scheduled speedtests</td><td>On any absolute threshold failure for scheduled speedtest a notification will be send to the application.</td></tr></tbody></table>
70+
<table><thead><tr><th width="237">Name</th><th>Description</th></tr></thead><tbody><tr><td>on every scheduled speedtest run</td><td>On each successful scheduled speedtest a notification will be send to the application.</td></tr><tr><td>on threshold failures for scheduled speedtests</td><td>On any absolute threshold failure for scheduled speedtest a notification will be send to the application.</td></tr></tbody></table>

0 commit comments

Comments
 (0)