Dear Gareth,
For filtering records, I am using get and lte methods.
The filter listed below should work which I use in some python scripts. The error is invalid JSON, so there may be a comma missing in your json string before "sorts".
I hope that helps.
Kind Regards
{
'filters': [{
'conditions': [
{
'field_name': 'create_date',
'method': 'gte',
'value': 1627779600000
},
{
'field_name': 'create_date',
'method': 'lte',
'value': 1630454399000
},
{
'field_name': 'name',
'method': 'not_contains',
'value': "Unwanted String"
}
],
}],
"sorts": [{
"field_name": "create_date",
"type": "desc"
}]
}
------------------------------
Aydin Kucukkarakas
------------------------------
Original Message:
Sent: Fri September 10, 2021 09:11 AM
From: Gareth Pearson
Subject: API filters not working
Hi All,
Currently trying to pull the active incidents, between two dates, using the '/incidents/query' API. However, I cannot get it working...
I filtered using the GUI's incident view and copied the JSON from the network tab and that didn't work either. I've posted a screenshot of the filters and the error below. Can anyone spot what the issue is?
Thanks,
Gareth
------------------------------
Thanks,
Gareth
------------------------------