API End Point for Events Data

Can you please help me with API End point for Tracker Program → Program Stage-> Events → Events Data

I need to fetch all the events data (Tracker Program → Program Stage-> Events) for specific TEI and Org Unit.

Thanks,
Hiral

Hi @ramavat you should be able to use something like:

(https://play.im.dhis2.org/stable-2-40-6/api/events?trackedEntityInstance=iRN2cSEuBKo)

You can also certainly use parameters of orgUnit=XXX&ouMode=DESCENDANTS, and/or programStage=XXX in addition.

1 Like

Thanks. I was able to address this using the data query.

1 Like

Thanks @Matthew_Boddie !

@ramavat , could you tell more about your solution using the Data Query? Thanks!

Actually, we wanted to fetch one tracker prog. event details into another program.

So we have developed capture plugin, to display those kind of one prog. data as a summary in other program.

Now, when developing the capture plugin, we have used useDataQuery to fetch the data of particualr program.

Referred to this document:
Fetching data with useDataQuery | DHIS2 Developer Portal

It’s very helpful. Always appreciate any feedback from community.

Thanks,
Hiral

1 Like

Amazing! Thank you for sharing!! :slight_smile: