Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions REST_API_v2/AddOns/list_installed_addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions REST_API_v2/EscalationPolicies/get_escalation_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
8 changes: 4 additions & 4 deletions REST_API_v2/EscalationPolicies/list_escalation_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions REST_API_v2/Incidents/list_incident_log_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions REST_API_v2/LogEntries/get_log_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions REST_API_v2/LogEntries/list_log_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions REST_API_v2/MaintenanceWindows/get_maintenance_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
8 changes: 4 additions & 4 deletions REST_API_v2/MaintenanceWindows/list_maintenance_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions REST_API_v2/Notifications/list_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
10 changes: 5 additions & 5 deletions REST_API_v2/OnCalls/list_oncalls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion REST_API_v2/Schedules/list_schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions REST_API_v2/Services/get_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions REST_API_v2/Services/get_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
6 changes: 3 additions & 3 deletions REST_API_v2/Services/list_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion REST_API_v2/Teams/list_teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions REST_API_v2/Users/get_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions REST_API_v2/Users/get_user_notification_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion REST_API_v2/Users/list_user_notification_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions REST_API_v2/Users/list_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down