I have the following curl command which I can use to retrieve a list of users from a specific group in PagerDuty:
curl -H "Accept: application/vnd.pagerduty+json;version=2" -H "Authorization: Token token=xxx" -X GET --data-urlencode "team_ids[]=abc" 'https://api.pagerduty.com/users'
How can I translate this exact command to run in a python get.requests() command? I can't seem to get it to work. This is what I'm currently trying but it doesn't filter on the group:
response = requests.get(
'https://api.pagerduty.com/users', params = {"data-urlencode": "team_ids[]=abc"}, headers={'Accept': 'application/vnd.pagerduty+json;version=2','Authorization': 'Token token=xxx'}
)
)
Thanks!