dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #06341
Issue with events import via Web API with json format
Dear Dev Team,
I am trying to import events using the Web API (via curl).
However, this is the response I get.
* Connection #0 to host localhost left intact
{"imported":0,"updated":0,"ignored":0,"importSummaries":[{"status":"ERROR","description":"There
is no program instance for program
y9LMXyKYXSI","dataValueCount":{"imported":0,"updated":0,"ignored":0,"deleted":0},"importCount":{"imported":0,"updated":0,"ignored":0,"deleted":0}}]}Done
Here is the structure of my json. It is a single event with no registration
created in 2.16. (tried with programStage too but still failed)
{"program":"y9LMXyKYXSI","storedBy":"System","orgUnit":"o5Gxx8zOilJ","eventDate":"2015-02-16","status":"ACTIVE","dataValues":[{"dataElement":"AV9WEhlUhX3","value":"0"},{"dataElement":"Ut0gvAjKAVN","value":"1900-01-01"},{"dataElement":"J3eoixEr9qu","value":"2015-02-16"},{"dataElement":"b3pUScaaxK9","value":"Byumba
DH"},{"dataElement":"KrZZcRgZFZ3","value":"Rabies"},{"dataElement":"QeU5nY1HhXz","value":"2015W713022210"},{"dataElement":"s9HlcTDBHQw","value":"Probable"},{"dataElement":"Gqprct6P5as","value":"1
Cases
Threshold"},{"dataElement":"DwUPWwOebPX","value":"0"},{"dataElement":"qa2bWueSi3x","value":"System"},{"dataElement":"KHCEtIgAK4z","value":"2"}]}
I am using ver 2.17 build 17754
--
Alex Tumwesigye
Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET
Kampala
Uganda
IT Consultant - BarefootPower Uganda Ltd, SmartSolar, Kenya
IT Specialist (Servers, Networks and Security, Health Information Systems -
DHIS2 ) & Solar Consultant
+256 774149 775, + 256 759 800161
"I don't want to be anything other than what I have been - one tree hill "
Follow ups