Which event field does the API use for 'startDate' and 'endDate'?

What field does the API evaluate when using the ‘startDate’/‘endDate’ (occurredBefore/occurredAfter) when specifying the period?

There are a few options and I need a definitive answer, but the docs don’t specify. I’ve always just assumed the eventDate

eventDate
dueDate
created
completedDate

I know I’ve used lastUpdatedStartDate and createdStartDate, and always assumed as well that startDate was the event date, but also welcome confirmation here!

Yes I think @chase.freeman and @Matthew_Boddie if the endpoint is an events endpoint then it will count the startData and endDate as eventDate, but I think it is different for other endpoints such as the enrollment endpoint.

Thanks!

1 Like

Indeed - that makes logical sense. Thanks @Gassim

1 Like

BTW, endDate functionality has changed after 2.37 and excludes the date entered. I.e. endDate of 2024-07-22 will now exclude July 22, and bring any/all events prior. [DHIS2-17656] - Jira welcome all votes for this one!

1 Like