Skip to content

Commit be43089

Browse files
authored
Merge pull request PagerDuty#2 from dmyerscough/fix-param-pass
Fix param pass
2 parents bcbc415 + 1bfb765 commit be43089

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

REST_API_v2/Incidents/list_incidents.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

2828
import requests
29-
import json
3029

3130
# Update to match your API key
3231
API_KEY = '3c3gRvzx7uGfMYEnWKvF'
@@ -55,17 +54,17 @@ def list_incidents():
5554
'since': SINCE,
5655
'until': UNTIL,
5756
'date_range': DATE_RANGE,
58-
'statuses': STATUSES,
57+
'statuses[]': STATUSES,
5958
'incident_key': INCIDENT_KEY,
60-
'service_ids': SERVICE_IDS,
61-
'team_ids': TEAM_IDS,
62-
'user_ids': USER_IDS,
63-
'urgencies': URGENCIES,
59+
'service_ids[]': SERVICE_IDS,
60+
'team_ids[]': TEAM_IDS,
61+
'user_ids[]': USER_IDS,
62+
'urgencies[]': URGENCIES,
6463
'time_zone': TIME_ZONE,
65-
'sort_by': SORT_BY,
66-
'include': INCLUDE
64+
'sort_by[]': SORT_BY,
65+
'include[]': INCLUDE
6766
}
68-
r = requests.get(url, headers=headers, params=json.dumps(payload))
67+
r = requests.get(url, headers=headers, params=payload)
6968
print 'Status Code: ' + str(r.status_code)
7069
print r.json()
7170

0 commit comments

Comments
 (0)