I am attempting to use service id as parameter to obtain only incidents liked to a particular service. When using params={'service_ids[]':service_id,'since': since, 'until': until}) python returns ValueError, not sure what the problem is. Any ideas or assistance would be welcome, not sure if this is a code bug or if I am not using the parameters correctly.
Here the code snippet
from pdpyras import APISession
api_token = '###API TOKEN###'
session = APISession(api_token)
since = "2023-05-01"
until = "2023-05-03"
params = {'since': since,'until': until}
services = session.list_all('services', params={
'query': 'X1'
})
for service in services:
#print('Service Name:',service['name'], 'Service ID:',service['incidents'])
if service['status']=='active':
#print('SERVICE INFO:',service)
service_id = ['']
print('service_id', service['id'])
if service['id'] == "PYIV5OL":
incidents = session.list_all('incidents', params={'service_ids[]':service_id,'since': since, 'until': until})
print('INCIDENTS INFO:', incidents)
I am attempting to use service id as parameter to obtain only incidents liked to a particular service. When using params={'service_ids[]':service_id,'since': since, 'until': until}) python returns ValueError, not sure what the problem is. Any ideas or assistance would be welcome, not sure if this is a code bug or if I am not using the parameters correctly.
Here the code snippet