Skip to content

Instantly share code, notes, and snippets.

View mdcollins05's full-sized avatar

MDCollins mdcollins05

View GitHub Profile
#!/usr/bin/python
import requests
import sys
import json
from datetime import date, timedelta
import pprint
#Your PagerDuty API key. A read-only key will work for this.
auth_token = 'API_KEY_HERE'
@mdcollins05
mdcollins05 / get_incident_details_with_body.py
Last active August 29, 2015 14:14
Implemented a new method to remove unicode characters before passing the object to str(). Fixes encoding issues with strings in the details and body.
#!/usr/bin/env python
import requests
import sys
import json
from datetime import date, timedelta
#Your PagerDuty API key. A read-only key will work for this.
AUTH_TOKEN = ''
#The API base url, make sure to include the subdomain