Dear community,
Has we possible view data in event report / Web API has TEI relationship?
thanks
channara
Dear community,
Has we possible view data in event report / Web API has TEI relationship?
thanks
channara
May be you already tried /api/relationships?tei=XXXXX
?
Hi @jthomas,
I didn’t try on API yet,
let me test it…
thank you
Hi @jthomas;
what does XXXXX correspond to in this API?
I would like to be able to view all children related to a mother on a mother - child relationship for my tracker.
Thanks
@jthomas actually means the tracked entity instance. For example, in the play instance we now have a TEI with an ID of Zm3qS1tFAb0 and so if I want to use the API to view the relationships for that TEI I would use: https://play.dhis2.org/2.36.3/api/relationships?tei=Zm3qS1tFAb0 but of course instead of using the TEI we could use either event or enrollment.
I am able to find the TEI id for a specific org unit using this API (after finding the org unit API from the maintenance app) For example on play now we have this org unit which has relationships https://play.dhis2.org/2.36.3/api/33/trackedEntityInstances.json?ou=DiszpKrYNg8
I am defiantly not the expert here, but I hope that this will give you a head start and maybe someone else from the community will share with you a more detailed request URL. For sure, you can also use the documentation which explains how to use filters…etc
Good luck! Please let us know what results you come up with and if you face any issue! Thanks!