Data element details querying events

Hi all,

I’m working with the API for an extraction system of the events captured in our DHIS2 instances (v 2.22) and I was wondering if there’s any possible URL to call that brings the all bundle of events updated after some date and with some more details about each event.

Currently I use this

who-dev.essi.upc.edu:8080/api/events.json?lastUpdated=2015-02-03

And the response is an array of events with this info per each:

{lastUpdated, storedBy, created, dataElement, value, providedElseWhere}

DataElement attribute is only the id of the DE, so it’s seems to be needed another call to get the details of the DE (event I’m only interested in its form name).

Is there any possibility to avoid this second call? Thank you very much

Marc Garnica

Universitat Politècnica de Catalunya

Hi Marc

Right now, this is not possible. We have been exploring ways to expose this though, but there is nothing right now.

Usually what would happen is that you download all metadata for the program you want (/api/programs/ID and field expansion to get all you need), then use program=XXX in the event request (but maybe you are after all events, regardless of program?)

···

On Mon, Apr 4, 2016 at 3:49 PM, Marc Garnica marcgarnica13@gmail.com wrote:

Hi all,

I’m working with the API for an extraction system of the events captured in our DHIS2 instances (v 2.22) and I was wondering if there’s any possible URL to call that brings the all bundle of events updated after some date and with some more details about each event.

Currently I use this

who-dev.essi.upc.edu:8080/api/events.json?lastUpdated=2015-02-03

And the response is an array of events with this info per each:

{lastUpdated, storedBy, created, dataElement, value, providedElseWhere}

DataElement attribute is only the id of the DE, so it’s seems to be needed another call to get the details of the DE (event I’m only interested in its form name).

Is there any possibility to avoid this second call? Thank you very much

Marc Garnica

Universitat Politècnica de Catalunya


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org