flapjack-diner 1.4.0 → 2.0.0.a4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rspec +1 -1
  4. data/README.md +620 -413
  5. data/flapjack-diner.gemspec +1 -1
  6. data/lib/flapjack-diner/argument_validator.rb +77 -7
  7. data/lib/flapjack-diner/configuration.rb +409 -0
  8. data/lib/flapjack-diner/index_range.rb +42 -0
  9. data/lib/flapjack-diner/log_formatter.rb +22 -0
  10. data/lib/flapjack-diner/query.rb +114 -0
  11. data/lib/flapjack-diner/relationships.rb +180 -0
  12. data/lib/flapjack-diner/request.rb +280 -0
  13. data/lib/flapjack-diner/resources.rb +64 -0
  14. data/lib/flapjack-diner/response.rb +91 -0
  15. data/lib/flapjack-diner/tools.rb +47 -251
  16. data/lib/flapjack-diner/utility.rb +16 -0
  17. data/lib/flapjack-diner/version.rb +1 -1
  18. data/lib/flapjack-diner.rb +54 -20
  19. data/spec/argument_validator_spec.rb +87 -28
  20. data/spec/flapjack-diner_spec.rb +42 -64
  21. data/spec/relationships_spec.rb +211 -0
  22. data/spec/resources/checks_spec.rb +219 -79
  23. data/spec/resources/contacts_spec.rb +179 -151
  24. data/spec/resources/events_spec.rb +208 -0
  25. data/spec/resources/maintenance_periods_spec.rb +177 -565
  26. data/spec/resources/media_spec.rb +157 -171
  27. data/spec/resources/metrics_spec.rb +45 -0
  28. data/spec/resources/rules_spec.rb +278 -0
  29. data/spec/resources/states_spec.rb +93 -0
  30. data/spec/resources/statistics_spec.rb +53 -0
  31. data/spec/resources/tags_spec.rb +243 -0
  32. data/spec/spec_helper.rb +16 -0
  33. data/spec/support/fixture_data.rb +541 -0
  34. metadata +33 -31
  35. data/.rubocop.yml +0 -21
  36. data/.rubocop_todo.yml +0 -135
  37. data/lib/flapjack-diner/resources/checks.rb +0 -64
  38. data/lib/flapjack-diner/resources/contacts.rb +0 -70
  39. data/lib/flapjack-diner/resources/entities.rb +0 -68
  40. data/lib/flapjack-diner/resources/maintenance_periods.rb +0 -82
  41. data/lib/flapjack-diner/resources/media.rb +0 -61
  42. data/lib/flapjack-diner/resources/notification_rules.rb +0 -66
  43. data/lib/flapjack-diner/resources/notifications.rb +0 -28
  44. data/lib/flapjack-diner/resources/pagerduty_credentials.rb +0 -59
  45. data/lib/flapjack-diner/resources/reports.rb +0 -33
  46. data/spec/pacts/flapjack-diner-flapjack.json +0 -4515
  47. data/spec/resources/entities_spec.rb +0 -181
  48. data/spec/resources/notification_rules_spec.rb +0 -341
  49. data/spec/resources/notifications_spec.rb +0 -208
  50. data/spec/resources/pagerduty_credentials_spec.rb +0 -237
  51. data/spec/resources/reports_spec.rb +0 -255
