Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions REST_API_v2/Incidents/list_incidents.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import requests
import json

# Update to match your API key
API_KEY = '3c3gRvzx7uGfMYEnWKvF'
Expand Down Expand Up @@ -55,17 +54,17 @@ def list_incidents():
'since': SINCE,
'until': UNTIL,
'date_range': DATE_RANGE,
'statuses': STATUSES,
'statuses[]': STATUSES,
'incident_key': INCIDENT_KEY,
'service_ids': SERVICE_IDS,
'team_ids': TEAM_IDS,
'user_ids': USER_IDS,
'urgencies': URGENCIES,
'service_ids[]': SERVICE_IDS,
'team_ids[]': TEAM_IDS,
'user_ids[]': USER_IDS,
'urgencies[]': URGENCIES,
'time_zone': TIME_ZONE,
'sort_by': SORT_BY,
'include': INCLUDE
'sort_by[]': SORT_BY,
'include[]': INCLUDE
}
r = requests.get(url, headers=headers, params=json.dumps(payload))
r = requests.get(url, headers=headers, params=payload)
print 'Status Code: ' + str(r.status_code)
print r.json()

Expand Down