Solved

Front Events API "after" filtering issue

  • 13 January 2023
  • 1 reply
  • 12 views

Badge +2

We've been running into an issue implementing the event sync from Front. While the webhook is working correctly, the alternative sync we wrote using the Events API seems not to respect the after filter in queries. When we make a request to e.g. https://companyDomain.api.frontapp.com/events?q=after:1652647350.45151, rather than getting only very recent events (that was basically the current UTC timestamp when I made the request) we get a paginated response with hundreds of thousands of results.

 

Is this a bug on the Front end, or is there a different syntax we should use to query events after a certain time?

icon

Best answer by Support Engineering 13 January 2023, 16:41

View original

1 reply

Badge +5

The query format you're using is slightly incorrect.

 

What you should be submitting is the following:

 

curl 'https://companyDomain.api.frontapp.com/events?q\[after\]=1652647350'

 

Note, if you'd also like to filter for before+after timestamps, and include event types, something like the following will work for you:

 

curl 'https://companyDomain.api.frontapp.com/events?q\[types\]=assign&q\[types\]=unassign&q\[before\]=1649574000&q\[after\]=1648796400'

 

I hope this is helpful - Please let me know if you have any further questions

 

--Jason

Reply