cannot update event date through the API on DHIS2 v2.24

Hi,

We are trying to update events through the api on a dhis2 v2.24 using something like:

curl -X POST -d @play24.jsonhttps://play.dhis2.org/release2/api/events” -H “Content-Type:application/json” -u admin:district -v

with play24.json :

{“events”:[{“programStage”:“dBwrot7S420”,“orgUnit”:“DiszpKrYNg8”,“program”:“lxAQ7Zs9VYR”,“href”:“https://play.dhis2.org/release2/api/events/A7vnB73x5Xw”,“event”:“A7vnB73x5Xw”,“status”:“ACTIVE”,“eventDate”:“2016-07-01T00:00:00.000”,“orgUnitName”:“Ngelehun CHC”,“attributeCategoryOptions”:“as6ygGvUGNg”,“created”:“2016-04-12T16:05:16.957”,“lastUpdated”:“2016-04-12T16:05:16.957”,“coordinate”:{“latitude”:0.0,“longitude”:0.0},“dataValues”:[{“lastUpdated”:“2016-04-12T16:05:16.974”,“storedBy”:“admin”,“created”:“2016-04-12T16:05:16.974”,“dataElement”:“sWoqcoByYmD”,“value”:“true”,“providedElsewhere”:false},{“lastUpdated”:“2016-04-12T16:05:17.012”,“storedBy”:“admin”,“created”:“2016-04-12T16:05:17.012”,“dataElement”:“vANAXwtLwcT”,“value”:“12”,“providedElsewhere”:false}],“notes”:[]}]}

dataValues are properly updated but the ‘eventDate’ remains unchanged…

Doing the same with the latest Dhis2 version (v2.27) works well, the event date is properly updated.

Any idea why it is not working with v2.24 ?

Any idea how to change an EventDate through the API with v2.24 for a batch of events ?

Many thanks,

···

Stéphane Delbeke

t: +32 2 319 47 99

www.bluesquarehub.com

Hi Stephane,

The eventDate should be 2016-07-01

Dates are of the format yyyy-MM-dd

Alex

···

On Wednesday, September 20, 2017, Stéphane Delbeke sdelbeke@bluesquarehub.com wrote:

Hi,

We are trying to update events through the api on a dhis2 v2.24 using something like:

curl -X POST -d @play24.jsonhttps://play.dhis2.org/release2/api/events” -H “Content-Type:application/json” -u admin:district -v

with play24.json :

{“events”:[{“programStage”:“dBwrot7S420”,“orgUnit”:“DiszpKrYNg8”,“program”:“lxAQ7Zs9VYR”,“href”:“https://play.dhis2.org/release2/api/events/A7vnB73x5Xw”,“event”:“A7vnB73x5Xw”,“status”:“ACTIVE”,“eventDate”:“2016-07-01T00:00:00.000”,“orgUnitName”:“Ngelehun CHC”,“attributeCategoryOptions”:“as6ygGvUGNg”,“created”:“2016-04-12T16:05:16.957”,“lastUpdated”:“2016-04-12T16:05:16.957”,“coordinate”:{“latitude”:0.0,“longitude”:0.0},“dataValues”:[{“lastUpdated”:“2016-04-12T16:05:16.974”,“storedBy”:“admin”,“created”:“2016-04-12T16:05:16.974”,“dataElement”:“sWoqcoByYmD”,“value”:“true”,“providedElsewhere”:false},{“lastUpdated”:“2016-04-12T16:05:17.012”,“storedBy”:“admin”,“created”:“2016-04-12T16:05:17.012”,“dataElement”:“vANAXwtLwcT”,“value”:“12”,“providedElsewhere”:false}],“notes”:}]}

dataValues are properly updated but the ‘eventDate’ remains unchanged…

Doing the same with the latest Dhis2 version (v2.27) works well, the event date is properly updated.

Any idea why it is not working with v2.24 ?

Any idea how to change an EventDate through the API with v2.24 for a batch of events ?

Many thanks,


Stéphane Delbeke

t: +32 2 319 47 99

www.bluesquarehub.com


Alex Tumwesigye

Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET | HISP Uganda

Kampala

Uganda
+256 774149 775, + 256 759 800161

Skype ID: talexie

IT Consultant (Servers, Networks and Security, Health Information Systems - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant

"I don’t want to be anything other than what I have been - one tree hill "