Filtering contacts in API calls

Using the API call “GET /contacts/activity”

https://developer.mautic.org/#get-activity-events-for-all-contacts

To filter the result for specified contacts it seems like the call should be

get /contacts/activity?search=ids:3,4,5,6

But this doesn’t work. I also tried

get /contacts/activity?filter=ids:3,4,5,6
get /contacts/activity?ids=3,4,5,6

Can you suggest a solution?

Thank you. Iain.

More attempts:

get /contacts/activity?search=ids:1%2C2%2C3 (ids:1,2,3)
get /contacts/activity?search=ids%3A1%2C2%2C3 (ids:1,2,3)
get /contacts/activity?search=ids%3D1%2C2%2C3 (ids=1,2,3)

Here are some more attempts (urlEncode does what you think it does):

“/api/contacts/activity” +
“?where” +urlEncode( “[0][col]” ) + “=id” +
&where" + urlEncode( “[0][expr]” ) + “=in” +
“&where” + urlEncode( “[0][val]” ) + “=3,4,161435”
“/api/contacts/activity” +
“?where” +urlEncode( “[0][col]” ) + “=ids” +
&where" + urlEncode( “[0][expr]” ) + “=in” +
“&where” + urlEncode( “[0][val]” ) + “=3,4,161435”
“/api/contacts/activity?ids:3,161435”
“/api/contacts/activity?search=” + urlEncode(“ids:3,161435”)

Still no luck. Giving up.

In case you have not seen this. I am successfully searching by API using these syntaxes.

Your reply is much appreciated. It can get lonely in here. Thank you.

I used that page a few days ago to construct a successful URL for a search of contacts like this:

“/api/contacts” +
“?where” + IUtils.urlEncode( “[0][col]” ) + “=lastActive” +
“&where” + IUtils.urlEncode( “[0][expr]” ) + “=gt” +
“&where” + IUtils.urlEncode( “[0][val]” ) + “=” + fromtimestamp

But this form of URL doesn’t appear to work with /api/contacts/activity.

It says to use “filters[search]” with this endpoint … anyone know what that implies for the URL?