Filter API by lastupdated

Hello everyone,

How to use the lastUpated field as a filter in the api ? For example

/api/dataElements.json?fields=*&filter=lastUpdated:eq:'2024-05-05'

Use without apostrophes

2 Likes

Thank @Ulanbek , it works like a charm.

I’d be surprised if that worked exactly; lastUpdated I’ve always seen with Date & Time (2024-05-05T19:25:39.272 for example), so you’re best suited doing things like :lt: and :gt: instead of :eq:

—In addition to Ulanbek correctly pointing out removing the apostrophes!

1 Like

Yes, you are right I use it as the following, to get updated objects on January 1st

filter=lastUpdated:gt:2024-01-01&filter=lastUpdated:lt:2024-01-02
2 Likes