Solved

Issue with List Events API

  • 16 January 2023
  • 2 replies
  • 45 views

Badge +2

We are currently in the process of building an integration with FrontFor our use case, we found the `List Events` API here, to be suitable. We want to only list archive events in a certain time window, and for that, we have tried using the `q` parameter, as mentioned in the document, but it doesn't seem to work, the response always contains all the events, irrespective of the query we use. 
Attaching a few curls we have tried
 

curl --request GET      --url 'https://api2.frontapp.com/events?q=types%3Aarchive'      --header 'Accept: application/json'      --header 'Authorization: Bearer TOKEN'
curl --request GET      --url 'https://api2.frontapp.com/events?q=after%3A1651470943.000'      --header 'Accept: application/json'      --header 'Authorization: Bearer TOKEN'

 

Combining the before and after parameters would also be helpful.


Looking forward to your help on this.

icon

Best answer by Support Engineering 16 January 2023, 17:12

View original

2 replies

Userlevel 1
Badge +5

If you're issuing a curl request, you should specify the values of the "types" array like this:

 

curl 'https://api2.frontapp.com/events?q\[types\]=archive' ...

 

You can specify multiple types as follows:

 

curl 'https://api2.frontapp.com/events?q\[types\]=archive&q\[types\]=assign' ...

 

The before/after params are added in the same way:

 

curl 'https://api2.frontapp.com/events?q\[types\]=archive&q\[before\]=1649574000&q\[after\]=1649487600'

 

Hope that helps!

 

--Jason

Badge +2

This is super helpful, thanks for the prompt reply.

Reply