kris
kris

Reputation: 12600

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 ?

Upvotes: 4

Views: 3469

Answers (2)

beac0n
beac0n

Reputation: 48

Since Directus 7, the paramteter is indeed filter and not filters

Upvotes: 3

Rijk
Rijk

Reputation: 969

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

Upvotes: 3

Related Questions