PagerDuty/pdpyras

Filtering incidents using `iter_all` by `service_ids` does not work

DeepSpace2 opened this issue · 2 comments

iter_all('incidents', params={'service_ids': [service_id]})

fails with 400 with the error

'{"error":{"message":"Invalid Input Provided","code":2001,"errors":["Service ids must be a Array."]}}'

API V2 and pdpyras 4.3.0

Ok, got it to work by passing params={'service_ids[]': [service_id]} which is a bit weird. Can it be fixed?

It is required for set filters to add square brackets to the parameter name. Confusion over this came up once before and I thought it might be convenient to add them if the user forgets, but after a while with no new demand for it I closed the issue (#38). I've reopened it and will add this feature in a future update.