This repository has been archived by the owner on Jul 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathoutput.yaml
executable file
·7842 lines (7639 loc) · 280 KB
/
output.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
swagger: '2.0'
info:
title: PagerDuty API
description: >
The PagerDuty API provides programmatic access to entities within a PagerDuty
account. It is designed around [RESTful
principles](https://en.wikipedia.org/wiki/Representational_state_transfer)
with a path structure based on resources and their relationships.
All requests and responses are serialized in
[JSON](https://en.wikipedia.org/wiki/JSON), including error responses.
Schema are designed to be reusable across requests and across endpoints.
More sophisticated API clients should treat PagerDuty resources as unique
objects keyed by the `id` field that can be used in any API request involving
resources of that type.
Every resource contains a `type` field that identifies the schema it uses.
## Rate limiting
Each account and authentication mechanism is limited to the number of API
requests it can make every minute. API requests that exceed the API rate
limit will return an [HTTP status code](error_codes.html#http_responses) of
429. Different requests may affect your rate limit differently, so clients
should always be prepared to be rate limited and respond appropriately.
## Read-Only API Keys
API requests made with read-only keys attempting to access endpoints with
methods other than `GET` will return an [HTTP status
code](error_codes.html#http_responses) of 403.
## Error Codes
Most APIs will return an error code from an unsuccessful call. They are
described [here](error_codes.html).
version: '2.0'
host: api.pagerduty.com
schemes:
- https
security:
- api_key: []
securityDefinitions:
api_key:
type: apiKey
name: Authorization
in: header
description: 'The Api Key with format `Token token=<API_KEY>`'
consumes:
- application/json
produces:
- application/vnd.pagerduty+json;version=2
tags:
- name: API Reference
description: "The API reference documentation provides all the nitty-gritty details of the endpoints available in the REST API.\nSee parameters you can specify, request and response schemas, as well as examples for every PagerDuty REST API endpoint.\n\nFind the endpoint you're looking for in the left navigation column.\nThen, consult the description in the middle column to learn about [parameters](#parameters) that can be specified with the request, possible [responses](#response-messages) to the request, and to [try out](#try-it-out-) a request.\nIn the right column, see examples and [schema definitions](#schemas) of what you can expect in a successful response.\nFor `PUT` and `POST` endpoints, examples and [schema definitions](#schemas) are available for request bodies as well.\n\n##### Parameters\n\nSee the names, [types](https://v2.developer.pagerduty.com/docs/types), possible values, and location of every parameter accepted by the endpoint.\n\n**Query parameters** located *in query* should be specified in the query string when making a request.\n**Body parameters** located *in body* should be specified in JSON format within the request body.\nBody parameters are typically only used with `POST` and `PUT` endpoints.\n**Header parameters** located *in header* should be specified as [standard HTTP headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields) in the header section of the request.\n\n##### Schemas\n\nSchemas show the name, [type](https://v2.developer.pagerduty.com/docs/types), description, and possible values for every property in each [resource schema](https://v2.developer.pagerduty.com/docs/resource-schemas).\nProperties which are **read only** cannot be set as part of a request and will be generated by the server. Properties which are not **optional** are required, and *must* be specified in requests.\n\n##### Response Messages\n\nSee the possible [HTTP status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) that can be returned by the endpoint if the request did not complete successfully.\nOften, the response body for an unsuccessful request will contain one or more [error messages](https://v2.developer.pagerduty.com/docs/errors) that indicate what was wrong with the request in more detail.\n\n##### Try it out!\n\nTo test an endpoint against the live API, fill out at the endpoint's parameters and click the \"Try\" button.\nYou'll see the details of the request that was made and the response returned from the server.\n\nBy default, all requests will be made against the read-only \"webdemo\" PagerDuty account.\nProvide your own [API token](https://v2.developer.pagerduty.com/docs/authentication#api-token-authentication) in the \"API Token\" field in the left column and your requests will be sent to your account instead.\nRemember this is the **live API** —\_modify your own account with care.\n\n##### Learn more\n\nTo read about general PagerDuty API topics, including:\n- [Authentication](https://v2.developer.pagerduty.com/v2/docs/authentication)\n- [Versioning](https://v2.developer.pagerduty.com/v2/docs/versioning)\n- [Endpoints](https://v2.developer.pagerduty.com/v2/docs/endpoints)\n- [Types](https://v2.developer.pagerduty.com/v2/docs/types)\n- [Filtering](https://v2.developer.pagerduty.com/v2/docs/filtering)\n- [Sorting](https://v2.developer.pagerduty.com/v2/docs/sorting)\n- [Pagination](https://v2.developer.pagerduty.com/v2/docs/pagination)\n- [Resource Schemas](https://v2.developer.pagerduty.com/v2/docs/resource-schemas)\n- [Resource References](https://v2.developer.pagerduty.com/v2/docs/references)\n- [Includes](https://v2.developer.pagerduty.com/v2/docs/includes)\n- [Errors](https://v2.developer.pagerduty.com/v2/docs/errors)\n\n[consult the REST API Guide](https://v2.developer.pagerduty.com/docs/rest-api).\n"
- name: Abilities
description: >
This describes your account's abilities by feature name, like `"teams"`.
An ability may be available to your account based on things like your
pricing plan or account state.
- name: Add-ons
description: >
Third-party developers can write their own add-ons to PagerDuty's UI, to
add HTML to the product.
Given a configuration containing a `src` parameter, that URL will be
embedded in an `iframe` on a page that's available to users from
a drop-down menu.
- name: Escalation Policies
description: >
Escalation policies make sure the right people are alerted at the right
time.
An escalation policy determines what [user](#resource_Users) or
[schedule](#resource_Schedules) will be [notified](#resource_Notifications)
first, second, and so on when an [incident](#resource_Incidents) is
triggered.
Escalation policies are used by one or more
[services](#resource_Services).
#### Escalation Rules
An escalation policy is made up of multiple [escalation
rules](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules).
Each escalation rule represents a level of [on-call](#resource_On-Calls)
duty.
It specifies one or more [users](#resource_Users) or
[schedules](#resource_Schedules) to be notified when an unacknowledged
[incident](#resource_Incidents) reaches that [escalation
rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules).
The first [escalation
rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules)
in the escalation policy is the [user](#resource_Users) that will be
[notified](#resource_Notifications) first about the triggered
[incident](#resource_Incidents).
If no [on-call](#resource_On-Calls) [user](#resource_Users) for a given
[escalation
rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules)
has not acknowledged an [incident](#resource_Incidents) before the
[escalation
rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules)'s
escalation delay has elapsed, the [incident](#resource_Incidents) escalates
to the next [escalation
rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules).
[*Read more about escalation policies in the PagerDuty Knowledge
Base*](https://support.pagerduty.com/hc/en-us/articles/202828950-What-is-an-Escalation-Policy-).
- name: Incidents
description: >
An incident is a normalized, de-duplicated event generated by a PagerDuty
[integration](#!/Services/get_services_id_integrations_integration_id).
It can be thought of as a problem or an issue within your
[service](#resource_Services) that needs to be addressed and resolved.
Incidents can be `triggered`, `acknowledged`, or `resolved`, and are
assigned to a user based on the [service](#resource_Services)'s [escalation
policy](#resource_Escalation_Policies).
A triggered incident prompts a [notification](#resource_Notifications) to
be sent to the currently [on-call](#resource_On-Calls)
[user(s)](#resource_Users) as defined in the escalation policy used by the
[service](#resource_Services).
Incidents are triggered through the [Events
API](https://v2.developer.pagerduty.com/docs/events-api).
Updates to an incident generate [log entries](#resource_Log_Entries) that
capture the changes to an incident over time, whether these changes were
prompted by a [user](#resource_Users), an
[integration](#resource_Integrations), or were performed automatically.
[*Read more about incidents in the PagerDuty Knowledge
Base*](https://support.pagerduty.com/hc/en-us/articles/202829250-What-Is-an-Incident-).
- name: Log Entries
description: >
PagerDuty keeps a log of all the events that happen to an
[incident](#resource_Incidents).
These are exposed as log entries.
Log entries give you more insight into how your [team](#resource_Teams) or
organization is handling your [incidents](#resource_Incidents).
Log entry data includes details about the event(s) that affected the
[incident](#resource_Incidents) throughout its lifecycle, such as:
- the data contained in events sent by the
[integration](#!/Services/get_services_id_integrations_integration_id)
- what [users](#resource_Users) were [notified](#resource_Notifications)
and when
- how they were [notified](#resource_Notifications)
- what [user(s)](#resource_Users) acknowledged or resolved the
[incident](#resource_Incidents)
- any automatic actions that occurred to the
[incident](#resource_Incidents)
- other manual [user](#resource_Users) actions, such as a reassignment or
a note
Log entries cannot be created directly through the API; they are a result
of other actions. The API provides read-only access to the log entries
generated by PagerDuty.
- name: Maintenance Windows
description: >
A maintenance window is used to temporarily disable one or more
[services](#resource_Services) for a set period of time.
No [incidents](#resource_Incidents) will be triggered and no
[notifications](#resource_Notifications) will be received while
a [service](#resource_Services) is disabled by a maintenance window.
Maintenance windows are specified to start at a certain time and end after
they have begun.
Once started, a maintenance window cannot be deleted; it can only be ended
immediately to re-enable the [service](#resource_Services).
[*Read more about maintenance windows in the PagerDuty Knowledge
Base*](https://support.pagerduty.com/hc/en-us/articles/202830350-Putting-a-service-in-maintenance-mode).
- name: Notifications
description: >
When an [incident](#resource_Incidents) is triggered or escalated, it
creates a notification.
Notifications are messages containing the details of the
[incident](#resource_Incidents), and can be sent through SMS, email, phone
calls, and push notifications.
Notifications cannot be created directly through the API; they are a result
of other actions.
The API provides read-only access to the notifications generated by
PagerDuty.
[*Read more about notifications in the PagerDuty Knowledge
Base*](https://support.pagerduty.com/hc/en-us/articles/202828840-What-is-an-Alert-Notification-).
- name: On-Calls
description: >
An on-call represents a contiguous unit of time for which
a [user](#resource_Users) will be on call for a given [escalation
policy](#resource_Escalation_Policies) and [escalation
rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules).
This may be the result of that [user](#resource_Users) always being on call
for the [escalation
rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules),
or a block of time during which the computed result of
a [schedule](#resource_Schedules) on that [escalation
rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules)
puts the user on call.
During an on-call, the [user](#resource_Users) is expected to bear
responsibility for responding to any
[notifications](#resource_Notifications) he or she receives and working to
resolve the associated [incident(s)](#resource_Incidents).
On-calls cannot be created directly through the API; they are the computed
result of how [escalation policies](#resource_Escalation_Policies) and
[schedules](#resource_Schedules) are configured.
The API provides read-only access to the on-calls generated by PagerDuty.
- name: Schedules
description: >
An on-call schedule determines the time periods that users are [on
call](#resource_On-Calls).
Only [on-call](#resource_On-Calls) [users](#resource_Users) are eligible to
receive [notifications](#resource_Notifications) from
[incidents](#resource_Incidents).
The details of the on-call schedule specify which single
[user](#resource_Users) is [on call](#resource_On-Calls) for that schedule
at any given point in time.
An on-call schedule consists of one or more [schedule
layers](https://support.pagerduty.com/hc/en-us/articles/202830250-Scheduling-Layers)
that rotate a group of [users](#resource_Users) through the same shift at
a set interval.
Restrictions on each schedule layer limit on-call responsibility for that
layer to certain times of the day or week.
The period of time during which a [user](#resource_Users) is present on
a schedule layer is called a schedule layer entry.
The ordered composition of schedule layers, combined with any schedule
layer entries from the override layer, known as
[overrides](#!/Schedules/get_schedules_id_overrides), results in the final
schedule layer.
The final schedule layer represents the computed set of schedule layer
entries that put [users](#resource_Users) [on call](#resource_On-Calls) for
the schedule, and cannot be modified directly.
Schedules are used by [escalation policies](#resource_Escalation_Policies)
as an escalation target for a given [escalation
rule](#!/Escalation_Policies/get_escalation_policies_id_escalation_rules).
[*Read more about on-call schedules in the PagerDuty Knowledge
Base*](https://support.pagerduty.com/hc/en-us/sections/200550790-On-Call-Schedules).
- name: Services
description: >
A PagerDuty service represents something you monitor (like a web service,
email service, or database service).
It is a container for related [incidents](#resource_Incidents) that
associates them with [escalation policies](#resource_Escalation_Policies).
A service is the focal point for [incident](#resource_Incidents)
management; services specify the configuration for the behavior of
[incidents](#resource_Incidents) triggered on them.
This behavior includes specifying urgency and performing automated actions
based on time of day, [incident](#resource_Incidents) duration, and other
factors.
#### Integrations
An integration is an endpoint (like Nagios, email, or an API call) that
generates events, which are normalized and de-duplicated by PagerDuty to
create [incidents](#resource_Incidents).
Integrations feed events into services and provide event management
functionality such as filtering and de-duplication.
[*Read more about services in the PagerDuty Knowledge
Base*](https://support.pagerduty.com/hc/en-us/sections/200550800-Services).
- name: Teams
description: >
A team is a collection of [users](#resource_Users) and [escalation
policies](#resource_Escalation_Policies) that represent a group of people
within an organization.
Teams can be used throughout the API and PagerDuty applications to filter
information to only what is relevant for one or more teams.
The account must have the teams ability to use the following endpoints.
[*Read more about teams in the PagerDuty Knowledge
Base*](https://support.pagerduty.com/hc/en-us/articles/204072090-How-to-Create-Teams-in-PagerDuty-).
- name: Users
description: >
PagerDuty users are members of a PagerDuty account that have the ability to
interact with [incidents](#resource_Incidents) and other data on the
account.
Users are fundamental agents of different types of actions in PagerDuty.
A user can, among other things:
- acknowlege, reassign, snooze, escalate, and resolve
[incidents](#resource_Incidents)
- configure [services](#resource_Services), [escalation
policies](#resource_Escalation_Policies),
[integrations](#!/Services/get_services_id_integrations_integration_id),
[on-call schedules](#resource_Schedules), [teams](#resource_Teams), and
more
- go [on call](#resource_On-Calls) for one or more
[schedules](#resource_Schedules) or [escalation
policies](#resource_Escalation_Policies)
- receive [notifications](#resource_Notifications)
Depending on a user's role, he or she may have access to different parts of
the account's data.
[*Read more about users in the PagerDuty Knowledge
Base*](https://support.pagerduty.com/hc/en-us/sections/200550780-Users).
- name: Vendors
description: >
A PagerDuty vendor represents a specific type of integration. AWS
Cloudwatch, Splunk, Datadog, etc are all examples of vendors
that can be integrated in PagerDuty by making an
[integration](#!/Services/get_services_id_integrations_integration_id).
Vendored integrations (when compared to generic email and API integrations)
are automatically configured with the right API or email
filtering settings for inbound events from that vendor. Some vendors also
have associated integration guides
on the PagerDuty support site.
paths:
/abilities:
x-description: "List your account's abilities."
get:
tags:
- Abilities
description: "List all of your account's abilities, by name."
summary: List abilities
responses:
'200':
description: An array of ability names.
schema:
allOf:
- type: object
properties:
abilities:
type: array
description: The set of abilities your account has.
items:
type: string
description: 'A single ability, as a name.'
readOnly: true
required:
- abilities
examples:
application/json:
abilities:
- teams
- read_only_users
- service_support_hours
- urgencies
'401':
$ref: '#/responses/Unauthorized'
'403':
$ref: '#/responses/Forbidden'
'429':
$ref: '#/responses/TooManyRequests'
'/abilities/{id}':
x-description: Get an ability.
get:
tags:
- Abilities
description: Test whether your account has a given ability.
summary: Test an ability
parameters:
- $ref: '#/parameters/id'
responses:
'204':
description: The account has the requested ability.
'401':
$ref: '#/responses/Unauthorized'
'402':
$ref: '#/responses/PaymentRequired'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
/addons:
x-description: List and add add-ons to your account.
get:
tags:
- Add-ons
description: List all of the add-ons installed on your account.
summary: List installed add-ons
parameters:
- $ref: '#/parameters/include_addon'
- name: 'service_ids[]'
in: query
description: 'Filters the results, showing only add-ons for the given services'
type: array
collectionFormat: multi
uniqueItems: true
items:
type: string
- name: filter
in: query
description: 'Filters the results, showing only add-ons of the given type'
type: string
enum:
- full_page_addon
- incident_show_addon
responses:
'200':
description: A paginated array of installed add-ons.
schema:
allOf:
- $ref: '#/definitions/Pagination'
- type: object
properties:
addons:
type: array
items:
$ref: '#/definitions/Addon'
required:
- addons
examples:
application/json:
addons:
- id: PKX7619
type: full_page_addon
summary: Internal Status Page
self: 'https://api.pagerduty.com/addons/PKX7619'
html_url: 'https://subdomain.pagerduty.com/addons/PKX7619'
name: Internal Status Page
src: 'https://intranet.example.com/status'
limit: 25
offset: 0
more: false
total: null
'400':
$ref: '#/responses/ArgumentError'
'401':
$ref: '#/responses/Unauthorized'
'403':
$ref: '#/responses/Forbidden'
'429':
$ref: '#/responses/TooManyRequests'
post:
tags:
- Add-ons
description: Install an add-on for your account.
summary: Install an add-on
parameters:
- name: addon
in: body
description: The add-on to be installed.
schema:
type: object
properties:
addon:
$ref: '#/definitions/Addon'
required:
- addon
responses:
'201':
description: The add-on that was installed.
schema:
type: object
properties:
addon:
$ref: '#/definitions/Addon'
required:
- addon
examples:
application/json:
addon:
id: PKX7619
type: full_page_addon
summary: Internal Status Page
self: 'https://api.pagerduty.com/addons/PKX7619'
html_url: 'https://subdomain.pagerduty.com/addons/PKX7619'
name: Internal Status Page
src: 'https://intranet.example.com/status'
'400':
$ref: '#/responses/ArgumentError'
'401':
$ref: '#/responses/Unauthorized'
'403':
$ref: '#/responses/Forbidden'
'429':
$ref: '#/responses/TooManyRequests'
'/addons/{id}':
x-description: Get an add-on.
get:
tags:
- Add-ons
description: Get details about an existing add-on.
summary: Get an add-on
parameters:
- $ref: '#/parameters/id'
responses:
'200':
description: The requested add-on.
schema:
type: object
properties:
addon:
$ref: '#/definitions/Addon'
required:
- addon
examples:
application/json:
addon:
id: PKX7F81
type: incident_show_addon
name: Service Runbook
src: 'https://intranet.example.com/runbook.html'
services:
- id: PIJ90N7
type: service
summary: My Application Service
self: 'https://api.pagerduty.com/services/PIJ90N7'
html_url: 'https://subdomain.pagerduty.com/services/PIJ90N7'
'400':
$ref: '#/responses/ArgumentError'
'401':
$ref: '#/responses/Unauthorized'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
delete:
tags:
- Add-ons
description: Remove an existing add-on.
summary: Delete an add-on
parameters:
- $ref: '#/parameters/id'
responses:
'204':
description: The add-on was deleted successfully.
'401':
$ref: '#/responses/Unauthorized'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
put:
tags:
- Add-ons
description: Update an existing add-on.
summary: Update an add-on
parameters:
- name: addon
in: body
description: The add-on to be updated.
schema:
type: object
properties:
addon:
$ref: '#/definitions/Addon'
required:
- addon
- $ref: '#/parameters/id'
responses:
'200':
description: The add-on that was updated.
schema:
type: object
properties:
addon:
$ref: '#/definitions/Addon'
required:
- addon
examples:
application/json:
addon:
id: PKX7F81
type: incident_show_addon
name: Service Runbook
src: 'https://intranet.example.com/runbook.html'
services:
- id: PIJ90N7
type: service
summary: My Application Service
self: 'https://api.pagerduty.com/services/PIJ90N7'
html_url: 'https://subdomain.pagerduty.com/services/PIJ90N7'
'400':
$ref: '#/responses/ArgumentError'
'401':
$ref: '#/responses/Unauthorized'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
/escalation_policies:
x-description: List and create escalation policies.
get:
tags:
- Escalation Policies
description: List all of the existing escalation policies.
summary: List escalation policies
parameters:
- name: query
in: query
description: 'Filters the results, showing only the escalation policies whose names contain the query.'
type: string
- name: 'user_ids[]'
in: query
description: 'Filters the results, showing only escalation policies on which any of the users is a target.'
type: array
collectionFormat: multi
uniqueItems: true
items:
type: string
- $ref: '#/parameters/team_ids'
- $ref: '#/parameters/include_escalation_policy'
- $ref: '#/parameters/sort_by_escalation_policy'
responses:
'200':
description: A paginated array of escalation policy objects.
schema:
allOf:
- $ref: '#/definitions/Pagination'
- type: object
properties:
escalation_policies:
type: array
items:
$ref: '#/definitions/EscalationPolicy'
required:
- escalation_policies
examples:
application/json:
escalation_policies:
- id: PANZZEQ
type: escalation_policy
summary: Engineering Escalation Policy
self: 'https://api.pagerduty.com/escalation_policies/PANZZEQ'
html_url: 'https://subdomain.pagerduty.com/escalation_policies/PANZZEQ'
name: Engineering Escalation Policy
escalation_rules:
- id: PANZZEQ
escalation_delay_in_minutes: 30
targets:
- id: PEYSGVF
summary: PagerDuty Admin
type: user_reference
self: 'https://api.pagerduty.com/users/PEYSGVF'
html_url: 'https://subdomain.pagerduty.com/users/PEYSGVF'
- id: PI7DH85
summary: Daily Engineering Rotation
type: schedule_reference
self: 'https://api.pagerduty.com/schedules/PI7DH85'
html_url: 'https://subdomain.pagerduty.com/schedules/PI7DH85'
services:
- id: PIJ90N7
type: generic_email_reference
summary: My Mail Service
self: 'https://api.pagerduty.com/services/PIJ90N7'
html_url: 'https://subdomain.pagerduty.com/services/PIJ90N7'
num_loops: 0
teams:
- id: PQ9K7I8
type: team_reference
summary: Engineering
self: 'https://api.pagerduty.com/teams/PQ9K7I8'
html_url: 'https://subdomain.pagerduty.com/teams/PQ9K7I8'
description: null
limit: 25
offset: 0
more: false
total: null
'400':
$ref: '#/responses/ArgumentError'
'401':
$ref: '#/responses/Unauthorized'
'403':
$ref: '#/responses/Forbidden'
'429':
$ref: '#/responses/TooManyRequests'
post:
tags:
- Escalation Policies
description: Creates a new escalation policy. There must be at least one existing escalation rule added to create a new escalation policy.
summary: Create an escalation policy
parameters:
- $ref: '#/parameters/optional_from_header'
- name: escalation_policy
in: body
description: The escalation policy to be created.
schema:
type: object
properties:
escalation_policy:
$ref: '#/definitions/EscalationPolicy'
required:
- escalation_policy
responses:
'201':
description: The escalation policy that was created.
schema:
type: object
properties:
escalation_policy:
$ref: '#/definitions/EscalationPolicy'
required:
- escalation_policy
examples:
application/json:
escalation_policy:
id: PT20YPA
type: escalation_policy
summary: Engineering Escalation Policy
self: 'https://api.pagerduty.com/escalation_policies/PT20YPA'
html_url: 'https://subdomain.pagerduty.com/escalation_policies/PT20YPA'
name: Engineering Escalation Policy
escalation_rules:
- id: PT20YPA
escalation_delay_in_minutes: 22
targets:
- id: PXPGF42
summary: Earline Greenholt
type: user_reference
self: 'https://api.pagerduty.com/users/PXPGF42'
html_url: 'https://subdomain.pagerduty.com/users/PXPGF42'
- id: PI7DH85
summary: Daily Engineering Rotation
type: schedule_reference
self: 'https://api.pagerduty.com/schedules/PI7DH85'
html_url: 'https://subdomain.pagerduty.com/schedules/PI7DH85'
services:
- id: PIJ90N7
type: generic_email_reference
summary: My Mail Service
self: 'https://api.pagerduty.com/services/PIJ90N7'
html_url: 'https://subdomain.pagerduty.com/services/PIJ90N7'
num_loops: 2
teams:
- id: PQ9K7I8
type: team_reference
summary: Engineering
self: 'https://api.pagerduty.com/teams/PQ9K7I8'
html_url: 'https://subdomain.pagerduty.com/teams/PQ9K7I8'
description: null
'400':
$ref: '#/responses/ArgumentError'
'401':
$ref: '#/responses/Unauthorized'
'402':
$ref: '#/responses/PaymentRequired'
'403':
$ref: '#/responses/Forbidden'
'429':
$ref: '#/responses/TooManyRequests'
'/escalation_policies/{id}':
x-description: Manage an escalation policy.
get:
tags:
- Escalation Policies
description: Get information about an existing escalation policy and its rules.
summary: Get an escalation policy
parameters:
- $ref: '#/parameters/id'
- $ref: '#/parameters/include_escalation_policy'
responses:
'200':
description: The escalation policy object.
schema:
type: object
properties:
escalation_policy:
$ref: '#/definitions/EscalationPolicy'
required:
- escalation_policy
examples:
application/json:
escalation_policy:
id: PT20YPA
type: escalation_policy
summary: Another Escalation Policy
self: 'https://api.pagerduty.com/escalation_policies/PT20YPA'
html_url: 'https://subdomain.pagerduty.com/escalation_policies/PT20YPA'
name: Another Escalation Policy
escalation_rules:
- id: PGHDV41
escalation_delay_in_minutes: 30
targets:
- id: PAM4FGS
summary: Kyler Kuhn
type: user_reference
self: 'https://api.pagerduty.com/users/PAM4FGS'
html_url: 'https://subdomain.pagerduty.com/users/PAM4FGS'
- id: PI7DH85
summary: Daily Engineering Rotation
type: schedule_reference
self: 'https://api.pagerduty.com/schedules/PI7DH85'
html_url: 'https://subdomain.pagerduty.com/schedules/PI7DH85'
services:
- id: PIJ90N7
type: generic_email_reference
summary: My Mail Service
self: 'https://api.pagerduty.com/services/PIJ90N7'
html_url: 'https://subdomain.pagerduty.com/services/PIJ90N7'
num_loops: 2
teams:
- id: PQ9K7I8
type: team_reference
summary: Engineering
self: 'https://api.pagerduty.com/teams/PQ9K7I8'
html_url: 'https://subdomain.pagerduty.com/teams/PQ9K7I8'
description: This is yet another escalation policy
'401':
$ref: '#/responses/Unauthorized'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
delete:
tags:
- Escalation Policies
description: Deletes an existing escalation policy and rules. The escalation policy must not be in use by any services.
summary: Delete an escalation policy
parameters:
- $ref: '#/parameters/id'
responses:
'204':
description: The escalation policy was deleted successfully.
'401':
$ref: '#/responses/Unauthorized'
'403':
$ref: '#/responses/Forbidden'
'404':
$ref: '#/responses/NotFound'
'429':
$ref: '#/responses/TooManyRequests'
put:
tags:
- Escalation Policies
description: Updates an existing escalation policy and rules.
summary: Update an escalation policy
parameters:
- name: escalation_policy
in: body
description: The escalation policy to be updated.
schema:
type: object
properties:
escalation_policy:
$ref: '#/definitions/EscalationPolicy'
required:
- escalation_policy
- $ref: '#/parameters/id'
responses:
'200':
description: The escalation policy that was updated.
schema:
type: object
properties:
escalation_policy:
$ref: '#/definitions/EscalationPolicy'
required:
- escalation_policy
examples:
application/json:
escalation_policy:
id: PT20YPA
type: escalation_policy
summary: Another Escalation Policy
self: 'https://api.pagerduty.com/escalation_policies/PT20YPA'
html_url: 'https://subdomain.pagerduty.com/escalation_policies/PT20YPA'
name: Another Escalation Policy
escalation_rules:
- id: PGHDV41
escalation_delay_in_minutes: 30