Skip to main content
Solved

Issue with List Events API

  • January 16, 2023
  • 2 replies
  • 100 views

Front Developer
Forum|alt.badge.img+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.

Best answer by Support Engineering

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

2 replies

Forum|alt.badge.img+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


Front Developer
Forum|alt.badge.img+2

This is super helpful, thanks for the prompt reply.