← Back to team overview

dhis2-devs team mailing list archive

Exporting Persons and Programs

 

Hi Guys
I hope you are well.

As you probably know already, we are in the process of moving the data and programs of a few countries that have been working on the development server of PSI to the production server (v. 2.13), this task requires being able to export both persons with the corresponding enrollments to programs and multiple events/stages.

I tried to export events using the API and the systems always returns an empty response. Here's an example of the request I'm using:

curl "http://localhost:8080/dhis/api/events?orgUnit=YypjoDjI7Zg&includeChildren=true&startDate=2013-10-01&endDate=2013-12-31&programStage=wxloTxBJMlq"; -H "Content-Type:application/xml" -u [usr]:[pass] -v

No data is returned by the system and I also noticed that even though xml is specified, the empty response is in json { }

What is your recommendation to export and import persons and program enrollments?
By the way I see I can query the API for persons in one org Unit, that could take a while, it would be great if we could use "includeChildren".

curl "http://localhost:8080/dhis/api/persons?orgUnit=YypjoDjI7Zg&includeChildren=true"; -H "Content-Type:application/xml" -u [usr]:[pass] -v

The same as with events, api/persons returns the answer in json

Best regards,
JM

Follow ups