Skip to content

Commit 0c55d07

Browse files
committed
Fixing spaces
1 parent 978e2fe commit 0c55d07

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

REST_API_v2/Incidents/trigger_incident.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,31 @@
3434
FROM = ''
3535

3636
def trigger_incident():
37-
"""Triggers an incident using the V2 REST API."""
38-
37+
"""Triggers an incident using the V2 REST API."""
38+
3939
url = 'https://api.pagerduty.com/incidents'
4040
headers = {
41-
'Content-Type': 'application/json',
41+
'Content-Type': 'application/json',
4242
'Accept': 'application/vnd.pagerduty+json;version=2',
4343
'Authorization': 'Token token={token}'.format(token=API_KEY),
4444
'From': FROM
4545
}
4646

4747
payload = {
48-
"incident": {
49-
"type": "incident",
50-
"title": "The server is on fire.",
51-
"service": {
52-
"id": SERVICE_ID,
53-
"type": "service_reference"
54-
},
55-
"incident_key": "baf7cf21b1da41b4b0221008339ff3571",
56-
"body": {
57-
"type": "incident_body",
58-
"details": "A disk is getting full on this machine. You should investigate what is causing the disk to fill, and ensure that there is an automated process in place for ensuring data is rotated (eg. logs should have logrotate around them). If data is expected to stay on this disk forever, you should start planning to scale up to a larger disk."
59-
}
60-
}
61-
}
48+
"incident": {
49+
"type": "incident",
50+
"title": "The server is on fire.",
51+
"service": {
52+
"id": SERVICE_ID,
53+
"type": "service_reference"
54+
},
55+
"incident_key": "baf7cf21b1da41b4b0221008339ff3571",
56+
"body": {
57+
"type": "incident_body",
58+
"details": "A disk is getting full on this machine. You should investigate what is causing the disk to fill, and ensure that there is an automated process in place for ensuring data is rotated (eg. logs should have logrotate around them). If data is expected to stay on this disk forever, you should start planning to scale up to a larger disk."
59+
}
60+
}
61+
}
6262

6363
r = requests.post(url, headers=headers, data=json.dumps(payload))
6464

0 commit comments

Comments
 (0)