File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727
2828import requests
29- import json
3029
3130# Update to match your API key
3231API_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
You can’t perform that action at this time.
0 commit comments