diff --git a/REST_API_v2/AddOns/list_installed_addons.py b/REST_API_v2/AddOns/list_installed_addons.py index ad8678f..f1e2d12 100755 --- a/REST_API_v2/AddOns/list_installed_addons.py +++ b/REST_API_v2/AddOns/list_installed_addons.py @@ -43,11 +43,11 @@ def list_installed_addons(): 'Authorization': 'Token token=' + API_KEY } payload = { - 'include': INCLUDE, - 'service_ids': SERVICE_IDS, + 'include[]': INCLUDE, + 'service_ids[]': SERVICE_IDS, 'filter': FILTER } - 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() diff --git a/REST_API_v2/EscalationPolicies/get_escalation_policy.py b/REST_API_v2/EscalationPolicies/get_escalation_policy.py index c6cd232..03dc6cc 100755 --- a/REST_API_v2/EscalationPolicies/get_escalation_policy.py +++ b/REST_API_v2/EscalationPolicies/get_escalation_policy.py @@ -44,9 +44,9 @@ def get_escalation_policy(): 'Authorization': 'Token token=' + API_KEY } payload = { - 'include': INCLUDE + '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() diff --git a/REST_API_v2/EscalationPolicies/list_escalation_policies.py b/REST_API_v2/EscalationPolicies/list_escalation_policies.py index 32e7a24..67bbee0 100755 --- a/REST_API_v2/EscalationPolicies/list_escalation_policies.py +++ b/REST_API_v2/EscalationPolicies/list_escalation_policies.py @@ -46,12 +46,12 @@ def list_escalation_policies(): } payload = { 'query': QUERY, - 'user_ids': USER_IDS, - 'team_ids': TEAM_IDS, - 'include': INCLUDE, + 'user_ids[]': USER_IDS, + 'team_ids[]': TEAM_IDS, + 'include[]': INCLUDE, 'sort_by': SORT_BY } - 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() diff --git a/REST_API_v2/Incidents/list_incident_log_entries.py b/REST_API_v2/Incidents/list_incident_log_entries.py index a744544..ddd710f 100755 --- a/REST_API_v2/Incidents/list_incident_log_entries.py +++ b/REST_API_v2/Incidents/list_incident_log_entries.py @@ -46,9 +46,9 @@ def get_incident(): payload = { 'time_zone': TIME_ZONE, 'is_overview': IS_OVERVIEW, - 'include': INCLUDE + '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() diff --git a/REST_API_v2/LogEntries/get_log_entry.py b/REST_API_v2/LogEntries/get_log_entry.py index aef0bad..c70ef0c 100755 --- a/REST_API_v2/LogEntries/get_log_entry.py +++ b/REST_API_v2/LogEntries/get_log_entry.py @@ -44,9 +44,9 @@ def get_log_entry(): 'Authorization': 'Token token=' + API_KEY } payload = { - 'include': INCLUDE + '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() diff --git a/REST_API_v2/LogEntries/list_log_entries.py b/REST_API_v2/LogEntries/list_log_entries.py index 996ca4e..175546b 100755 --- a/REST_API_v2/LogEntries/list_log_entries.py +++ b/REST_API_v2/LogEntries/list_log_entries.py @@ -47,13 +47,13 @@ def list_log_entries(): payload = { 'time_zone': TIME_ZONE, 'is_overview': IS_OVERVIEW, - 'include': INCLUDE + 'include[]': INCLUDE } if SINCE != '': payload['since'] = SINCE if UNTIL != '': payload['until'] = UNTIL - 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() diff --git a/REST_API_v2/MaintenanceWindows/get_maintenance_window.py b/REST_API_v2/MaintenanceWindows/get_maintenance_window.py index 82f674b..16aa8b7 100755 --- a/REST_API_v2/MaintenanceWindows/get_maintenance_window.py +++ b/REST_API_v2/MaintenanceWindows/get_maintenance_window.py @@ -44,9 +44,9 @@ def get_maintenance_window(): 'Authorization': 'Token token=' + API_KEY } payload = { - 'include': INCLUDE + '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() diff --git a/REST_API_v2/MaintenanceWindows/list_maintenance_windows.py b/REST_API_v2/MaintenanceWindows/list_maintenance_windows.py index 5ae5e38..7237775 100755 --- a/REST_API_v2/MaintenanceWindows/list_maintenance_windows.py +++ b/REST_API_v2/MaintenanceWindows/list_maintenance_windows.py @@ -45,13 +45,13 @@ def list_maintenance_windows(): 'Authorization': 'Token token=' + API_KEY } payload = { - 'team_ids': TEAM_IDS, - 'service_ids': SERVICE_IDS, - 'include': INCLUDE, + 'team_ids[]': TEAM_IDS, + 'service_ids[]': SERVICE_IDS, + 'include[]': INCLUDE, 'filter': FILTER, 'query': QUERY } - 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() diff --git a/REST_API_v2/Notifications/list_notifications.py b/REST_API_v2/Notifications/list_notifications.py index 61b2156..befdfb7 100755 --- a/REST_API_v2/Notifications/list_notifications.py +++ b/REST_API_v2/Notifications/list_notifications.py @@ -49,9 +49,9 @@ def list_notifications(): 'since': SINCE, 'until': UNTIL, 'filter': FILTER, - 'include': INCLUDE + '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() diff --git a/REST_API_v2/OnCalls/list_oncalls.py b/REST_API_v2/OnCalls/list_oncalls.py index 6006a5c..e6c86e8 100755 --- a/REST_API_v2/OnCalls/list_oncalls.py +++ b/REST_API_v2/OnCalls/list_oncalls.py @@ -49,15 +49,15 @@ def list_oncalls(): } payload = { 'time_zone': TIME_ZONE, - 'include': INCLUDE, - 'user_ids': USER_IDS, - 'escalation_policy_ids': ESCALATION_POLICY_IDS, - 'schedule_ids': SCHEDULE_IDS, + 'include[]': INCLUDE, + 'user_ids[]': USER_IDS, + 'escalation_policy_ids[]': ESCALATION_POLICY_IDS, + 'schedule_ids[]': SCHEDULE_IDS, 'since': SINCE, 'until': UNTIL, 'earliest': EARLIEST } - 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() diff --git a/REST_API_v2/Schedules/list_schedules.py b/REST_API_v2/Schedules/list_schedules.py index 5cc822a..e7d719c 100755 --- a/REST_API_v2/Schedules/list_schedules.py +++ b/REST_API_v2/Schedules/list_schedules.py @@ -43,7 +43,7 @@ def list_schedules(): payload = { 'query': QUERY } - 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() diff --git a/REST_API_v2/Services/get_integration.py b/REST_API_v2/Services/get_integration.py index 0f31db9..d8512c2 100755 --- a/REST_API_v2/Services/get_integration.py +++ b/REST_API_v2/Services/get_integration.py @@ -45,9 +45,9 @@ def get_integration(): 'Authorization': 'Token token=' + API_KEY } payload = { - 'include': INCLUDE + '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() diff --git a/REST_API_v2/Services/get_service.py b/REST_API_v2/Services/get_service.py index d0d2d5b..b992933 100755 --- a/REST_API_v2/Services/get_service.py +++ b/REST_API_v2/Services/get_service.py @@ -44,9 +44,9 @@ def get_service(): 'Authorization': 'Token token=' + API_KEY } payload = { - 'include': INCLUDE + '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() diff --git a/REST_API_v2/Services/list_services.py b/REST_API_v2/Services/list_services.py index 3c7df3e..8f111e5 100755 --- a/REST_API_v2/Services/list_services.py +++ b/REST_API_v2/Services/list_services.py @@ -45,13 +45,13 @@ def list_services(): 'Authorization': 'Token token=' + API_KEY } payload = { - 'team_ids': TEAM_IDS, + 'team_ids[]': TEAM_IDS, 'time_zone': TIME_ZONE, 'sort_by': SORT_BY, 'query': QUERY, - 'include': INCLUDE + '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() diff --git a/REST_API_v2/Teams/list_teams.py b/REST_API_v2/Teams/list_teams.py index efac085..1e1ad05 100755 --- a/REST_API_v2/Teams/list_teams.py +++ b/REST_API_v2/Teams/list_teams.py @@ -43,7 +43,7 @@ def list_teams(): payload = { 'query': QUERY } - 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() diff --git a/REST_API_v2/Users/get_user.py b/REST_API_v2/Users/get_user.py index 3a16dd5..e546756 100755 --- a/REST_API_v2/Users/get_user.py +++ b/REST_API_v2/Users/get_user.py @@ -44,9 +44,9 @@ def get_user(): 'Authorization': 'Token token=' + API_KEY } payload = { - 'include': INCLUDE + '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() diff --git a/REST_API_v2/Users/get_user_notification_rule.py b/REST_API_v2/Users/get_user_notification_rule.py index a50971f..5c3ba2a 100755 --- a/REST_API_v2/Users/get_user_notification_rule.py +++ b/REST_API_v2/Users/get_user_notification_rule.py @@ -45,9 +45,9 @@ def get_user_notification_rule(): 'Authorization': 'Token token=' + API_KEY } payload = { - 'include': INCLUDE + '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() diff --git a/REST_API_v2/Users/list_user_notification_rules.py b/REST_API_v2/Users/list_user_notification_rules.py index 2ab5a06..efb5790 100755 --- a/REST_API_v2/Users/list_user_notification_rules.py +++ b/REST_API_v2/Users/list_user_notification_rules.py @@ -44,7 +44,7 @@ def list_user_notification_rules(): 'Authorization': 'Token token=' + API_KEY } payload = { - 'include': INCLUDE + 'include[]': INCLUDE } r = requests.get(url, headers=headers, params=payload) print 'Status Code: ' + str(r.status_code) diff --git a/REST_API_v2/Users/list_users.py b/REST_API_v2/Users/list_users.py index 9fcab35..9355ec0 100755 --- a/REST_API_v2/Users/list_users.py +++ b/REST_API_v2/Users/list_users.py @@ -44,10 +44,10 @@ def list_users(): } payload = { 'query': QUERY, - 'team_ids': TEAM_IDS, - 'include': INCLUDE + 'team_ids[]': TEAM_IDS, + '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()