@@ -1,4515 +0,0 @@
1
- {
2
- "provider": {
3
- "name": "flapjack"
4
- },
5
- "consumer": {
6
- "name": "flapjack-diner"
7
- },
8
- "interactions": [
9
- {
10
- "description": "a GET request for a single notification rule",
11
- "provider_state": "a contact 'abc' with generic notification rule '05983623-fcef-42da-af44-ed6990b500fa' exists",
12
- "request": {
13
- "method": "get",
14
- "path": "/notification_rules/05983623-fcef-42da-af44-ed6990b500fa"
15
- },
16
- "response": {
17
- "status": 200,
18
- "headers": {
19
- "Content-Type": "application/vnd.api+json; charset=utf-8"
20
- },
21
- "body": {
22
- "notification_rules": [
23
- {
24
- "id": "05983623-fcef-42da-af44-ed6990b500fa",
25
- "tags": [
26
-
27
- ],
28
- "regex_tags": [
29
-
30
- ],
31
- "entities": [
32
-
33
- ],
34
- "regex_entities": [
35
-
36
- ],
37
- "time_restrictions": [
38
-
39
- ],
40
- "warning_media": [
41
- "email"
42
- ],
43
- "critical_media": [
44
- "sms",
45
- "email"
46
- ],
47
- "warning_blackhole": false,
48
- "critical_blackhole": false
49
- }
50
- ]
51
- }
52
- }
53
- },
54
- {
55
- "description": "a GET request for a single notification rule",
56
- "provider_state": "no notification rule exists",
57
- "request": {
58
- "method": "get",
59
- "path": "/notification_rules/05983623-fcef-42da-af44-ed6990b500fa"
60
- },
61
- "response": {
62
- "status": 404,
63
- "headers": {
64
- "Content-Type": "application/vnd.api+json; charset=utf-8"
65
- },
66
- "body": {
67
- "errors": [
68
- "could not find notification rules '05983623-fcef-42da-af44-ed6990b500fa'"
69
- ]
70
- }
71
- }
72
- },
73
- {
74
- "description": "a GET request for all notification rules",
75
- "provider_state": "a contact 'abc' with generic notification rule '05983623-fcef-42da-af44-ed6990b500fa' exists",
76
- "request": {
77
- "method": "get",
78
- "path": "/notification_rules"
79
- },
80
- "response": {
81
- "status": 200,
82
- "headers": {
83
- "Content-Type": "application/vnd.api+json; charset=utf-8"
84
- },
85
- "body": {
86
- "notification_rules": [
87
- {
88
- "id": "05983623-fcef-42da-af44-ed6990b500fa",
89
- "tags": [
90
-
91
- ],
92
- "regex_tags": [
93
-
94
- ],
95
- "entities": [
96
-
97
- ],
98
- "regex_entities": [
99
-
100
- ],
101
- "time_restrictions": [
102
-
103
- ],
104
- "warning_media": [
105
- "email"
106
- ],
107
- "critical_media": [
108
- "sms",
109
- "email"
110
- ],
111
- "warning_blackhole": false,
112
- "critical_blackhole": false
113
- }
114
- ]
115
- }
116
- }
117
- },
118
- {
119
- "description": "a GET request for two notification rules",
120
- "provider_state": "a contact 'abc' with generic notification rule '05983623-fcef-42da-af44-ed6990b500fa' and notification rule '20f182fc-6e32-4794-9007-97366d162c51' exists",
121
- "request": {
122
- "method": "get",
123
- "path": "/notification_rules/05983623-fcef-42da-af44-ed6990b500fa,20f182fc-6e32-4794-9007-97366d162c51"
124
- },
125
- "response": {
126
- "status": 200,
127
- "headers": {
128
- "Content-Type": "application/vnd.api+json; charset=utf-8"
129
- },
130
- "body": {
131
- "notification_rules": [
132
- {
133
- "id": "05983623-fcef-42da-af44-ed6990b500fa",
134
- "tags": [
135
-
136
- ],
137
- "regex_tags": [
138
-
139
- ],
140
- "entities": [
141
-
142
- ],
143
- "regex_entities": [
144
-
145
- ],
146
- "time_restrictions": [
147
-
148
- ],
149
- "warning_media": [
150
- "email"
151
- ],
152
- "critical_media": [
153
- "sms",
154
- "email"
155
- ],
156
- "warning_blackhole": false,
157
- "critical_blackhole": false
158
- },
159
- {
160
- "id": "20f182fc-6e32-4794-9007-97366d162c51",
161
- "tags": [
162
- "physical"
163
- ],
164
- "regex_tags": [
165
-
166
- ],
167
- "entities": [
168
- "example.com"
169
- ],
170
- "regex_entities": [
171
-
172
- ],
173
- "time_restrictions": [
174
-
175
- ],
176
- "warning_media": [
177
- "email"
178
- ],
179
- "critical_media": [
180
- "sms",
181
- "email"
182
- ],
183
- "warning_blackhole": true,
184
- "critical_blackhole": true
185
- }
186
- ]
187
- }
188
- }
189
- },
190
- {
191
- "description": "a DELETE request for a single notification rule",
192
- "provider_state": "a contact 'abc' with generic notification rule '05983623-fcef-42da-af44-ed6990b500fa' exists",
193
- "request": {
194
- "method": "delete",
195
- "path": "/notification_rules/05983623-fcef-42da-af44-ed6990b500fa",
196
- "body": null
197
- },
198
- "response": {
199
- "status": 204,
200
- "body": ""
201
- }
202
- },
203
- {
204
- "description": "a DELETE request for two notification rules",
205
- "provider_state": "a contact 'abc' with generic notification rule '05983623-fcef-42da-af44-ed6990b500fa' and notification rule '20f182fc-6e32-4794-9007-97366d162c51' exists",
206
- "request": {
207
- "method": "delete",
208
- "path": "/notification_rules/05983623-fcef-42da-af44-ed6990b500fa,20f182fc-6e32-4794-9007-97366d162c51",
209
- "body": null
210
- },
211
- "response": {
212
- "status": 204,
213
- "body": ""
214
- }
215
- },
216
- {
217
- "description": "a DELETE request for a single notification rule",
218
- "provider_state": "no notification rule exists",
219
- "request": {
220
- "method": "delete",
221
- "path": "/notification_rules/05983623-fcef-42da-af44-ed6990b500fa",
222
- "body": null
223
- },
224
- "response": {
225
- "status": 404,
226
- "headers": {
227
- "Content-Type": "application/vnd.api+json; charset=utf-8"
228
- },
229
- "body": {
230
- "errors": [
231
- "could not find notification rule '05983623-fcef-42da-af44-ed6990b500fa'"
232
- ]
233
- }
234
- }
235
- },
236
- {
237
- "description": "a POST request with one notification rule",
238
- "provider_state": "a contact with id 'abc' exists",
239
- "request": {
240
- "method": "post",
241
- "path": "/contacts/abc/notification_rules",
242
- "headers": {
243
- "Content-Type": "application/vnd.api+json"
244
- },
245
- "body": {
246
- "notification_rules": [
247
- {
248
- "entity_tags": [
249
- "database",
250
- "physical"
251
- ],
252
- "entities": [
253
- "foo-app-01.example.com"
254
- ],
255
- "time_restrictions": null,
256
- "warning_media": [
257
- "email"
258
- ],
259
- "critical_media": [
260
- "sms",
261
- "email"
262
- ],
263
- "warning_blackhole": false,
264
- "critical_blackhole": false
265
- }
266
- ]
267
- }
268
- },
269
- "response": {
270
- "status": 201,
271
- "headers": {
272
- "Content-Type": "application/vnd.api+json; charset=utf-8"
273
- },
274
- "body": [
275
- {
276
- "json_class": "Pact::Term",
277
- "data": {
278
- "generate": "05983623-fcef-42da-af44-ed6990b500fa",
279
- "matcher": {"json_class":"Regexp","o":0,"s":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}
280
- }
281
- }
282
- ]
283
- }
284
- },
285
- {
286
- "description": "a POST request with two notification rules",
287
- "provider_state": "a contact with id 'abc' exists",
288
- "request": {
289
- "method": "post",
290
- "path": "/contacts/abc/notification_rules",
291
- "headers": {
292
- "Content-Type": "application/vnd.api+json"
293
- },
294
- "body": {
295
- "notification_rules": [
296
- {
297
- "entity_tags": [
298
- "database",
299
- "physical"
300
- ],
301
- "entities": [
302
- "foo-app-01.example.com"
303
- ],
304
- "time_restrictions": null,
305
- "warning_media": [
306
- "email"
307
- ],
308
- "critical_media": [
309
- "sms",
310
- "email"
311
- ],
312
- "warning_blackhole": false,
313
- "critical_blackhole": false
314
- },
315
- {
316
- "entity_tags": null,
317
- "entities": [
318
- "foo-app-02.example.com"
319
- ],
320
- "time_restrictions": null,
321
- "warning_media": [
322
- "email"
323
- ],
324
- "critical_media": [
325
- "sms",
326
- "email"
327
- ],
328
- "warning_blackhole": true,
329
- "critical_blackhole": false
330
- }
331
- ]
332
- }
333
- },
334
- "response": {
335
- "status": 201,
336
- "headers": {
337
- "Content-Type": "application/vnd.api+json; charset=utf-8"
338
- },
339
- "body": [
340
- {
341
- "json_class": "Pact::Term",
342
- "data": {
343
- "generate": "05983623-fcef-42da-af44-ed6990b500fa",
344
- "matcher": {"json_class":"Regexp","o":0,"s":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}
345
- }
346
- },
347
- {
348
- "json_class": "Pact::Term",
349
- "data": {
350
- "generate": "20f182fc-6e32-4794-9007-97366d162c51",
351
- "matcher": {"json_class":"Regexp","o":0,"s":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}
352
- }
353
- }
354
- ]
355
- }
356
- },
357
- {
358
- "description": "a POST request with one notification rule",
359
- "provider_state": "no contact exists",
360
- "request": {
361
- "method": "post",
362
- "path": "/contacts/abc/notification_rules",
363
- "headers": {
364
- "Content-Type": "application/vnd.api+json"
365
- },
366
- "body": {
367
- "notification_rules": [
368
- {
369
- "entity_tags": [
370
- "database",
371
- "physical"
372
- ],
373
- "entities": [
374
- "foo-app-01.example.com"
375
- ],
376
- "time_restrictions": null,
377
- "warning_media": [
378
- "email"
379
- ],
380
- "critical_media": [
381
- "sms",
382
- "email"
383
- ],
384
- "warning_blackhole": false,
385
- "critical_blackhole": false
386
- }
387
- ]
388
- }
389
- },
390
- "response": {
391
- "status": 404,
392
- "headers": {
393
- "Content-Type": "application/vnd.api+json; charset=utf-8"
394
- },
395
- "body": {
396
- "errors": [
397
- "could not find contact 'abc'"
398
- ]
399
- }
400
- }
401
- },
402
- {
403
- "description": "a PATCH request to change properties for a single notification rule",
404
- "provider_state": "a contact 'abc' with generic notification rule '05983623-fcef-42da-af44-ed6990b500fa' exists",
405
- "request": {
406
- "method": "patch",
407
- "path": "/notification_rules/05983623-fcef-42da-af44-ed6990b500fa",
408
- "headers": {
409
- "Content-Type": "application/json-patch+json"
410
- },
411
- "body": [
412
- {
413
- "op": "replace",
414
- "path": "/notification_rules/0/warning_blackhole",
415
- "value": false
416
- }
417
- ]
418
- },
419
- "response": {
420
- "status": 204,
421
- "body": ""
422
- }
423
- },
424
- {
425
- "description": "a PATCH request to change properties for two notification rules",
426
- "provider_state": "a contact 'abc' with generic notification rule '05983623-fcef-42da-af44-ed6990b500fa' and notification rule '20f182fc-6e32-4794-9007-97366d162c51' exists",
427
- "request": {
428
- "method": "patch",
429
- "path": "/notification_rules/05983623-fcef-42da-af44-ed6990b500fa,20f182fc-6e32-4794-9007-97366d162c51",
430
- "headers": {
431
- "Content-Type": "application/json-patch+json"
432
- },
433
- "body": [
434
- {
435
- "op": "replace",
436
- "path": "/notification_rules/0/warning_blackhole",
437
- "value": false
438
- }
439
- ]
440
- },
441
- "response": {
442
- "status": 204,
443
- "body": ""
444
- }
445
- },
446
- {
447
- "description": "a PATCH request to change properties for a single notification rule",
448
- "provider_state": "no notification rule exists",
449
- "request": {
450
- "method": "patch",
451
- "path": "/notification_rules/05983623-fcef-42da-af44-ed6990b500fa",
452
- "headers": {
453
- "Content-Type": "application/json-patch+json"
454
- },
455
- "body": [
456
- {
457
- "op": "replace",
458
- "path": "/notification_rules/0/warning_blackhole",
459
- "value": false
460
- }
461
- ]
462
- },
463
- "response": {
464
- "status": 404,
465
- "headers": {
466
- "Content-Type": "application/vnd.api+json; charset=utf-8"
467
- },
468
- "body": {
469
- "errors": [
470
- "could not find notification rule '05983623-fcef-42da-af44-ed6990b500fa'"
471
- ]
472
- }
473
- }
474
- },
475
- {
476
- "description": "a GET request for sms media",
477
- "provider_state": "a contact with id 'abc' has email and sms media",
478
- "request": {
479
- "method": "get",
480
- "path": "/media/abc_sms"
481
- },
482
- "response": {
483
- "status": 200,
484
- "headers": {
485
- "Content-Type": "application/vnd.api+json; charset=utf-8"
486
- },
487
- "body": {
488
- "media": [
489
- {
490
- "type": "sms",
491
- "address": "0123456789",
492
- "interval": 300,
493
- "rollup_threshold": 5,
494
- "links": {
495
- "contacts": [
496
- "abc"
497
- ]
498
- }
499
- }
500
- ]
501
- }
502
- }
503
- },
504
- {
505
- "description": "a GET request for sms media",
506
- "provider_state": "no contact exists",
507
- "request": {
508
- "method": "get",
509
- "path": "/media/abc_sms"
510
- },
511
- "response": {
512
- "status": 404,
513
- "headers": {
514
- "Content-Type": "application/vnd.api+json; charset=utf-8"
515
- },
516
- "body": {
517
- "errors": [
518
- "could not find contact 'abc'"
519
- ]
520
- }
521
- }
522
- },
523
- {
524
- "description": "a GET request for all media",
525
- "provider_state": "a contact with id 'abc' has email and sms media",
526
- "request": {
527
- "method": "get",
528
- "path": "/media"
529
- },
530
- "response": {
531
- "status": 200,
532
- "headers": {
533
- "Content-Type": "application/vnd.api+json; charset=utf-8"
534
- },
535
- "body": {
536
- "media": [
537
- {
538
- "type": "email",
539
- "address": "ablated@example.org",
540
- "interval": 180,
541
- "rollup_threshold": 3,
542
- "links": {
543
- "contacts": [
544
- "abc"
545
- ]
546
- }
547
- },
548
- {
549
- "type": "sms",
550
- "address": "0123456789",
551
- "interval": 300,
552
- "rollup_threshold": 5,
553
- "links": {
554
- "contacts": [
555
- "abc"
556
- ]
557
- }
558
- }
559
- ]
560
- }
561
- }
562
- },
563
- {
564
- "description": "a GET request for email and sms media",
565
- "provider_state": "a contact with id 'abc' has email and sms media",
566
- "request": {
567
- "method": "get",
568
- "path": "/media/abc_email,abc_sms"
569
- },
570
- "response": {
571
- "status": 200,
572
- "headers": {
573
- "Content-Type": "application/vnd.api+json; charset=utf-8"
574
- },
575
- "body": {
576
- "media": [
577
- {
578
- "type": "email",
579
- "address": "ablated@example.org",
580
- "interval": 180,
581
- "rollup_threshold": 3,
582
- "links": {
583
- "contacts": [
584
- "abc"
585
- ]
586
- }
587
- },
588
- {
589
- "type": "sms",
590
- "address": "0123456789",
591
- "interval": 300,
592
- "rollup_threshold": 5,
593
- "links": {
594
- "contacts": [
595
- "abc"
596
- ]
597
- }
598
- }
599
- ]
600
- }
601
- }
602
- },
603
- {
604
- "description": "a DELETE request for one medium",
605
- "provider_state": "a contact with id 'abc' has email and sms media",
606
- "request": {
607
- "method": "delete",
608
- "path": "/media/abc_email",
609
- "body": null
610
- },
611
- "response": {
612
- "status": 204,
613
- "body": ""
614
- }
615
- },
616
- {
617
- "description": "a DELETE request for two media",
618
- "provider_state": "a contact with id 'abc' has email and sms media",
619
- "request": {
620
- "method": "delete",
621
- "path": "/media/abc_email,abc_sms",
622
- "body": null
623
- },
624
- "response": {
625
- "status": 204,
626
- "body": ""
627
- }
628
- },
629
- {
630
- "description": "a DELETE request for one medium",
631
- "provider_state": "no contact exists",
632
- "request": {
633
- "method": "delete",
634
- "path": "/media/abc_email",
635
- "body": null
636
- },
637
- "response": {
638
- "status": 404,
639
- "headers": {
640
- "Content-Type": "application/vnd.api+json; charset=utf-8"
641
- },
642
- "body": {
643
- "errors": [
644
- "could not find contact 'abc'"
645
- ]
646
- }
647
- }
648
- },
649
- {
650
- "description": "a POST request with one medium",
651
- "provider_state": "a contact with id 'abc' exists",
652
- "request": {
653
- "method": "post",
654
- "path": "/contacts/abc/media",
655
- "headers": {
656
- "Content-Type": "application/vnd.api+json"
657
- },
658
- "body": {
659
- "media": [
660
- {
661
- "type": "sms",
662
- "address": "0123456789",
663
- "interval": 300,
664
- "rollup_threshold": 5
665
- }
666
- ]
667
- }
668
- },
669
- "response": {
670
- "status": 201,
671
- "headers": {
672
- "Content-Type": "application/vnd.api+json; charset=utf-8"
673
- },
674
- "body": [
675
- "abc_sms"
676
- ]
677
- }
678
- },
679
- {
680
- "description": "a POST request with two media",
681
- "provider_state": "a contact with id 'abc' exists",
682
- "request": {
683
- "method": "post",
684
- "path": "/contacts/abc/media",
685
- "headers": {
686
- "Content-Type": "application/vnd.api+json"
687
- },
688
- "body": {
689
- "media": [
690
- {
691
- "type": "sms",
692
- "address": "0123456789",
693
- "interval": 300,
694
- "rollup_threshold": 5
695
- },
696
- {
697
- "type": "email",
698
- "address": "ablated@example.org",
699
- "interval": 180,
700
- "rollup_threshold": 3
701
- }
702
- ]
703
- }
704
- },
705
- "response": {
706
- "status": 201,
707
- "headers": {
708
- "Content-Type": "application/vnd.api+json; charset=utf-8"
709
- },
710
- "body": [
711
- "abc_sms",
712
- "abc_email"
713
- ]
714
- }
715
- },
716
- {
717
- "description": "a POST request with one medium",
718
- "provider_state": "no contact exists",
719
- "request": {
720
- "method": "post",
721
- "path": "/contacts/abc/media",
722
- "headers": {
723
- "Content-Type": "application/vnd.api+json"
724
- },
725
- "body": {
726
- "media": [
727
- {
728
- "type": "sms",
729
- "address": "0123456789",
730
- "interval": 300,
731
- "rollup_threshold": 5
732
- }
733
- ]
734
- }
735
- },
736
- "response": {
737
- "status": 422,
738
- "headers": {
739
- "Content-Type": "application/vnd.api+json; charset=utf-8"
740
- },
741
- "body": {
742
- "errors": [
743
- "Contact id: 'abc' could not be loaded"
744
- ]
745
- }
746
- }
747
- },
748
- {
749
- "description": "a PATCH request for email media",
750
- "provider_state": "a contact with id 'abc' has email and sms media",
751
- "request": {
752
- "method": "patch",
753
- "path": "/media/abc_email",
754
- "headers": {
755
- "Content-Type": "application/json-patch+json"
756
- },
757
- "body": [
758
- {
759
- "op": "replace",
760
- "path": "/media/0/interval",
761
- "value": 50
762
- },
763
- {
764
- "op": "replace",
765
- "path": "/media/0/rollup_threshold",
766
- "value": 3
767
- }
768
- ]
769
- },
770
- "response": {
771
- "status": 204,
772
- "body": ""
773
- }
774
- },
775
- {
776
- "description": "a PATCH request for email and sms media",
777
- "provider_state": "a contact with id 'abc' has email and sms media",
778
- "request": {
779
- "method": "patch",
780
- "path": "/media/abc_email,abc_sms",
781
- "headers": {
782
- "Content-Type": "application/json-patch+json"
783
- },
784
- "body": [
785
- {
786
- "op": "replace",
787
- "path": "/media/0/interval",
788
- "value": 50
789
- },
790
- {
791
- "op": "replace",
792
- "path": "/media/0/rollup_threshold",
793
- "value": 3
794
- }
795
- ]
796
- },
797
- "response": {
798
- "status": 204,
799
- "body": ""
800
- }
801
- },
802
- {
803
- "description": "a PATCH request for email media",
804
- "provider_state": "no contact exists",
805
- "request": {
806
- "method": "patch",
807
- "path": "/media/abc_email",
808
- "headers": {
809
- "Content-Type": "application/json-patch+json"
810
- },
811
- "body": [
812
- {
813
- "op": "replace",
814
- "path": "/media/0/interval",
815
- "value": 50
816
- }
817
- ]
818
- },
819
- "response": {
820
- "status": 404,
821
- "headers": {
822
- "Content-Type": "application/vnd.api+json; charset=utf-8"
823
- },
824
- "body": {
825
- "errors": [
826
- "could not find contact 'abc'"
827
- ]
828
- }
829
- }
830
- },
831
- {
832
- "description": "a POST request with one test notification",
833
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
834
- "request": {
835
- "method": "post",
836
- "path": "/test_notifications/checks/www.example.com:SSH,www2.example.com:PING",
837
- "headers": {
838
- "Content-Type": "application/vnd.api+json"
839
- },
840
- "body": {
841
- "test_notifications": [
842
- {
843
- "summary": "testing"
844
- }
845
- ]
846
- }
847
- },
848
- "response": {
849
- "status": 204,
850
- "body": ""
851
- }
852
- },
853
- {
854
- "description": "a POST request with one test notification",
855
- "provider_state": "no check exists",
856
- "request": {
857
- "method": "post",
858
- "path": "/test_notifications/checks/www.example.com:SSH",
859
- "headers": {
860
- "Content-Type": "application/vnd.api+json"
861
- },
862
- "body": {
863
- "test_notifications": [
864
- {
865
- "summary": "testing"
866
- }
867
- ]
868
- }
869
- },
870
- "response": {
871
- "status": 404,
872
- "body": {
873
- "errors": [
874
- "could not find entity 'www.example.com'"
875
- ]
876
- }
877
- }
878
- },
879
- {
880
- "description": "a POST request with one test notification",
881
- "provider_state": "a check 'www.example.com:SSH' exists",
882
- "request": {
883
- "method": "post",
884
- "path": "/test_notifications/checks/www.example.com:SSH",
885
- "headers": {
886
- "Content-Type": "application/vnd.api+json"
887
- },
888
- "body": {
889
- "test_notifications": [
890
- {
891
- "summary": "testing"
892
- }
893
- ]
894
- }
895
- },
896
- "response": {
897
- "status": 204,
898
- "body": ""
899
- }
900
- },
901
- {
902
- "description": "a POST request with two test notifications",
903
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
904
- "request": {
905
- "method": "post",
906
- "path": "/test_notifications/checks/www.example.com:SSH,www2.example.com:PING",
907
- "headers": {
908
- "Content-Type": "application/vnd.api+json"
909
- },
910
- "body": {
911
- "test_notifications": [
912
- {
913
- "summary": "testing"
914
- },
915
- {
916
- "summary": "more tests"
917
- }
918
- ]
919
- }
920
- },
921
- "response": {
922
- "status": 204,
923
- "body": ""
924
- }
925
- },
926
- {
927
- "description": "a POST request with two test notifications",
928
- "provider_state": "a check 'www.example.com:SSH' exists",
929
- "request": {
930
- "method": "post",
931
- "path": "/test_notifications/checks/www.example.com:SSH",
932
- "headers": {
933
- "Content-Type": "application/vnd.api+json"
934
- },
935
- "body": {
936
- "test_notifications": [
937
- {
938
- "summary": "testing"
939
- },
940
- {
941
- "summary": "more tests"
942
- }
943
- ]
944
- }
945
- },
946
- "response": {
947
- "status": 204,
948
- "body": ""
949
- }
950
- },
951
- {
952
- "description": "a POST request with one test notification",
953
- "provider_state": "entities 'www.example.com', id '1234' and 'www2.example.com', id '5678' exist",
954
- "request": {
955
- "method": "post",
956
- "path": "/test_notifications/entities/1234,5678",
957
- "headers": {
958
- "Content-Type": "application/vnd.api+json"
959
- },
960
- "body": {
961
- "test_notifications": [
962
- {
963
- "summary": "testing"
964
- }
965
- ]
966
- }
967
- },
968
- "response": {
969
- "status": 204,
970
- "body": ""
971
- }
972
- },
973
- {
974
- "description": "a POST request with one test notification",
975
- "provider_state": "no entity exists",
976
- "request": {
977
- "method": "post",
978
- "path": "/test_notifications/entities/1234",
979
- "headers": {
980
- "Content-Type": "application/vnd.api+json"
981
- },
982
- "body": {
983
- "test_notifications": [
984
- {
985
- "summary": "testing"
986
- }
987
- ]
988
- }
989
- },
990
- "response": {
991
- "status": 404,
992
- "body": {
993
- "errors": [
994
- "could not find entity '1234'"
995
- ]
996
- }
997
- }
998
- },
999
- {
1000
- "description": "a POST request with one test notification",
1001
- "provider_state": "an entity 'www.example.com' with id '1234' exists",
1002
- "request": {
1003
- "method": "post",
1004
- "path": "/test_notifications/entities/1234",
1005
- "headers": {
1006
- "Content-Type": "application/vnd.api+json"
1007
- },
1008
- "body": {
1009
- "test_notifications": [
1010
- {
1011
- }
1012
- ]
1013
- }
1014
- },
1015
- "response": {
1016
- "status": 204,
1017
- "body": ""
1018
- }
1019
- },
1020
- {
1021
- "description": "a POST request with two test notifications",
1022
- "provider_state": "entities 'www.example.com', id '1234' and 'www2.example.com', id '5678' exist",
1023
- "request": {
1024
- "method": "post",
1025
- "path": "/test_notifications/entities/1234,5678",
1026
- "headers": {
1027
- "Content-Type": "application/vnd.api+json"
1028
- },
1029
- "body": {
1030
- "test_notifications": [
1031
- {
1032
- "summary": "testing"
1033
- },
1034
- {
1035
- "summary": "more tests"
1036
- }
1037
- ]
1038
- }
1039
- },
1040
- "response": {
1041
- "status": 204,
1042
- "body": ""
1043
- }
1044
- },
1045
- {
1046
- "description": "a POST request with two test notifications",
1047
- "provider_state": "an entity 'www.example.com' with id '1234' exists",
1048
- "request": {
1049
- "method": "post",
1050
- "path": "/test_notifications/entities/1234",
1051
- "headers": {
1052
- "Content-Type": "application/vnd.api+json"
1053
- },
1054
- "body": {
1055
- "test_notifications": [
1056
- {
1057
- "summary": "testing"
1058
- },
1059
- {
1060
- "summary": "more tests"
1061
- }
1062
- ]
1063
- }
1064
- },
1065
- "response": {
1066
- "status": 204,
1067
- "body": ""
1068
- }
1069
- },
1070
- {
1071
- "description": "a POST request with one unscheduled maintenance period",
1072
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
1073
- "request": {
1074
- "method": "post",
1075
- "path": "/unscheduled_maintenances/checks/www.example.com:SSH,www2.example.com:PING",
1076
- "headers": {
1077
- "Content-Type": "application/vnd.api+json"
1078
- },
1079
- "body": {
1080
- "unscheduled_maintenances": [
1081
- {
1082
- "duration": 3600,
1083
- "summary": "working"
1084
- }
1085
- ]
1086
- }
1087
- },
1088
- "response": {
1089
- "status": 204,
1090
- "body": ""
1091
- }
1092
- },
1093
- {
1094
- "description": "a POST request with one unscheduled maintenance period",
1095
- "provider_state": "no check exists",
1096
- "request": {
1097
- "method": "post",
1098
- "path": "/unscheduled_maintenances/checks/www.example.com:SSH",
1099
- "headers": {
1100
- "Content-Type": "application/vnd.api+json"
1101
- },
1102
- "body": {
1103
- "unscheduled_maintenances": [
1104
- {
1105
- "duration": 3600,
1106
- "summary": "working"
1107
- }
1108
- ]
1109
- }
1110
- },
1111
- "response": {
1112
- "status": 404,
1113
- "body": {
1114
- "errors": [
1115
- "could not find entity 'www.example.com'"
1116
- ]
1117
- }
1118
- }
1119
- },
1120
- {
1121
- "description": "a POST request with one unscheduled maintenance period",
1122
- "provider_state": "a check 'www.example.com:SSH' exists",
1123
- "request": {
1124
- "method": "post",
1125
- "path": "/unscheduled_maintenances/checks/www.example.com:SSH",
1126
- "headers": {
1127
- "Content-Type": "application/vnd.api+json"
1128
- },
1129
- "body": {
1130
- "unscheduled_maintenances": [
1131
- {
1132
- "duration": 3600,
1133
- "summary": "working"
1134
- }
1135
- ]
1136
- }
1137
- },
1138
- "response": {
1139
- "status": 204,
1140
- "body": ""
1141
- }
1142
- },
1143
- {
1144
- "description": "a POST request with two unscheduled maintenance periods",
1145
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
1146
- "request": {
1147
- "method": "post",
1148
- "path": "/unscheduled_maintenances/checks/www.example.com:SSH,www2.example.com:PING",
1149
- "headers": {
1150
- "Content-Type": "application/vnd.api+json"
1151
- },
1152
- "body": {
1153
- "unscheduled_maintenances": [
1154
- {
1155
- "duration": 3600,
1156
- "summary": "working"
1157
- },
1158
- {
1159
- "duration": 3600,
1160
- "summary": "more work"
1161
- }
1162
- ]
1163
- }
1164
- },
1165
- "response": {
1166
- "status": 204,
1167
- "body": ""
1168
- }
1169
- },
1170
- {
1171
- "description": "a POST request with two unscheduled maintenance periods",
1172
- "provider_state": "a check 'www.example.com:SSH' exists",
1173
- "request": {
1174
- "method": "post",
1175
- "path": "/unscheduled_maintenances/checks/www.example.com:SSH",
1176
- "headers": {
1177
- "Content-Type": "application/vnd.api+json"
1178
- },
1179
- "body": {
1180
- "unscheduled_maintenances": [
1181
- {
1182
- "duration": 3600,
1183
- "summary": "working"
1184
- },
1185
- {
1186
- "duration": 3600,
1187
- "summary": "more work"
1188
- }
1189
- ]
1190
- }
1191
- },
1192
- "response": {
1193
- "status": 204,
1194
- "body": ""
1195
- }
1196
- },
1197
- {
1198
- "description": "a POST request with one scheduled maintenance period",
1199
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
1200
- "request": {
1201
- "method": "post",
1202
- "path": "/scheduled_maintenances/checks/www.example.com:SSH,www2.example.com:PING",
1203
- "headers": {
1204
- "Content-Type": "application/vnd.api+json"
1205
- },
1206
- "body": {
1207
- "scheduled_maintenances": [
1208
- {
1209
- "start_time": "2015-10-30T15:13:12+10:30",
1210
- "duration": 3600,
1211
- "summary": "working"
1212
- }
1213
- ]
1214
- }
1215
- },
1216
- "response": {
1217
- "status": 204,
1218
- "body": ""
1219
- }
1220
- },
1221
- {
1222
- "description": "a POST request with one scheduled maintenance period",
1223
- "provider_state": "no check exists",
1224
- "request": {
1225
- "method": "post",
1226
- "path": "/scheduled_maintenances/checks/www.example.com:SSH",
1227
- "headers": {
1228
- "Content-Type": "application/vnd.api+json"
1229
- },
1230
- "body": {
1231
- "scheduled_maintenances": [
1232
- {
1233
- "start_time": "2015-10-30T15:13:12+10:30",
1234
- "duration": 3600,
1235
- "summary": "working"
1236
- }
1237
- ]
1238
- }
1239
- },
1240
- "response": {
1241
- "status": 404,
1242
- "body": {
1243
- "errors": [
1244
- "could not find entity 'www.example.com'"
1245
- ]
1246
- }
1247
- }
1248
- },
1249
- {
1250
- "description": "a POST request with one scheduled maintenance period",
1251
- "provider_state": "a check 'www.example.com:SSH' exists",
1252
- "request": {
1253
- "method": "post",
1254
- "path": "/scheduled_maintenances/checks/www.example.com:SSH",
1255
- "headers": {
1256
- "Content-Type": "application/vnd.api+json"
1257
- },
1258
- "body": {
1259
- "scheduled_maintenances": [
1260
- {
1261
- "start_time": "2015-10-30T15:13:12+10:30",
1262
- "duration": 3600,
1263
- "summary": "working"
1264
- }
1265
- ]
1266
- }
1267
- },
1268
- "response": {
1269
- "status": 204,
1270
- "body": ""
1271
- }
1272
- },
1273
- {
1274
- "description": "a POST request with two scheduled maintenance periods",
1275
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
1276
- "request": {
1277
- "method": "post",
1278
- "path": "/scheduled_maintenances/checks/www.example.com:SSH,www2.example.com:PING",
1279
- "headers": {
1280
- "Content-Type": "application/vnd.api+json"
1281
- },
1282
- "body": {
1283
- "scheduled_maintenances": [
1284
- {
1285
- "start_time": "2015-10-30T15:13:12+10:30",
1286
- "duration": 3600,
1287
- "summary": "working"
1288
- },
1289
- {
1290
- "start_time": "2015-10-30T17:13:12+10:30",
1291
- "duration": 3600,
1292
- "summary": "more work"
1293
- }
1294
- ]
1295
- }
1296
- },
1297
- "response": {
1298
- "status": 204,
1299
- "body": ""
1300
- }
1301
- },
1302
- {
1303
- "description": "a POST request with two scheduled maintenance periods",
1304
- "provider_state": "a check 'www.example.com:SSH' exists",
1305
- "request": {
1306
- "method": "post",
1307
- "path": "/scheduled_maintenances/checks/www.example.com:SSH",
1308
- "headers": {
1309
- "Content-Type": "application/vnd.api+json"
1310
- },
1311
- "body": {
1312
- "scheduled_maintenances": [
1313
- {
1314
- "start_time": "2015-10-30T15:13:12+10:30",
1315
- "duration": 3600,
1316
- "summary": "working"
1317
- },
1318
- {
1319
- "start_time": "2015-10-30T17:13:12+10:30",
1320
- "duration": 3600,
1321
- "summary": "more work"
1322
- }
1323
- ]
1324
- }
1325
- },
1326
- "response": {
1327
- "status": 204,
1328
- "body": ""
1329
- }
1330
- },
1331
- {
1332
- "description": "a PATCH request for an unscheduled maintenance period",
1333
- "provider_state": "a check 'www.example.com:SSH' exists",
1334
- "request": {
1335
- "method": "patch",
1336
- "path": "/unscheduled_maintenances/checks/www.example.com:SSH",
1337
- "headers": {
1338
- "Content-Type": "application/json-patch+json"
1339
- },
1340
- "body": [
1341
- {
1342
- "op": "replace",
1343
- "path": "/unscheduled_maintenances/0/end_time",
1344
- "value": "2015-10-30T15:13:12+10:30"
1345
- }
1346
- ]
1347
- },
1348
- "response": {
1349
- "status": 204,
1350
- "body": ""
1351
- }
1352
- },
1353
- {
1354
- "description": "a PATCH request for an unscheduled maintenance period",
1355
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
1356
- "request": {
1357
- "method": "patch",
1358
- "path": "/unscheduled_maintenances/checks/www.example.com:SSH,www2.example.com:PING",
1359
- "headers": {
1360
- "Content-Type": "application/json-patch+json"
1361
- },
1362
- "body": [
1363
- {
1364
- "op": "replace",
1365
- "path": "/unscheduled_maintenances/0/end_time",
1366
- "value": "2015-10-30T15:13:12+10:30"
1367
- }
1368
- ]
1369
- },
1370
- "response": {
1371
- "status": 204,
1372
- "body": ""
1373
- }
1374
- },
1375
- {
1376
- "description": "a PATCH request for an unscheduled maintenance period",
1377
- "provider_state": "no check exists",
1378
- "request": {
1379
- "method": "patch",
1380
- "path": "/unscheduled_maintenances/checks/www.example.com:SSH",
1381
- "headers": {
1382
- "Content-Type": "application/json-patch+json"
1383
- },
1384
- "body": [
1385
- {
1386
- "op": "replace",
1387
- "path": "/unscheduled_maintenances/0/end_time",
1388
- "value": "2015-10-30T15:13:12+10:30"
1389
- }
1390
- ]
1391
- },
1392
- "response": {
1393
- "status": 404,
1394
- "body": {
1395
- "errors": [
1396
- "could not find entity 'www.example.com'"
1397
- ]
1398
- }
1399
- }
1400
- },
1401
- {
1402
- "description": "a DELETE request for a scheduled maintenance period",
1403
- "provider_state": "a check 'www.example.com:SSH' exists",
1404
- "request": {
1405
- "method": "delete",
1406
- "path": "/scheduled_maintenances/checks/www.example.com:SSH",
1407
- "query": "start_time=2015-10-30T15%3A13%3A12%2B10%3A30"
1408
- },
1409
- "response": {
1410
- "status": 204,
1411
- "body": ""
1412
- }
1413
- },
1414
- {
1415
- "description": "a DELETE request for a scheduled maintenance period",
1416
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
1417
- "request": {
1418
- "method": "delete",
1419
- "path": "/scheduled_maintenances/checks/www.example.com:SSH,www2.example.com:PING",
1420
- "query": "start_time=2015-10-30T15%3A13%3A12%2B10%3A30"
1421
- },
1422
- "response": {
1423
- "status": 204,
1424
- "body": ""
1425
- }
1426
- },
1427
- {
1428
- "description": "a DELETE request for a scheduled maintenance period",
1429
- "provider_state": "no check exists",
1430
- "request": {
1431
- "method": "delete",
1432
- "path": "/scheduled_maintenances/checks/www.example.com:SSH",
1433
- "query": "start_time=2015-10-30T15%3A13%3A12%2B10%3A30"
1434
- },
1435
- "response": {
1436
- "status": 404,
1437
- "body": {
1438
- "errors": [
1439
- "could not find entity 'www.example.com'"
1440
- ]
1441
- }
1442
- }
1443
- },
1444
- {
1445
- "description": "a POST request with one unscheduled maintenance period",
1446
- "provider_state": "entities 'www.example.com', id '1234' and 'www2.example.com', id '5678' exist",
1447
- "request": {
1448
- "method": "post",
1449
- "path": "/unscheduled_maintenances/entities/1234,5678",
1450
- "headers": {
1451
- "Content-Type": "application/vnd.api+json"
1452
- },
1453
- "body": {
1454
- "unscheduled_maintenances": [
1455
- {
1456
- "duration": 3600,
1457
- "summary": "working"
1458
- }
1459
- ]
1460
- }
1461
- },
1462
- "response": {
1463
- "status": 204,
1464
- "body": ""
1465
- }
1466
- },
1467
- {
1468
- "description": "a POST request with one unscheduled maintenance period",
1469
- "provider_state": "no entity exists",
1470
- "request": {
1471
- "method": "post",
1472
- "path": "/unscheduled_maintenances/entities/1234",
1473
- "headers": {
1474
- "Content-Type": "application/vnd.api+json"
1475
- },
1476
- "body": {
1477
- "unscheduled_maintenances": [
1478
- {
1479
- "duration": 3600,
1480
- "summary": "working"
1481
- }
1482
- ]
1483
- }
1484
- },
1485
- "response": {
1486
- "status": 404,
1487
- "body": {
1488
- "errors": [
1489
- "could not find entity '1234'"
1490
- ]
1491
- }
1492
- }
1493
- },
1494
- {
1495
- "description": "a POST request with one unscheduled maintenance period",
1496
- "provider_state": "an entity 'www.example.com' with id '1234' exists",
1497
- "request": {
1498
- "method": "post",
1499
- "path": "/unscheduled_maintenances/entities/1234",
1500
- "headers": {
1501
- "Content-Type": "application/vnd.api+json"
1502
- },
1503
- "body": {
1504
- "unscheduled_maintenances": [
1505
- {
1506
- "duration": 3600,
1507
- "summary": "working"
1508
- }
1509
- ]
1510
- }
1511
- },
1512
- "response": {
1513
- "status": 204,
1514
- "body": ""
1515
- }
1516
- },
1517
- {
1518
- "description": "a POST request with two unscheduled maintenance periods",
1519
- "provider_state": "entities 'www.example.com', id '1234' and 'www2.example.com', id '5678' exist",
1520
- "request": {
1521
- "method": "post",
1522
- "path": "/unscheduled_maintenances/entities/1234,5678",
1523
- "headers": {
1524
- "Content-Type": "application/vnd.api+json"
1525
- },
1526
- "body": {
1527
- "unscheduled_maintenances": [
1528
- {
1529
- "duration": 3600,
1530
- "summary": "working"
1531
- },
1532
- {
1533
- "duration": 3600,
1534
- "summary": "more work"
1535
- }
1536
- ]
1537
- }
1538
- },
1539
- "response": {
1540
- "status": 204,
1541
- "body": ""
1542
- }
1543
- },
1544
- {
1545
- "description": "a POST request with two unscheduled maintenance periods",
1546
- "provider_state": "an entity 'www.example.com' with id '1234' exists",
1547
- "request": {
1548
- "method": "post",
1549
- "path": "/unscheduled_maintenances/entities/1234",
1550
- "headers": {
1551
- "Content-Type": "application/vnd.api+json"
1552
- },
1553
- "body": {
1554
- "unscheduled_maintenances": [
1555
- {
1556
- "duration": 3600,
1557
- "summary": "working"
1558
- },
1559
- {
1560
- "duration": 3600,
1561
- "summary": "more work"
1562
- }
1563
- ]
1564
- }
1565
- },
1566
- "response": {
1567
- "status": 204,
1568
- "body": ""
1569
- }
1570
- },
1571
- {
1572
- "description": "a POST request with one scheduled maintenance period",
1573
- "provider_state": "entities 'www.example.com', id '1234' and 'www2.example.com', id '5678' exist",
1574
- "request": {
1575
- "method": "post",
1576
- "path": "/scheduled_maintenances/entities/1234,5678",
1577
- "headers": {
1578
- "Content-Type": "application/vnd.api+json"
1579
- },
1580
- "body": {
1581
- "scheduled_maintenances": [
1582
- {
1583
- "start_time": "2015-10-30T15:13:12+10:30",
1584
- "duration": 3600,
1585
- "summary": "working"
1586
- }
1587
- ]
1588
- }
1589
- },
1590
- "response": {
1591
- "status": 204,
1592
- "body": ""
1593
- }
1594
- },
1595
- {
1596
- "description": "a POST request with one scheduled maintenance period",
1597
- "provider_state": "no entity exists",
1598
- "request": {
1599
- "method": "post",
1600
- "path": "/scheduled_maintenances/entities/1234",
1601
- "headers": {
1602
- "Content-Type": "application/vnd.api+json"
1603
- },
1604
- "body": {
1605
- "scheduled_maintenances": [
1606
- {
1607
- "start_time": "2015-10-30T15:13:12+10:30",
1608
- "duration": 3600,
1609
- "summary": "working"
1610
- }
1611
- ]
1612
- }
1613
- },
1614
- "response": {
1615
- "status": 404,
1616
- "body": {
1617
- "errors": [
1618
- "could not find entity '1234'"
1619
- ]
1620
- }
1621
- }
1622
- },
1623
- {
1624
- "description": "a POST request with one scheduled maintenance period",
1625
- "provider_state": "an entity 'www.example.com' with id '1234' exists",
1626
- "request": {
1627
- "method": "post",
1628
- "path": "/scheduled_maintenances/entities/1234",
1629
- "headers": {
1630
- "Content-Type": "application/vnd.api+json"
1631
- },
1632
- "body": {
1633
- "scheduled_maintenances": [
1634
- {
1635
- "start_time": "2015-10-30T15:13:12+10:30",
1636
- "duration": 3600,
1637
- "summary": "working"
1638
- }
1639
- ]
1640
- }
1641
- },
1642
- "response": {
1643
- "status": 204,
1644
- "body": ""
1645
- }
1646
- },
1647
- {
1648
- "description": "a POST request with two scheduled maintenance periods",
1649
- "provider_state": "entities 'www.example.com', id '1234' and 'www2.example.com', id '5678' exist",
1650
- "request": {
1651
- "method": "post",
1652
- "path": "/scheduled_maintenances/entities/1234,5678",
1653
- "headers": {
1654
- "Content-Type": "application/vnd.api+json"
1655
- },
1656
- "body": {
1657
- "scheduled_maintenances": [
1658
- {
1659
- "start_time": "2015-10-30T15:13:12+10:30",
1660
- "duration": 3600,
1661
- "summary": "working"
1662
- },
1663
- {
1664
- "start_time": "2015-10-30T17:13:12+10:30",
1665
- "duration": 3600,
1666
- "summary": "more work"
1667
- }
1668
- ]
1669
- }
1670
- },
1671
- "response": {
1672
- "status": 204,
1673
- "body": ""
1674
- }
1675
- },
1676
- {
1677
- "description": "a POST request with two scheduled maintenance periods",
1678
- "provider_state": "an entity 'www.example.com' with id '1234' exists",
1679
- "request": {
1680
- "method": "post",
1681
- "path": "/scheduled_maintenances/entities/1234",
1682
- "headers": {
1683
- "Content-Type": "application/vnd.api+json"
1684
- },
1685
- "body": {
1686
- "scheduled_maintenances": [
1687
- {
1688
- "start_time": "2015-10-30T15:13:12+10:30",
1689
- "duration": 3600,
1690
- "summary": "working"
1691
- },
1692
- {
1693
- "start_time": "2015-10-30T17:13:12+10:30",
1694
- "duration": 3600,
1695
- "summary": "more work"
1696
- }
1697
- ]
1698
- }
1699
- },
1700
- "response": {
1701
- "status": 204,
1702
- "body": ""
1703
- }
1704
- },
1705
- {
1706
- "description": "a PATCH request for an unscheduled maintenance period",
1707
- "provider_state": "an entity 'www.example.com' with id '1234' exists",
1708
- "request": {
1709
- "method": "patch",
1710
- "path": "/unscheduled_maintenances/entities/1234",
1711
- "headers": {
1712
- "Content-Type": "application/json-patch+json"
1713
- },
1714
- "body": [
1715
- {
1716
- "op": "replace",
1717
- "path": "/unscheduled_maintenances/0/end_time",
1718
- "value": "2015-10-30T15:13:12+10:30"
1719
- }
1720
- ]
1721
- },
1722
- "response": {
1723
- "status": 204,
1724
- "body": ""
1725
- }
1726
- },
1727
- {
1728
- "description": "a PATCH request for an unscheduled maintenance period",
1729
- "provider_state": "entities 'www.example.com', id '1234' and 'www2.example.com', id '5678' exist",
1730
- "request": {
1731
- "method": "patch",
1732
- "path": "/unscheduled_maintenances/entities/1234,5678",
1733
- "headers": {
1734
- "Content-Type": "application/json-patch+json"
1735
- },
1736
- "body": [
1737
- {
1738
- "op": "replace",
1739
- "path": "/unscheduled_maintenances/0/end_time",
1740
- "value": "2015-10-30T15:13:12+10:30"
1741
- }
1742
- ]
1743
- },
1744
- "response": {
1745
- "status": 204,
1746
- "body": ""
1747
- }
1748
- },
1749
- {
1750
- "description": "a PATCH request for an unscheduled maintenance period",
1751
- "provider_state": "no entity exists",
1752
- "request": {
1753
- "method": "patch",
1754
- "path": "/unscheduled_maintenances/entities/1234",
1755
- "headers": {
1756
- "Content-Type": "application/json-patch+json"
1757
- },
1758
- "body": [
1759
- {
1760
- "op": "replace",
1761
- "path": "/unscheduled_maintenances/0/end_time",
1762
- "value": "2015-10-30T15:13:12+10:30"
1763
- }
1764
- ]
1765
- },
1766
- "response": {
1767
- "status": 404,
1768
- "body": {
1769
- "errors": [
1770
- "could not find entity '1234'"
1771
- ]
1772
- }
1773
- }
1774
- },
1775
- {
1776
- "description": "a DELETE request for a scheduled maintenance period",
1777
- "provider_state": "an entity 'www.example.com' with id '1234' exists",
1778
- "request": {
1779
- "method": "delete",
1780
- "path": "/scheduled_maintenances/entities/1234",
1781
- "query": "start_time=2015-10-30T15%3A13%3A12%2B10%3A30"
1782
- },
1783
- "response": {
1784
- "status": 204,
1785
- "body": ""
1786
- }
1787
- },
1788
- {
1789
- "description": "a DELETE request for a scheduled maintenance period",
1790
- "provider_state": "entities 'www.example.com', id '1234' and 'www2.example.com', id '5678' exist",
1791
- "request": {
1792
- "method": "delete",
1793
- "path": "/scheduled_maintenances/entities/1234,5678",
1794
- "query": "start_time=2015-10-30T15%3A13%3A12%2B10%3A30"
1795
- },
1796
- "response": {
1797
- "status": 204,
1798
- "body": ""
1799
- }
1800
- },
1801
- {
1802
- "description": "a DELETE request for a scheduled maintenance period",
1803
- "provider_state": "no entity exists",
1804
- "request": {
1805
- "method": "delete",
1806
- "path": "/scheduled_maintenances/entities/1234",
1807
- "query": "start_time=2015-10-30T15%3A13%3A12%2B10%3A30"
1808
- },
1809
- "response": {
1810
- "status": 404,
1811
- "body": {
1812
- "errors": [
1813
- "could not find entity '1234'"
1814
- ]
1815
- }
1816
- }
1817
- },
1818
- {
1819
- "description": "a time limited GET request for a scheduled_maintenance report on one entity",
1820
- "provider_state": "a check 'www.example.com:SSH' exists",
1821
- "request": {
1822
- "method": "get",
1823
- "path": "/scheduled_maintenance_report/entities/1234",
1824
- "query": "start_time=2015-10-30T15%3A13%3A12%2B10%3A30&end_time=2015-10-31T03%3A13%3A12%2B10%3A30"
1825
- },
1826
- "response": {
1827
- "status": 200,
1828
- "headers": {
1829
- "Content-Type": "application/vnd.api+json; charset=utf-8"
1830
- },
1831
- "body": {
1832
- "scheduled_maintenance_reports": [
1833
- {
1834
- "scheduled_maintenances": [
1835
-
1836
- ],
1837
- "links": {
1838
- "entity": [
1839
- "1234"
1840
- ],
1841
- "check": [
1842
- "www.example.com:SSH"
1843
- ]
1844
- }
1845
- }
1846
- ]
1847
- }
1848
- }
1849
- },
1850
- {
1851
- "description": "a time limited GET request for a outage report on two entities",
1852
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
1853
- "request": {
1854
- "method": "get",
1855
- "path": "/outage_report/entities/1234,5678",
1856
- "query": "start_time=2015-10-30T15%3A13%3A12%2B10%3A30&end_time=2015-10-31T03%3A13%3A12%2B10%3A30"
1857
- },
1858
- "response": {
1859
- "status": 200,
1860
- "headers": {
1861
- "Content-Type": "application/vnd.api+json; charset=utf-8"
1862
- },
1863
- "body": {
1864
- "outage_reports": [
1865
- {
1866
- "outages": [
1867
-
1868
- ],
1869
- "links": {
1870
- "entity": [
1871
- "1234"
1872
- ],
1873
- "check": [
1874
- "www.example.com:SSH"
1875
- ]
1876
- }
1877
- },
1878
- {
1879
- "outages": [
1880
-
1881
- ],
1882
- "links": {
1883
- "entity": [
1884
- "5678"
1885
- ],
1886
- "check": [
1887
- "www2.example.com:PING"
1888
- ]
1889
- }
1890
- }
1891
- ]
1892
- }
1893
- }
1894
- },
1895
- {
1896
- "description": "a GET request for a unscheduled_maintenance report on two checks",
1897
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
1898
- "request": {
1899
- "method": "get",
1900
- "path": "/unscheduled_maintenance_report/checks/www.example.com:SSH,www2.example.com:PING"
1901
- },
1902
- "response": {
1903
- "status": 200,
1904
- "headers": {
1905
- "Content-Type": "application/vnd.api+json; charset=utf-8"
1906
- },
1907
- "body": {
1908
- "unscheduled_maintenance_reports": [
1909
- {
1910
- "unscheduled_maintenances": [
1911
-
1912
- ],
1913
- "links": {
1914
- "entity": [
1915
- "1234"
1916
- ],
1917
- "check": [
1918
- "www.example.com:SSH"
1919
- ]
1920
- }
1921
- },
1922
- {
1923
- "unscheduled_maintenances": [
1924
-
1925
- ],
1926
- "links": {
1927
- "entity": [
1928
- "5678"
1929
- ],
1930
- "check": [
1931
- "www2.example.com:PING"
1932
- ]
1933
- }
1934
- }
1935
- ]
1936
- }
1937
- }
1938
- },
1939
- {
1940
- "description": "a time limited GET request for a unscheduled_maintenance report on one entity",
1941
- "provider_state": "a check 'www.example.com:SSH' exists",
1942
- "request": {
1943
- "method": "get",
1944
- "path": "/unscheduled_maintenance_report/entities/1234",
1945
- "query": "start_time=2015-10-30T15%3A13%3A12%2B10%3A30&end_time=2015-10-31T03%3A13%3A12%2B10%3A30"
1946
- },
1947
- "response": {
1948
- "status": 200,
1949
- "headers": {
1950
- "Content-Type": "application/vnd.api+json; charset=utf-8"
1951
- },
1952
- "body": {
1953
- "unscheduled_maintenance_reports": [
1954
- {
1955
- "unscheduled_maintenances": [
1956
-
1957
- ],
1958
- "links": {
1959
- "entity": [
1960
- "1234"
1961
- ],
1962
- "check": [
1963
- "www.example.com:SSH"
1964
- ]
1965
- }
1966
- }
1967
- ]
1968
- }
1969
- }
1970
- },
1971
- {
1972
- "description": "a GET request for a status report on all entities",
1973
- "provider_state": "a check 'www.example.com:SSH' exists",
1974
- "request": {
1975
- "method": "get",
1976
- "path": "/status_report/entities"
1977
- },
1978
- "response": {
1979
- "status": 200,
1980
- "headers": {
1981
- "Content-Type": "application/vnd.api+json; charset=utf-8"
1982
- },
1983
- "body": {
1984
- "status_reports": [
1985
- {
1986
- }
1987
- ]
1988
- }
1989
- }
1990
- },
1991
- {
1992
- "description": "a GET request for a status report on two entities",
1993
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
1994
- "request": {
1995
- "method": "get",
1996
- "path": "/status_report/entities/1234,5678"
1997
- },
1998
- "response": {
1999
- "status": 200,
2000
- "headers": {
2001
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2002
- },
2003
- "body": {
2004
- "status_reports": [
2005
- {
2006
- },
2007
- {
2008
- }
2009
- ]
2010
- }
2011
- }
2012
- },
2013
- {
2014
- "description": "a GET request for a outage report on all checks",
2015
- "provider_state": "a check 'www.example.com:SSH' exists",
2016
- "request": {
2017
- "method": "get",
2018
- "path": "/outage_report/checks"
2019
- },
2020
- "response": {
2021
- "status": 200,
2022
- "headers": {
2023
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2024
- },
2025
- "body": {
2026
- "outage_reports": [
2027
- {
2028
- "outages": [
2029
-
2030
- ],
2031
- "links": {
2032
- "entity": [
2033
- "1234"
2034
- ],
2035
- "check": [
2036
- "www.example.com:SSH"
2037
- ]
2038
- }
2039
- }
2040
- ]
2041
- }
2042
- }
2043
- },
2044
- {
2045
- "description": "a time-limited GET request for a downtime report on two checks",
2046
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
2047
- "request": {
2048
- "method": "get",
2049
- "path": "/downtime_report/checks/www.example.com:SSH,www2.example.com:PING",
2050
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2051
- },
2052
- "response": {
2053
- "status": 200,
2054
- "headers": {
2055
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2056
- },
2057
- "body": {
2058
- "downtime_reports": [
2059
- {
2060
- },
2061
- {
2062
- }
2063
- ]
2064
- }
2065
- }
2066
- },
2067
- {
2068
- "description": "a GET request for a status report on one entity",
2069
- "provider_state": "a check 'www.example.com:SSH' exists",
2070
- "request": {
2071
- "method": "get",
2072
- "path": "/status_report/entities/1234"
2073
- },
2074
- "response": {
2075
- "status": 200,
2076
- "headers": {
2077
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2078
- },
2079
- "body": {
2080
- "status_reports": [
2081
- {
2082
- }
2083
- ]
2084
- }
2085
- }
2086
- },
2087
- {
2088
- "description": "a time-limited GET request for a unscheduled_maintenance report on two checks",
2089
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
2090
- "request": {
2091
- "method": "get",
2092
- "path": "/unscheduled_maintenance_report/checks/www.example.com:SSH,www2.example.com:PING",
2093
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2094
- },
2095
- "response": {
2096
- "status": 200,
2097
- "headers": {
2098
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2099
- },
2100
- "body": {
2101
- "unscheduled_maintenance_reports": [
2102
- {
2103
- "unscheduled_maintenances": [
2104
-
2105
- ],
2106
- "links": {
2107
- "entity": [
2108
- "1234"
2109
- ],
2110
- "check": [
2111
- "www.example.com:SSH"
2112
- ]
2113
- }
2114
- },
2115
- {
2116
- "unscheduled_maintenances": [
2117
-
2118
- ],
2119
- "links": {
2120
- "entity": [
2121
- "5678"
2122
- ],
2123
- "check": [
2124
- "www2.example.com:PING"
2125
- ]
2126
- }
2127
- }
2128
- ]
2129
- }
2130
- }
2131
- },
2132
- {
2133
- "description": "a time limited GET request for a outage report on all checks",
2134
- "provider_state": "a check 'www.example.com:SSH' exists",
2135
- "request": {
2136
- "method": "get",
2137
- "path": "/outage_report/checks",
2138
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2139
- },
2140
- "response": {
2141
- "status": 200,
2142
- "headers": {
2143
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2144
- },
2145
- "body": {
2146
- "outage_reports": [
2147
- {
2148
- "outages": [
2149
-
2150
- ],
2151
- "links": {
2152
- "entity": [
2153
- "1234"
2154
- ],
2155
- "check": [
2156
- "www.example.com:SSH"
2157
- ]
2158
- }
2159
- }
2160
- ]
2161
- }
2162
- }
2163
- },
2164
- {
2165
- "description": "a time limited GET request for a downtime report on one entity",
2166
- "provider_state": "a check 'www.example.com:SSH' exists",
2167
- "request": {
2168
- "method": "get",
2169
- "path": "/downtime_report/entities/1234",
2170
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2171
- },
2172
- "response": {
2173
- "status": 200,
2174
- "headers": {
2175
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2176
- },
2177
- "body": {
2178
- "downtime_reports": [
2179
- {
2180
- }
2181
- ]
2182
- }
2183
- }
2184
- },
2185
- {
2186
- "description": "a time limited GET request for a outage report on all entities",
2187
- "provider_state": "a check 'www.example.com:SSH' exists",
2188
- "request": {
2189
- "method": "get",
2190
- "path": "/outage_report/entities",
2191
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2192
- },
2193
- "response": {
2194
- "status": 200,
2195
- "headers": {
2196
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2197
- },
2198
- "body": {
2199
- "outage_reports": [
2200
- {
2201
- "outages": [
2202
-
2203
- ],
2204
- "links": {
2205
- "entity": [
2206
- "1234"
2207
- ],
2208
- "check": [
2209
- "www.example.com:SSH"
2210
- ]
2211
- }
2212
- }
2213
- ]
2214
- }
2215
- }
2216
- },
2217
- {
2218
- "description": "a time-limited GET request for a outage report on two checks",
2219
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
2220
- "request": {
2221
- "method": "get",
2222
- "path": "/outage_report/checks/www.example.com:SSH,www2.example.com:PING",
2223
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2224
- },
2225
- "response": {
2226
- "status": 200,
2227
- "headers": {
2228
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2229
- },
2230
- "body": {
2231
- "outage_reports": [
2232
- {
2233
- "outages": [
2234
-
2235
- ],
2236
- "links": {
2237
- "entity": [
2238
- "1234"
2239
- ],
2240
- "check": [
2241
- "www.example.com:SSH"
2242
- ]
2243
- }
2244
- },
2245
- {
2246
- "outages": [
2247
-
2248
- ],
2249
- "links": {
2250
- "entity": [
2251
- "5678"
2252
- ],
2253
- "check": [
2254
- "www2.example.com:PING"
2255
- ]
2256
- }
2257
- }
2258
- ]
2259
- }
2260
- }
2261
- },
2262
- {
2263
- "description": "a time limited GET request for a downtime report on two entities",
2264
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
2265
- "request": {
2266
- "method": "get",
2267
- "path": "/downtime_report/entities/1234,5678",
2268
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2269
- },
2270
- "response": {
2271
- "status": 200,
2272
- "headers": {
2273
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2274
- },
2275
- "body": {
2276
- "downtime_reports": [
2277
- {
2278
- },
2279
- {
2280
- }
2281
- ]
2282
- }
2283
- }
2284
- },
2285
- {
2286
- "description": "a GET request for a downtime report on two entities",
2287
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
2288
- "request": {
2289
- "method": "get",
2290
- "path": "/downtime_report/entities/1234,5678"
2291
- },
2292
- "response": {
2293
- "status": 200,
2294
- "headers": {
2295
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2296
- },
2297
- "body": {
2298
- "downtime_reports": [
2299
- {
2300
- },
2301
- {
2302
- }
2303
- ]
2304
- }
2305
- }
2306
- },
2307
- {
2308
- "description": "a GET request for a status report on a single check",
2309
- "provider_state": "a check 'www.example.com:SSH' exists",
2310
- "request": {
2311
- "method": "get",
2312
- "path": "/status_report/checks/www.example.com:SSH"
2313
- },
2314
- "response": {
2315
- "status": 200,
2316
- "headers": {
2317
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2318
- },
2319
- "body": {
2320
- "status_reports": [
2321
- {
2322
- }
2323
- ]
2324
- }
2325
- }
2326
- },
2327
- {
2328
- "description": "a time limited GET request for a outage report on one entity",
2329
- "provider_state": "a check 'www.example.com:SSH' exists",
2330
- "request": {
2331
- "method": "get",
2332
- "path": "/outage_report/entities/1234",
2333
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2334
- },
2335
- "response": {
2336
- "status": 200,
2337
- "headers": {
2338
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2339
- },
2340
- "body": {
2341
- "outage_reports": [
2342
- {
2343
- "outages": [
2344
-
2345
- ],
2346
- "links": {
2347
- "entity": [
2348
- "1234"
2349
- ],
2350
- "check": [
2351
- "www.example.com:SSH"
2352
- ]
2353
- }
2354
- }
2355
- ]
2356
- }
2357
- }
2358
- },
2359
- {
2360
- "description": "a time limited GET request for a scheduled_maintenance report on two entities",
2361
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
2362
- "request": {
2363
- "method": "get",
2364
- "path": "/scheduled_maintenance_report/entities/1234,5678",
2365
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2366
- },
2367
- "response": {
2368
- "status": 200,
2369
- "headers": {
2370
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2371
- },
2372
- "body": {
2373
- "scheduled_maintenance_reports": [
2374
- {
2375
- "scheduled_maintenances": [
2376
-
2377
- ],
2378
- "links": {
2379
- "entity": [
2380
- "1234"
2381
- ],
2382
- "check": [
2383
- "www.example.com:SSH"
2384
- ]
2385
- }
2386
- },
2387
- {
2388
- "scheduled_maintenances": [
2389
-
2390
- ],
2391
- "links": {
2392
- "entity": [
2393
- "5678"
2394
- ],
2395
- "check": [
2396
- "www2.example.com:PING"
2397
- ]
2398
- }
2399
- }
2400
- ]
2401
- }
2402
- }
2403
- },
2404
- {
2405
- "description": "a time limited GET request for a downtime report on a single check",
2406
- "provider_state": "a check 'www.example.com:SSH' exists",
2407
- "request": {
2408
- "method": "get",
2409
- "path": "/downtime_report/checks/www.example.com:SSH",
2410
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2411
- },
2412
- "response": {
2413
- "status": 200,
2414
- "headers": {
2415
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2416
- },
2417
- "body": {
2418
- "downtime_reports": [
2419
- {
2420
- }
2421
- ]
2422
- }
2423
- }
2424
- },
2425
- {
2426
- "description": "a GET request for a unscheduled_maintenance report on one entity",
2427
- "provider_state": "a check 'www.example.com:SSH' exists",
2428
- "request": {
2429
- "method": "get",
2430
- "path": "/unscheduled_maintenance_report/entities/1234"
2431
- },
2432
- "response": {
2433
- "status": 200,
2434
- "headers": {
2435
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2436
- },
2437
- "body": {
2438
- "unscheduled_maintenance_reports": [
2439
- {
2440
- "unscheduled_maintenances": [
2441
-
2442
- ],
2443
- "links": {
2444
- "entity": [
2445
- "1234"
2446
- ],
2447
- "check": [
2448
- "www.example.com:SSH"
2449
- ]
2450
- }
2451
- }
2452
- ]
2453
- }
2454
- }
2455
- },
2456
- {
2457
- "description": "a GET request for a downtime report on two checks",
2458
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
2459
- "request": {
2460
- "method": "get",
2461
- "path": "/downtime_report/checks/www.example.com:SSH,www2.example.com:PING"
2462
- },
2463
- "response": {
2464
- "status": 200,
2465
- "headers": {
2466
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2467
- },
2468
- "body": {
2469
- "downtime_reports": [
2470
- {
2471
- },
2472
- {
2473
- }
2474
- ]
2475
- }
2476
- }
2477
- },
2478
- {
2479
- "description": "a GET request for a downtime report on all entities",
2480
- "provider_state": "a check 'www.example.com:SSH' exists",
2481
- "request": {
2482
- "method": "get",
2483
- "path": "/downtime_report/entities"
2484
- },
2485
- "response": {
2486
- "status": 200,
2487
- "headers": {
2488
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2489
- },
2490
- "body": {
2491
- "downtime_reports": [
2492
- {
2493
- }
2494
- ]
2495
- }
2496
- }
2497
- },
2498
- {
2499
- "description": "a GET request for a unscheduled_maintenance report on all entities",
2500
- "provider_state": "a check 'www.example.com:SSH' exists",
2501
- "request": {
2502
- "method": "get",
2503
- "path": "/unscheduled_maintenance_report/entities"
2504
- },
2505
- "response": {
2506
- "status": 200,
2507
- "headers": {
2508
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2509
- },
2510
- "body": {
2511
- "unscheduled_maintenance_reports": [
2512
- {
2513
- "unscheduled_maintenances": [
2514
-
2515
- ],
2516
- "links": {
2517
- "entity": [
2518
- "1234"
2519
- ],
2520
- "check": [
2521
- "www.example.com:SSH"
2522
- ]
2523
- }
2524
- }
2525
- ]
2526
- }
2527
- }
2528
- },
2529
- {
2530
- "description": "a GET request for a outage report on one entity",
2531
- "provider_state": "a check 'www.example.com:SSH' exists",
2532
- "request": {
2533
- "method": "get",
2534
- "path": "/outage_report/entities/1234"
2535
- },
2536
- "response": {
2537
- "status": 200,
2538
- "headers": {
2539
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2540
- },
2541
- "body": {
2542
- "outage_reports": [
2543
- {
2544
- "outages": [
2545
-
2546
- ],
2547
- "links": {
2548
- "entity": [
2549
- "1234"
2550
- ],
2551
- "check": [
2552
- "www.example.com:SSH"
2553
- ]
2554
- }
2555
- }
2556
- ]
2557
- }
2558
- }
2559
- },
2560
- {
2561
- "description": "a time limited GET request for a unscheduled_maintenance report on all entities",
2562
- "provider_state": "a check 'www.example.com:SSH' exists",
2563
- "request": {
2564
- "method": "get",
2565
- "path": "/unscheduled_maintenance_report/entities",
2566
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2567
- },
2568
- "response": {
2569
- "status": 200,
2570
- "headers": {
2571
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2572
- },
2573
- "body": {
2574
- "unscheduled_maintenance_reports": [
2575
- {
2576
- "unscheduled_maintenances": [
2577
-
2578
- ],
2579
- "links": {
2580
- "entity": [
2581
- "1234"
2582
- ],
2583
- "check": [
2584
- "www.example.com:SSH"
2585
- ]
2586
- }
2587
- }
2588
- ]
2589
- }
2590
- }
2591
- },
2592
- {
2593
- "description": "a GET request for a unscheduled_maintenance report on a single check",
2594
- "provider_state": "a check 'www.example.com:SSH' exists",
2595
- "request": {
2596
- "method": "get",
2597
- "path": "/unscheduled_maintenance_report/checks/www.example.com:SSH"
2598
- },
2599
- "response": {
2600
- "status": 200,
2601
- "headers": {
2602
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2603
- },
2604
- "body": {
2605
- "unscheduled_maintenance_reports": [
2606
- {
2607
- "unscheduled_maintenances": [
2608
-
2609
- ],
2610
- "links": {
2611
- "entity": [
2612
- "1234"
2613
- ],
2614
- "check": [
2615
- "www.example.com:SSH"
2616
- ]
2617
- }
2618
- }
2619
- ]
2620
- }
2621
- }
2622
- },
2623
- {
2624
- "description": "a time limited GET request for a unscheduled_maintenance report on two entities",
2625
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
2626
- "request": {
2627
- "method": "get",
2628
- "path": "/unscheduled_maintenance_report/entities/1234,5678",
2629
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2630
- },
2631
- "response": {
2632
- "status": 200,
2633
- "headers": {
2634
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2635
- },
2636
- "body": {
2637
- "unscheduled_maintenance_reports": [
2638
- {
2639
- "unscheduled_maintenances": [
2640
-
2641
- ],
2642
- "links": {
2643
- "entity": [
2644
- "1234"
2645
- ],
2646
- "check": [
2647
- "www.example.com:SSH"
2648
- ]
2649
- }
2650
- },
2651
- {
2652
- "unscheduled_maintenances": [
2653
-
2654
- ],
2655
- "links": {
2656
- "entity": [
2657
- "5678"
2658
- ],
2659
- "check": [
2660
- "www2.example.com:PING"
2661
- ]
2662
- }
2663
- }
2664
- ]
2665
- }
2666
- }
2667
- },
2668
- {
2669
- "description": "a time limited GET request for a unscheduled_maintenance report on all checks",
2670
- "provider_state": "a check 'www.example.com:SSH' exists",
2671
- "request": {
2672
- "method": "get",
2673
- "path": "/unscheduled_maintenance_report/checks",
2674
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2675
- },
2676
- "response": {
2677
- "status": 200,
2678
- "headers": {
2679
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2680
- },
2681
- "body": {
2682
- "unscheduled_maintenance_reports": [
2683
- {
2684
- "unscheduled_maintenances": [
2685
-
2686
- ],
2687
- "links": {
2688
- "entity": [
2689
- "1234"
2690
- ],
2691
- "check": [
2692
- "www.example.com:SSH"
2693
- ]
2694
- }
2695
- }
2696
- ]
2697
- }
2698
- }
2699
- },
2700
- {
2701
- "description": "a GET request for a outage report on two checks",
2702
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
2703
- "request": {
2704
- "method": "get",
2705
- "path": "/outage_report/checks/www.example.com:SSH,www2.example.com:PING"
2706
- },
2707
- "response": {
2708
- "status": 200,
2709
- "headers": {
2710
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2711
- },
2712
- "body": {
2713
- "outage_reports": [
2714
- {
2715
- "outages": [
2716
-
2717
- ],
2718
- "links": {
2719
- "entity": [
2720
- "1234"
2721
- ],
2722
- "check": [
2723
- "www.example.com:SSH"
2724
- ]
2725
- }
2726
- },
2727
- {
2728
- "outages": [
2729
-
2730
- ],
2731
- "links": {
2732
- "entity": [
2733
- "5678"
2734
- ],
2735
- "check": [
2736
- "www2.example.com:PING"
2737
- ]
2738
- }
2739
- }
2740
- ]
2741
- }
2742
- }
2743
- },
2744
- {
2745
- "description": "a GET request for a unscheduled_maintenance report on two entities",
2746
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
2747
- "request": {
2748
- "method": "get",
2749
- "path": "/unscheduled_maintenance_report/entities/1234,5678"
2750
- },
2751
- "response": {
2752
- "status": 200,
2753
- "headers": {
2754
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2755
- },
2756
- "body": {
2757
- "unscheduled_maintenance_reports": [
2758
- {
2759
- "unscheduled_maintenances": [
2760
-
2761
- ],
2762
- "links": {
2763
- "entity": [
2764
- "1234"
2765
- ],
2766
- "check": [
2767
- "www.example.com:SSH"
2768
- ]
2769
- }
2770
- },
2771
- {
2772
- "unscheduled_maintenances": [
2773
-
2774
- ],
2775
- "links": {
2776
- "entity": [
2777
- "5678"
2778
- ],
2779
- "check": [
2780
- "www2.example.com:PING"
2781
- ]
2782
- }
2783
- }
2784
- ]
2785
- }
2786
- }
2787
- },
2788
- {
2789
- "description": "a GET request for a status report on two checks",
2790
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
2791
- "request": {
2792
- "method": "get",
2793
- "path": "/status_report/checks/www.example.com:SSH,www2.example.com:PING"
2794
- },
2795
- "response": {
2796
- "status": 200,
2797
- "headers": {
2798
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2799
- },
2800
- "body": {
2801
- "status_reports": [
2802
- {
2803
- },
2804
- {
2805
- }
2806
- ]
2807
- }
2808
- }
2809
- },
2810
- {
2811
- "description": "a GET request for a scheduled_maintenance report on all checks",
2812
- "provider_state": "a check 'www.example.com:SSH' exists",
2813
- "request": {
2814
- "method": "get",
2815
- "path": "/scheduled_maintenance_report/checks"
2816
- },
2817
- "response": {
2818
- "status": 200,
2819
- "headers": {
2820
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2821
- },
2822
- "body": {
2823
- "scheduled_maintenance_reports": [
2824
- {
2825
- "scheduled_maintenances": [
2826
-
2827
- ],
2828
- "links": {
2829
- "entity": [
2830
- "1234"
2831
- ],
2832
- "check": [
2833
- "www.example.com:SSH"
2834
- ]
2835
- }
2836
- }
2837
- ]
2838
- }
2839
- }
2840
- },
2841
- {
2842
- "description": "a GET request for a scheduled_maintenance report on one entity",
2843
- "provider_state": "a check 'www.example.com:SSH' exists",
2844
- "request": {
2845
- "method": "get",
2846
- "path": "/scheduled_maintenance_report/entities/1234"
2847
- },
2848
- "response": {
2849
- "status": 200,
2850
- "headers": {
2851
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2852
- },
2853
- "body": {
2854
- "scheduled_maintenance_reports": [
2855
- {
2856
- "scheduled_maintenances": [
2857
-
2858
- ],
2859
- "links": {
2860
- "entity": [
2861
- "1234"
2862
- ],
2863
- "check": [
2864
- "www.example.com:SSH"
2865
- ]
2866
- }
2867
- }
2868
- ]
2869
- }
2870
- }
2871
- },
2872
- {
2873
- "description": "a time-limited GET request for a scheduled_maintenance report on two checks",
2874
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
2875
- "request": {
2876
- "method": "get",
2877
- "path": "/scheduled_maintenance_report/checks/www.example.com:SSH,www2.example.com:PING",
2878
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2879
- },
2880
- "response": {
2881
- "status": 200,
2882
- "headers": {
2883
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2884
- },
2885
- "body": {
2886
- "scheduled_maintenance_reports": [
2887
- {
2888
- "scheduled_maintenances": [
2889
-
2890
- ],
2891
- "links": {
2892
- "entity": [
2893
- "1234"
2894
- ],
2895
- "check": [
2896
- "www.example.com:SSH"
2897
- ]
2898
- }
2899
- },
2900
- {
2901
- "scheduled_maintenances": [
2902
-
2903
- ],
2904
- "links": {
2905
- "entity": [
2906
- "5678"
2907
- ],
2908
- "check": [
2909
- "www2.example.com:PING"
2910
- ]
2911
- }
2912
- }
2913
- ]
2914
- }
2915
- }
2916
- },
2917
- {
2918
- "description": "a GET request for a downtime report on a single check",
2919
- "provider_state": "a check 'www.example.com:SSH' exists",
2920
- "request": {
2921
- "method": "get",
2922
- "path": "/downtime_report/checks/www.example.com:SSH"
2923
- },
2924
- "response": {
2925
- "status": 200,
2926
- "headers": {
2927
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2928
- },
2929
- "body": {
2930
- "downtime_reports": [
2931
- {
2932
- }
2933
- ]
2934
- }
2935
- }
2936
- },
2937
- {
2938
- "description": "a GET request for a scheduled_maintenance report on all entities",
2939
- "provider_state": "a check 'www.example.com:SSH' exists",
2940
- "request": {
2941
- "method": "get",
2942
- "path": "/scheduled_maintenance_report/entities"
2943
- },
2944
- "response": {
2945
- "status": 200,
2946
- "headers": {
2947
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2948
- },
2949
- "body": {
2950
- "scheduled_maintenance_reports": [
2951
- {
2952
- "scheduled_maintenances": [
2953
-
2954
- ],
2955
- "links": {
2956
- "entity": [
2957
- "1234"
2958
- ],
2959
- "check": [
2960
- "www.example.com:SSH"
2961
- ]
2962
- }
2963
- }
2964
- ]
2965
- }
2966
- }
2967
- },
2968
- {
2969
- "description": "a GET request for a downtime report on all checks",
2970
- "provider_state": "a check 'www.example.com:SSH' exists",
2971
- "request": {
2972
- "method": "get",
2973
- "path": "/downtime_report/checks"
2974
- },
2975
- "response": {
2976
- "status": 200,
2977
- "headers": {
2978
- "Content-Type": "application/vnd.api+json; charset=utf-8"
2979
- },
2980
- "body": {
2981
- "downtime_reports": [
2982
- {
2983
- }
2984
- ]
2985
- }
2986
- }
2987
- },
2988
- {
2989
- "description": "a time limited GET request for a downtime report on all checks",
2990
- "provider_state": "a check 'www.example.com:SSH' exists",
2991
- "request": {
2992
- "method": "get",
2993
- "path": "/downtime_report/checks",
2994
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
2995
- },
2996
- "response": {
2997
- "status": 200,
2998
- "headers": {
2999
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3000
- },
3001
- "body": {
3002
- "downtime_reports": [
3003
- {
3004
- }
3005
- ]
3006
- }
3007
- }
3008
- },
3009
- {
3010
- "description": "a GET request for a outage report on two entities",
3011
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
3012
- "request": {
3013
- "method": "get",
3014
- "path": "/outage_report/entities/1234,5678"
3015
- },
3016
- "response": {
3017
- "status": 200,
3018
- "headers": {
3019
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3020
- },
3021
- "body": {
3022
- "outage_reports": [
3023
- {
3024
- "outages": [
3025
-
3026
- ],
3027
- "links": {
3028
- "entity": [
3029
- "1234"
3030
- ],
3031
- "check": [
3032
- "www.example.com:SSH"
3033
- ]
3034
- }
3035
- },
3036
- {
3037
- "outages": [
3038
-
3039
- ],
3040
- "links": {
3041
- "entity": [
3042
- "5678"
3043
- ],
3044
- "check": [
3045
- "www2.example.com:PING"
3046
- ]
3047
- }
3048
- }
3049
- ]
3050
- }
3051
- }
3052
- },
3053
- {
3054
- "description": "a time limited GET request for a scheduled_maintenance report on all checks",
3055
- "provider_state": "a check 'www.example.com:SSH' exists",
3056
- "request": {
3057
- "method": "get",
3058
- "path": "/scheduled_maintenance_report/checks",
3059
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
3060
- },
3061
- "response": {
3062
- "status": 200,
3063
- "headers": {
3064
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3065
- },
3066
- "body": {
3067
- "scheduled_maintenance_reports": [
3068
- {
3069
- "scheduled_maintenances": [
3070
-
3071
- ],
3072
- "links": {
3073
- "entity": [
3074
- "1234"
3075
- ],
3076
- "check": [
3077
- "www.example.com:SSH"
3078
- ]
3079
- }
3080
- }
3081
- ]
3082
- }
3083
- }
3084
- },
3085
- {
3086
- "description": "a time limited GET request for a unscheduled_maintenance report on a single check",
3087
- "provider_state": "a check 'www.example.com:SSH' exists",
3088
- "request": {
3089
- "method": "get",
3090
- "path": "/unscheduled_maintenance_report/checks/www.example.com:SSH",
3091
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
3092
- },
3093
- "response": {
3094
- "status": 200,
3095
- "headers": {
3096
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3097
- },
3098
- "body": {
3099
- "unscheduled_maintenance_reports": [
3100
- {
3101
- "unscheduled_maintenances": [
3102
-
3103
- ],
3104
- "links": {
3105
- "entity": [
3106
- "1234"
3107
- ],
3108
- "check": [
3109
- "www.example.com:SSH"
3110
- ]
3111
- }
3112
- }
3113
- ]
3114
- }
3115
- }
3116
- },
3117
- {
3118
- "description": "a GET request for a outage report on all entities",
3119
- "provider_state": "a check 'www.example.com:SSH' exists",
3120
- "request": {
3121
- "method": "get",
3122
- "path": "/outage_report/entities"
3123
- },
3124
- "response": {
3125
- "status": 200,
3126
- "headers": {
3127
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3128
- },
3129
- "body": {
3130
- "outage_reports": [
3131
- {
3132
- "outages": [
3133
-
3134
- ],
3135
- "links": {
3136
- "entity": [
3137
- "1234"
3138
- ],
3139
- "check": [
3140
- "www.example.com:SSH"
3141
- ]
3142
- }
3143
- }
3144
- ]
3145
- }
3146
- }
3147
- },
3148
- {
3149
- "description": "a time limited GET request for a downtime report on all entities",
3150
- "provider_state": "a check 'www.example.com:SSH' exists",
3151
- "request": {
3152
- "method": "get",
3153
- "path": "/downtime_report/entities",
3154
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
3155
- },
3156
- "response": {
3157
- "status": 200,
3158
- "headers": {
3159
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3160
- },
3161
- "body": {
3162
- "downtime_reports": [
3163
- {
3164
- }
3165
- ]
3166
- }
3167
- }
3168
- },
3169
- {
3170
- "description": "a time limited GET request for a outage report on a single check",
3171
- "provider_state": "a check 'www.example.com:SSH' exists",
3172
- "request": {
3173
- "method": "get",
3174
- "path": "/outage_report/checks/www.example.com:SSH",
3175
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
3176
- },
3177
- "response": {
3178
- "status": 200,
3179
- "headers": {
3180
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3181
- },
3182
- "body": {
3183
- "outage_reports": [
3184
- {
3185
- "outages": [
3186
-
3187
- ],
3188
- "links": {
3189
- "entity": [
3190
- "1234"
3191
- ],
3192
- "check": [
3193
- "www.example.com:SSH"
3194
- ]
3195
- }
3196
- }
3197
- ]
3198
- }
3199
- }
3200
- },
3201
- {
3202
- "description": "a time limited GET request for a scheduled_maintenance report on all entities",
3203
- "provider_state": "a check 'www.example.com:SSH' exists",
3204
- "request": {
3205
- "method": "get",
3206
- "path": "/scheduled_maintenance_report/entities",
3207
- "query": "start_time=2015-10-30T15%3A13%3A13%2B10%3A30&end_time=2015-10-31T03%3A13%3A13%2B10%3A30"
3208
- },
3209
- "response": {
3210
- "status": 200,
3211
- "headers": {
3212
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3213
- },
3214
- "body": {
3215
- "scheduled_maintenance_reports": [
3216
- {
3217
- "scheduled_maintenances": [
3218
-
3219
- ],
3220
- "links": {
3221
- "entity": [
3222
- "1234"
3223
- ],
3224
- "check": [
3225
- "www.example.com:SSH"
3226
- ]
3227
- }
3228
- }
3229
- ]
3230
- }
3231
- }
3232
- },
3233
- {
3234
- "description": "a GET request for a scheduled_maintenance report on a single check",
3235
- "provider_state": "a check 'www.example.com:SSH' exists",
3236
- "request": {
3237
- "method": "get",
3238
- "path": "/scheduled_maintenance_report/checks/www.example.com:SSH"
3239
- },
3240
- "response": {
3241
- "status": 200,
3242
- "headers": {
3243
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3244
- },
3245
- "body": {
3246
- "scheduled_maintenance_reports": [
3247
- {
3248
- "scheduled_maintenances": [
3249
-
3250
- ],
3251
- "links": {
3252
- "entity": [
3253
- "1234"
3254
- ],
3255
- "check": [
3256
- "www.example.com:SSH"
3257
- ]
3258
- }
3259
- }
3260
- ]
3261
- }
3262
- }
3263
- },
3264
- {
3265
- "description": "a GET request for a unscheduled_maintenance report on all checks",
3266
- "provider_state": "a check 'www.example.com:SSH' exists",
3267
- "request": {
3268
- "method": "get",
3269
- "path": "/unscheduled_maintenance_report/checks"
3270
- },
3271
- "response": {
3272
- "status": 200,
3273
- "headers": {
3274
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3275
- },
3276
- "body": {
3277
- "unscheduled_maintenance_reports": [
3278
- {
3279
- "unscheduled_maintenances": [
3280
-
3281
- ],
3282
- "links": {
3283
- "entity": [
3284
- "1234"
3285
- ],
3286
- "check": [
3287
- "www.example.com:SSH"
3288
- ]
3289
- }
3290
- }
3291
- ]
3292
- }
3293
- }
3294
- },
3295
- {
3296
- "description": "a GET request for a outage report on a single check",
3297
- "provider_state": "a check 'www.example.com:SSH' exists",
3298
- "request": {
3299
- "method": "get",
3300
- "path": "/outage_report/checks/www.example.com:SSH"
3301
- },
3302
- "response": {
3303
- "status": 200,
3304
- "headers": {
3305
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3306
- },
3307
- "body": {
3308
- "outage_reports": [
3309
- {
3310
- "outages": [
3311
-
3312
- ],
3313
- "links": {
3314
- "entity": [
3315
- "1234"
3316
- ],
3317
- "check": [
3318
- "www.example.com:SSH"
3319
- ]
3320
- }
3321
- }
3322
- ]
3323
- }
3324
- }
3325
- },
3326
- {
3327
- "description": "a GET request for a scheduled_maintenance report on two entities",
3328
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
3329
- "request": {
3330
- "method": "get",
3331
- "path": "/scheduled_maintenance_report/entities/1234,5678"
3332
- },
3333
- "response": {
3334
- "status": 200,
3335
- "headers": {
3336
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3337
- },
3338
- "body": {
3339
- "scheduled_maintenance_reports": [
3340
- {
3341
- "scheduled_maintenances": [
3342
-
3343
- ],
3344
- "links": {
3345
- "entity": [
3346
- "1234"
3347
- ],
3348
- "check": [
3349
- "www.example.com:SSH"
3350
- ]
3351
- }
3352
- },
3353
- {
3354
- "scheduled_maintenances": [
3355
-
3356
- ],
3357
- "links": {
3358
- "entity": [
3359
- "5678"
3360
- ],
3361
- "check": [
3362
- "www2.example.com:PING"
3363
- ]
3364
- }
3365
- }
3366
- ]
3367
- }
3368
- }
3369
- },
3370
- {
3371
- "description": "a GET request for a downtime report on one entity",
3372
- "provider_state": "a check 'www.example.com:SSH' exists",
3373
- "request": {
3374
- "method": "get",
3375
- "path": "/downtime_report/entities/1234"
3376
- },
3377
- "response": {
3378
- "status": 200,
3379
- "headers": {
3380
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3381
- },
3382
- "body": {
3383
- "downtime_reports": [
3384
- {
3385
- }
3386
- ]
3387
- }
3388
- }
3389
- },
3390
- {
3391
- "description": "a GET request for a status report on all checks",
3392
- "provider_state": "a check 'www.example.com:SSH' exists",
3393
- "request": {
3394
- "method": "get",
3395
- "path": "/status_report/checks"
3396
- },
3397
- "response": {
3398
- "status": 200,
3399
- "headers": {
3400
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3401
- },
3402
- "body": {
3403
- "status_reports": [
3404
- {
3405
- }
3406
- ]
3407
- }
3408
- }
3409
- },
3410
- {
3411
- "description": "a GET request for a scheduled_maintenance report on two checks",
3412
- "provider_state": "checks 'www.example.com:SSH' and 'www2.example.com:PING' exist",
3413
- "request": {
3414
- "method": "get",
3415
- "path": "/scheduled_maintenance_report/checks/www.example.com:SSH,www2.example.com:PING"
3416
- },
3417
- "response": {
3418
- "status": 200,
3419
- "headers": {
3420
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3421
- },
3422
- "body": {
3423
- "scheduled_maintenance_reports": [
3424
- {
3425
- "scheduled_maintenances": [
3426
-
3427
- ],
3428
- "links": {
3429
- "entity": [
3430
- "1234"
3431
- ],
3432
- "check": [
3433
- "www.example.com:SSH"
3434
- ]
3435
- }
3436
- },
3437
- {
3438
- "scheduled_maintenances": [
3439
-
3440
- ],
3441
- "links": {
3442
- "entity": [
3443
- "5678"
3444
- ],
3445
- "check": [
3446
- "www2.example.com:PING"
3447
- ]
3448
- }
3449
- }
3450
- ]
3451
- }
3452
- }
3453
- },
3454
- {
3455
- "description": "a time limited GET request for a scheduled_maintenance report on a single check",
3456
- "provider_state": "a check 'www.example.com:SSH' exists",
3457
- "request": {
3458
- "method": "get",
3459
- "path": "/scheduled_maintenance_report/checks/www.example.com:SSH",
3460
- "query": "start_time=2015-10-30T15%3A13%3A14%2B10%3A30&end_time=2015-10-31T03%3A13%3A14%2B10%3A30"
3461
- },
3462
- "response": {
3463
- "status": 200,
3464
- "headers": {
3465
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3466
- },
3467
- "body": {
3468
- "scheduled_maintenance_reports": [
3469
- {
3470
- "scheduled_maintenances": [
3471
-
3472
- ],
3473
- "links": {
3474
- "entity": [
3475
- "1234"
3476
- ],
3477
- "check": [
3478
- "www.example.com:SSH"
3479
- ]
3480
- }
3481
- }
3482
- ]
3483
- }
3484
- }
3485
- },
3486
- {
3487
- "description": "a POST request with two entities",
3488
- "provider_state": "no entity exists",
3489
- "request": {
3490
- "method": "post",
3491
- "path": "/entities",
3492
- "headers": {
3493
- "Content-Type": "application/vnd.api+json"
3494
- },
3495
- "body": {
3496
- "entities": [
3497
- {
3498
- "name": "example.org",
3499
- "id": "57_example"
3500
- },
3501
- {
3502
- "name": "example2.org",
3503
- "id": "58"
3504
- }
3505
- ]
3506
- }
3507
- },
3508
- "response": {
3509
- "status": 201,
3510
- "headers": {
3511
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3512
- },
3513
- "body": [
3514
- "57_example",
3515
- "58"
3516
- ]
3517
- }
3518
- },
3519
- {
3520
- "description": "a POST request with one entity",
3521
- "provider_state": "no entity exists",
3522
- "request": {
3523
- "method": "post",
3524
- "path": "/entities",
3525
- "headers": {
3526
- "Content-Type": "application/vnd.api+json"
3527
- },
3528
- "body": {
3529
- "entities": [
3530
- {
3531
- "name": "example.org",
3532
- "id": "57_example"
3533
- }
3534
- ]
3535
- }
3536
- },
3537
- "response": {
3538
- "status": 201,
3539
- "headers": {
3540
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3541
- },
3542
- "body": [
3543
- "57_example"
3544
- ]
3545
- }
3546
- },
3547
- {
3548
- "description": "a GET request for a single entity",
3549
- "provider_state": "no entity exists",
3550
- "request": {
3551
- "method": "get",
3552
- "path": "/entities/1234"
3553
- },
3554
- "response": {
3555
- "status": 404,
3556
- "headers": {
3557
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3558
- },
3559
- "body": {
3560
- "errors": [
3561
- "could not find entities: '1234'"
3562
- ]
3563
- }
3564
- }
3565
- },
3566
- {
3567
- "description": "a GET request for a single entity",
3568
- "provider_state": "an entity 'www.example.com' with id '1234' exists",
3569
- "request": {
3570
- "method": "get",
3571
- "path": "/entities/1234"
3572
- },
3573
- "response": {
3574
- "status": 200,
3575
- "headers": {
3576
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3577
- },
3578
- "body": {
3579
- "entities": [
3580
- {
3581
- "name": "www.example.com",
3582
- "id": "1234"
3583
- }
3584
- ]
3585
- }
3586
- }
3587
- },
3588
- {
3589
- "description": "a GET request for all entities",
3590
- "provider_state": "no entity exists",
3591
- "request": {
3592
- "method": "get",
3593
- "path": "/entities"
3594
- },
3595
- "response": {
3596
- "status": 200,
3597
- "headers": {
3598
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3599
- },
3600
- "body": {
3601
- "entities": [
3602
-
3603
- ]
3604
- }
3605
- }
3606
- },
3607
- {
3608
- "description": "a GET request for all entities",
3609
- "provider_state": "an entity 'www.example.com' with id '1234' exists",
3610
- "request": {
3611
- "method": "get",
3612
- "path": "/entities"
3613
- },
3614
- "response": {
3615
- "status": 200,
3616
- "headers": {
3617
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3618
- },
3619
- "body": {
3620
- "entities": [
3621
- {
3622
- "name": "www.example.com",
3623
- "id": "1234"
3624
- }
3625
- ]
3626
- }
3627
- }
3628
- },
3629
- {
3630
- "description": "a PATCH request for a single entity",
3631
- "provider_state": "no entity exists",
3632
- "request": {
3633
- "method": "patch",
3634
- "path": "/entities/1234",
3635
- "headers": {
3636
- "Content-Type": "application/json-patch+json"
3637
- },
3638
- "body": [
3639
- {
3640
- "op": "replace",
3641
- "path": "/entities/0/name",
3642
- "value": "example3.com"
3643
- }
3644
- ]
3645
- },
3646
- "response": {
3647
- "status": 404,
3648
- "headers": {
3649
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3650
- },
3651
- "body": {
3652
- "errors": [
3653
- "could not find entity '1234'"
3654
- ]
3655
- }
3656
- }
3657
- },
3658
- {
3659
- "description": "a PATCH request for a single entity",
3660
- "provider_state": "an entity 'www.example.com' with id '1234' exists",
3661
- "request": {
3662
- "method": "patch",
3663
- "path": "/entities/1234",
3664
- "headers": {
3665
- "Content-Type": "application/json-patch+json"
3666
- },
3667
- "body": [
3668
- {
3669
- "op": "replace",
3670
- "path": "/entities/0/name",
3671
- "value": "example3.com"
3672
- }
3673
- ]
3674
- },
3675
- "response": {
3676
- "status": 204,
3677
- "body": ""
3678
- }
3679
- },
3680
- {
3681
- "description": "a GET request for one set of pagerduty credentials",
3682
- "provider_state": "a contact with id 'abc' has pagerduty credentials",
3683
- "request": {
3684
- "method": "get",
3685
- "path": "/pagerduty_credentials/abc"
3686
- },
3687
- "response": {
3688
- "status": 200,
3689
- "headers": {
3690
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3691
- },
3692
- "body": {
3693
- "pagerduty_credentials": [
3694
- {
3695
- "service_key": "abc",
3696
- "subdomain": "def",
3697
- "token": "ghi"
3698
- }
3699
- ]
3700
- }
3701
- }
3702
- },
3703
- {
3704
- "description": "a GET request for one set of pagerduty credentials",
3705
- "provider_state": "no contact exists",
3706
- "request": {
3707
- "method": "get",
3708
- "path": "/pagerduty_credentials/abc"
3709
- },
3710
- "response": {
3711
- "status": 404,
3712
- "headers": {
3713
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3714
- },
3715
- "body": {
3716
- "errors": [
3717
- "could not find contact 'abc'"
3718
- ]
3719
- }
3720
- }
3721
- },
3722
- {
3723
- "description": "a GET request for all pagerduty credentials",
3724
- "provider_state": "a contact with id 'abc' has pagerduty credentials",
3725
- "request": {
3726
- "method": "get",
3727
- "path": "/pagerduty_credentials"
3728
- },
3729
- "response": {
3730
- "status": 200,
3731
- "headers": {
3732
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3733
- },
3734
- "body": {
3735
- "pagerduty_credentials": [
3736
- {
3737
- "service_key": "abc",
3738
- "subdomain": "def",
3739
- "token": "ghi"
3740
- }
3741
- ]
3742
- }
3743
- }
3744
- },
3745
- {
3746
- "description": "a GET request for two sets of pagerduty credentials",
3747
- "provider_state": "contacts with ids 'abc' and '872' have pagerduty credentials",
3748
- "request": {
3749
- "method": "get",
3750
- "path": "/pagerduty_credentials/abc,872"
3751
- },
3752
- "response": {
3753
- "status": 200,
3754
- "headers": {
3755
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3756
- },
3757
- "body": {
3758
- "pagerduty_credentials": [
3759
- {
3760
- "service_key": "abc",
3761
- "subdomain": "def",
3762
- "token": "ghi"
3763
- },
3764
- {
3765
- "service_key": "mno",
3766
- "subdomain": "pqr",
3767
- "token": "stu"
3768
- }
3769
- ]
3770
- }
3771
- }
3772
- },
3773
- {
3774
- "description": "a DELETE request for one set of pagerduty credentials",
3775
- "provider_state": "a contact with id 'abc' has pagerduty credentials",
3776
- "request": {
3777
- "method": "delete",
3778
- "path": "/pagerduty_credentials/abc",
3779
- "body": null
3780
- },
3781
- "response": {
3782
- "status": 204,
3783
- "body": ""
3784
- }
3785
- },
3786
- {
3787
- "description": "a DELETE request for two sets of pagerduty credentials",
3788
- "provider_state": "contacts with ids 'abc' and '872' have pagerduty credentials",
3789
- "request": {
3790
- "method": "delete",
3791
- "path": "/pagerduty_credentials/abc,872",
3792
- "body": null
3793
- },
3794
- "response": {
3795
- "status": 204,
3796
- "body": ""
3797
- }
3798
- },
3799
- {
3800
- "description": "a DELETE request for one set of pagerduty credentials",
3801
- "provider_state": "no contact exists",
3802
- "request": {
3803
- "method": "delete",
3804
- "path": "/pagerduty_credentials/abc",
3805
- "body": null
3806
- },
3807
- "response": {
3808
- "status": 404,
3809
- "headers": {
3810
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3811
- },
3812
- "body": {
3813
- "errors": [
3814
- "could not find contact 'abc'"
3815
- ]
3816
- }
3817
- }
3818
- },
3819
- {
3820
- "description": "a POST request with one set of pagerduty credentials",
3821
- "provider_state": "no contact exists",
3822
- "request": {
3823
- "method": "post",
3824
- "path": "/contacts/abc/pagerduty_credentials",
3825
- "headers": {
3826
- "Content-Type": "application/vnd.api+json"
3827
- },
3828
- "body": {
3829
- "pagerduty_credentials": [
3830
- {
3831
- "service_key": "abc",
3832
- "subdomain": "def",
3833
- "token": "ghi"
3834
- }
3835
- ]
3836
- }
3837
- },
3838
- "response": {
3839
- "status": 422,
3840
- "headers": {
3841
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3842
- },
3843
- "body": {
3844
- "errors": [
3845
- "Contact id: 'abc' could not be loaded"
3846
- ]
3847
- }
3848
- }
3849
- },
3850
- {
3851
- "description": "a POST request with one set of pagerduty credentials",
3852
- "provider_state": "a contact with id 'abc' exists",
3853
- "request": {
3854
- "method": "post",
3855
- "path": "/contacts/abc/pagerduty_credentials",
3856
- "headers": {
3857
- "Content-Type": "application/vnd.api+json"
3858
- },
3859
- "body": {
3860
- "pagerduty_credentials": [
3861
- {
3862
- "service_key": "abc",
3863
- "subdomain": "def",
3864
- "token": "ghi"
3865
- }
3866
- ]
3867
- }
3868
- },
3869
- "response": {
3870
- "status": 201,
3871
- "headers": {
3872
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3873
- },
3874
- "body": [
3875
- "abc"
3876
- ]
3877
- }
3878
- },
3879
- {
3880
- "description": "a PATCH request for pagerduty credentials",
3881
- "provider_state": "a contact with id 'abc' has pagerduty credentials",
3882
- "request": {
3883
- "method": "patch",
3884
- "path": "/pagerduty_credentials/abc",
3885
- "headers": {
3886
- "Content-Type": "application/json-patch+json"
3887
- },
3888
- "body": [
3889
- {
3890
- "op": "replace",
3891
- "path": "/pagerduty_credentials/0/token",
3892
- "value": "token123"
3893
- }
3894
- ]
3895
- },
3896
- "response": {
3897
- "status": 204,
3898
- "body": ""
3899
- }
3900
- },
3901
- {
3902
- "description": "a PATCH request for pagerduty credentials",
3903
- "provider_state": "contacts with ids 'abc' and '872' have pagerduty credentials",
3904
- "request": {
3905
- "method": "patch",
3906
- "path": "/pagerduty_credentials/abc,872",
3907
- "headers": {
3908
- "Content-Type": "application/json-patch+json"
3909
- },
3910
- "body": [
3911
- {
3912
- "op": "replace",
3913
- "path": "/pagerduty_credentials/0/token",
3914
- "value": "token123"
3915
- }
3916
- ]
3917
- },
3918
- "response": {
3919
- "status": 204,
3920
- "body": ""
3921
- }
3922
- },
3923
- {
3924
- "description": "a PATCH request for pagerduty credentials",
3925
- "provider_state": "no contact exists",
3926
- "request": {
3927
- "method": "patch",
3928
- "path": "/pagerduty_credentials/abc",
3929
- "headers": {
3930
- "Content-Type": "application/json-patch+json"
3931
- },
3932
- "body": [
3933
- {
3934
- "op": "replace",
3935
- "path": "/pagerduty_credentials/0/token",
3936
- "value": "token123"
3937
- }
3938
- ]
3939
- },
3940
- "response": {
3941
- "status": 404,
3942
- "headers": {
3943
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3944
- },
3945
- "body": {
3946
- "errors": [
3947
- "could not find contact 'abc'"
3948
- ]
3949
- }
3950
- }
3951
- },
3952
- {
3953
- "description": "a GET request for a single contact",
3954
- "provider_state": "no contact exists",
3955
- "request": {
3956
- "method": "get",
3957
- "path": "/contacts/abc"
3958
- },
3959
- "response": {
3960
- "status": 404,
3961
- "headers": {
3962
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3963
- },
3964
- "body": {
3965
- "errors": [
3966
- "could not find contacts 'abc'"
3967
- ]
3968
- }
3969
- }
3970
- },
3971
- {
3972
- "description": "a GET request for a single contact",
3973
- "provider_state": "a contact with id 'abc' exists",
3974
- "request": {
3975
- "method": "get",
3976
- "path": "/contacts/abc"
3977
- },
3978
- "response": {
3979
- "status": 200,
3980
- "headers": {
3981
- "Content-Type": "application/vnd.api+json; charset=utf-8"
3982
- },
3983
- "body": {
3984
- "contacts": [
3985
- {
3986
- "id": "abc",
3987
- "first_name": "Jim",
3988
- "last_name": "Smith",
3989
- "email": "jims@example.com",
3990
- "timezone": "UTC"
3991
- }
3992
- ]
3993
- }
3994
- }
3995
- },
3996
- {
3997
- "description": "a GET request for all contacts",
3998
- "provider_state": "no contact exists",
3999
- "request": {
4000
- "method": "get",
4001
- "path": "/contacts"
4002
- },
4003
- "response": {
4004
- "status": 200,
4005
- "headers": {
4006
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4007
- },
4008
- "body": {
4009
- "contacts": [
4010
-
4011
- ]
4012
- }
4013
- }
4014
- },
4015
- {
4016
- "description": "a GET request for all contacts",
4017
- "provider_state": "a contact with id 'abc' exists",
4018
- "request": {
4019
- "method": "get",
4020
- "path": "/contacts"
4021
- },
4022
- "response": {
4023
- "status": 200,
4024
- "headers": {
4025
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4026
- },
4027
- "body": {
4028
- "contacts": [
4029
- {
4030
- "id": "abc",
4031
- "first_name": "Jim",
4032
- "last_name": "Smith",
4033
- "email": "jims@example.com",
4034
- "timezone": "UTC"
4035
- }
4036
- ]
4037
- }
4038
- }
4039
- },
4040
- {
4041
- "description": "a DELETE request for a single contact",
4042
- "provider_state": "a contact with id 'abc' exists",
4043
- "request": {
4044
- "method": "delete",
4045
- "path": "/contacts/abc",
4046
- "body": null
4047
- },
4048
- "response": {
4049
- "status": 204,
4050
- "body": ""
4051
- }
4052
- },
4053
- {
4054
- "description": "a DELETE request for two contacts",
4055
- "provider_state": "contacts with ids 'abc' and '872' exist",
4056
- "request": {
4057
- "method": "delete",
4058
- "path": "/contacts/abc,872",
4059
- "body": null
4060
- },
4061
- "response": {
4062
- "status": 204,
4063
- "body": ""
4064
- }
4065
- },
4066
- {
4067
- "description": "a DELETE request for a single contact",
4068
- "provider_state": "no contact exists",
4069
- "request": {
4070
- "method": "delete",
4071
- "path": "/contacts/abc",
4072
- "body": null
4073
- },
4074
- "response": {
4075
- "status": 404,
4076
- "headers": {
4077
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4078
- },
4079
- "body": {
4080
- "errors": [
4081
- "could not find contacts 'abc'"
4082
- ]
4083
- }
4084
- }
4085
- },
4086
- {
4087
- "description": "a POST request with one contact",
4088
- "provider_state": "no contact exists",
4089
- "request": {
4090
- "method": "post",
4091
- "path": "/contacts",
4092
- "headers": {
4093
- "Content-Type": "application/vnd.api+json"
4094
- },
4095
- "body": {
4096
- "contacts": [
4097
- {
4098
- "id": "abc",
4099
- "first_name": "Jim",
4100
- "last_name": "Smith",
4101
- "email": "jims@example.com",
4102
- "timezone": "UTC"
4103
- }
4104
- ]
4105
- }
4106
- },
4107
- "response": {
4108
- "status": 201,
4109
- "headers": {
4110
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4111
- },
4112
- "body": [
4113
- "abc"
4114
- ]
4115
- }
4116
- },
4117
- {
4118
- "description": "a POST request with two contacts",
4119
- "provider_state": "no contact exists",
4120
- "request": {
4121
- "method": "post",
4122
- "path": "/contacts",
4123
- "headers": {
4124
- "Content-Type": "application/vnd.api+json"
4125
- },
4126
- "body": {
4127
- "contacts": [
4128
- {
4129
- "id": "abc",
4130
- "first_name": "Jim",
4131
- "last_name": "Smith",
4132
- "email": "jims@example.com",
4133
- "timezone": "UTC"
4134
- },
4135
- {
4136
- "id": "def",
4137
- "first_name": "Joan",
4138
- "last_name": "Smith",
4139
- "email": "joans@example.com"
4140
- }
4141
- ]
4142
- }
4143
- },
4144
- "response": {
4145
- "status": 201,
4146
- "headers": {
4147
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4148
- },
4149
- "body": [
4150
- "abc",
4151
- "def"
4152
- ]
4153
- }
4154
- },
4155
- {
4156
- "description": "a POST request with one contact",
4157
- "provider_state": "a contact with id 'abc' exists",
4158
- "request": {
4159
- "method": "post",
4160
- "path": "/contacts",
4161
- "headers": {
4162
- "Content-Type": "application/vnd.api+json"
4163
- },
4164
- "body": {
4165
- "contacts": [
4166
- {
4167
- "id": "abc",
4168
- "first_name": "Jim",
4169
- "last_name": "Smith",
4170
- "email": "jims@example.com",
4171
- "timezone": "UTC"
4172
- }
4173
- ]
4174
- }
4175
- },
4176
- "response": {
4177
- "status": 409,
4178
- "headers": {
4179
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4180
- },
4181
- "body": {
4182
- "errors": [
4183
- "Contacts already exist with the following IDs: abc"
4184
- ]
4185
- }
4186
- }
4187
- },
4188
- {
4189
- "description": "a PATCH request to change properties for two contacts",
4190
- "provider_state": "contacts with ids 'abc' and '872' exist",
4191
- "request": {
4192
- "method": "patch",
4193
- "path": "/contacts/abc,872",
4194
- "headers": {
4195
- "Content-Type": "application/json-patch+json"
4196
- },
4197
- "body": [
4198
- {
4199
- "op": "replace",
4200
- "path": "/contacts/0/timezone",
4201
- "value": "UTC"
4202
- }
4203
- ]
4204
- },
4205
- "response": {
4206
- "status": 204,
4207
- "body": ""
4208
- }
4209
- },
4210
- {
4211
- "description": "a PATCH request to change properties for a single contact",
4212
- "provider_state": "no contact exists",
4213
- "request": {
4214
- "method": "patch",
4215
- "path": "/contacts/323",
4216
- "headers": {
4217
- "Content-Type": "application/json-patch+json"
4218
- },
4219
- "body": [
4220
- {
4221
- "op": "replace",
4222
- "path": "/contacts/0/timezone",
4223
- "value": "UTC"
4224
- }
4225
- ]
4226
- },
4227
- "response": {
4228
- "status": 404,
4229
- "headers": {
4230
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4231
- },
4232
- "body": {
4233
- "errors": [
4234
- "could not find contacts '323'"
4235
- ]
4236
- }
4237
- }
4238
- },
4239
- {
4240
- "description": "a PATCH request to change properties for a single contact",
4241
- "provider_state": "a contact with id 'abc' exists",
4242
- "request": {
4243
- "method": "patch",
4244
- "path": "/contacts/abc",
4245
- "headers": {
4246
- "Content-Type": "application/json-patch+json"
4247
- },
4248
- "body": [
4249
- {
4250
- "op": "replace",
4251
- "path": "/contacts/0/timezone",
4252
- "value": "UTC"
4253
- }
4254
- ]
4255
- },
4256
- "response": {
4257
- "status": 204,
4258
- "body": ""
4259
- }
4260
- },
4261
- {
4262
- "description": "a PATCH request to change links for two contacts",
4263
- "provider_state": "contacts with ids 'abc' and '872' exist",
4264
- "request": {
4265
- "method": "patch",
4266
- "path": "/contacts/abc,872",
4267
- "headers": {
4268
- "Content-Type": "application/json-patch+json"
4269
- },
4270
- "body": [
4271
- {
4272
- "op": "add",
4273
- "path": "/contacts/0/links/entities/-",
4274
- "value": "1234"
4275
- }
4276
- ]
4277
- },
4278
- "response": {
4279
- "status": 204,
4280
- "body": ""
4281
- }
4282
- },
4283
- {
4284
- "description": "a PATCH requestto change a link for a single contact",
4285
- "provider_state": "a contact with id '872' exists",
4286
- "request": {
4287
- "method": "patch",
4288
- "path": "/contacts/872",
4289
- "headers": {
4290
- "Content-Type": "application/json-patch+json"
4291
- },
4292
- "body": [
4293
- {
4294
- "op": "add",
4295
- "path": "/contacts/0/links/entities/-",
4296
- "value": "1234"
4297
- }
4298
- ]
4299
- },
4300
- "response": {
4301
- "status": 204,
4302
- "body": ""
4303
- }
4304
- },
4305
- {
4306
- "description": "a POST request with two checks",
4307
- "provider_state": "entities 'www.example.com', id '1234' and 'www2.example.com', id '5678' exist",
4308
- "request": {
4309
- "method": "post",
4310
- "path": "/checks",
4311
- "headers": {
4312
- "Content-Type": "application/vnd.api+json"
4313
- },
4314
- "body": {
4315
- "checks": [
4316
- {
4317
- "name": "SSH",
4318
- "entity_id": "1234"
4319
- },
4320
- {
4321
- "name": "PING",
4322
- "entity_id": "5678"
4323
- }
4324
- ]
4325
- }
4326
- },
4327
- "response": {
4328
- "status": 201,
4329
- "headers": {
4330
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4331
- },
4332
- "body": [
4333
- "www.example.com:SSH",
4334
- "www2.example.com:PING"
4335
- ]
4336
- }
4337
- },
4338
- {
4339
- "description": "a POST request with one check",
4340
- "provider_state": "an entity 'www.example.com' with id '1234' exists",
4341
- "request": {
4342
- "method": "post",
4343
- "path": "/checks",
4344
- "headers": {
4345
- "Content-Type": "application/vnd.api+json"
4346
- },
4347
- "body": {
4348
- "checks": [
4349
- {
4350
- "name": "SSH",
4351
- "entity_id": "1234"
4352
- }
4353
- ]
4354
- }
4355
- },
4356
- "response": {
4357
- "status": 201,
4358
- "headers": {
4359
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4360
- },
4361
- "body": [
4362
- "www.example.com:SSH"
4363
- ]
4364
- }
4365
- },
4366
- {
4367
- "description": "a GET request for check 'www.example.com:SSH'",
4368
- "provider_state": "no entity exists",
4369
- "request": {
4370
- "method": "get",
4371
- "path": "/checks/www.example.com:SSH"
4372
- },
4373
- "response": {
4374
- "status": 404,
4375
- "headers": {
4376
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4377
- },
4378
- "body": {
4379
- "errors": [
4380
- "could not find entity checks: 'www.example.com:SSH'"
4381
- ]
4382
- }
4383
- }
4384
- },
4385
- {
4386
- "description": "a GET request for check 'www.example.com:SSH'",
4387
- "provider_state": "a check 'www.example.com:SSH' exists",
4388
- "request": {
4389
- "method": "get",
4390
- "path": "/checks/www.example.com:SSH"
4391
- },
4392
- "response": {
4393
- "status": 200,
4394
- "headers": {
4395
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4396
- },
4397
- "body": {
4398
- "checks": [
4399
- {
4400
- "id": "www.example.com:SSH",
4401
- "name": "SSH",
4402
- "entity_name": "www.example.com",
4403
- "links": {
4404
- "entities": [
4405
- "1234"
4406
- ]
4407
- }
4408
- }
4409
- ]
4410
- }
4411
- }
4412
- },
4413
- {
4414
- "description": "a GET request for all checks",
4415
- "provider_state": "a check 'www.example.com:SSH' exists",
4416
- "request": {
4417
- "method": "get",
4418
- "path": "/checks"
4419
- },
4420
- "response": {
4421
- "status": 200,
4422
- "headers": {
4423
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4424
- },
4425
- "body": {
4426
- "checks": [
4427
- {
4428
- "id": "www.example.com:SSH",
4429
- "name": "SSH",
4430
- "entity_name": "www.example.com",
4431
- "links": {
4432
- "entities": [
4433
- "1234"
4434
- ]
4435
- }
4436
- }
4437
- ]
4438
- }
4439
- }
4440
- },
4441
- {
4442
- "description": "a GET request for all checks",
4443
- "provider_state": "no entity exists",
4444
- "request": {
4445
- "method": "get",
4446
- "path": "/checks"
4447
- },
4448
- "response": {
4449
- "status": 200,
4450
- "headers": {
4451
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4452
- },
4453
- "body": {
4454
- "checks": [
4455
-
4456
- ]
4457
- }
4458
- }
4459
- },
4460
- {
4461
- "description": "a PATCH request for a single check",
4462
- "provider_state": "no entity exists",
4463
- "request": {
4464
- "method": "patch",
4465
- "path": "/checks/www.example.com:SSH",
4466
- "headers": {
4467
- "Content-Type": "application/json-patch+json"
4468
- },
4469
- "body": [
4470
- {
4471
- "op": "replace",
4472
- "path": "/checks/0/enabled",
4473
- "value": false
4474
- }
4475
- ]
4476
- },
4477
- "response": {
4478
- "status": 404,
4479
- "headers": {
4480
- "Content-Type": "application/vnd.api+json; charset=utf-8"
4481
- },
4482
- "body": {
4483
- "errors": [
4484
- "could not find entity 'www.example.com'"
4485
- ]
4486
- }
4487
- }
4488
- },
4489
- {
4490
- "description": "a PATCH request for a single check",
4491
- "provider_state": "a check 'www.example.com:SSH' exists",
4492
- "request": {
4493
- "method": "patch",
4494
- "path": "/checks/www.example.com:SSH",
4495
- "headers": {
4496
- "Content-Type": "application/json-patch+json"
4497
- },
4498
- "body": [
4499
- {
4500
- "op": "replace",
4501
- "path": "/checks/0/enabled",
4502
- "value": false
4503
- }
4504
- ]
4505
- },
4506
- "response": {
4507
- "status": 204,
4508
- "body": ""
4509
- }
4510
- }
4511
- ],
4512
- "metadata": {
4513
- "pactSpecificationVersion": "1.0.0"
4514
- }
4515
- }