Search code examples
phpapidirectus

Directus API : how to filter the results


I want to query the Directus API for changes that have happened since I last checked.
This means hitting the /activity endpoint and filtering based on the datetime param, but I can't seem to get the filter parameter to work.

I'm trying something like this (based on examples in the docs) :

curl -H "Authorization: Bearer <my_token>" "https://<my_server>/api/1.1/activity/?filter[datetime][gt]=2017-06-23T01:45:18-11:00" -g

That request succeeds, but the filter part of it has no effect.

What is the correct syntax for the filter parameter ?


Solution

  • The parameter is named filters (plural) instead of filter. The rest of the syntax is correct.