← Back to team overview

dhis2-devs team mailing list archive

Re: API - event coordinates not getting saved

 

You need to set the program stage 'Capture coordinates'. Also be aware that
you can only set coordinates with the post, they will not update via the
API.

Pierre

[image: image.png]


On Mon, Jun 12, 2017 at 4:40 PM Markus Bekken <markus@xxxxxxxxx> wrote:

> Dear Harsh,
> can you reproduce in play? Trying to reproduce through the event capture
> app, the only difference I see between the two payloads is the number of
> decimals in the coordinate captured. The apps uses only 6 decimals:
> "coordinate":{"latitude":9.394871,"longitude":-11.487579}
>
> Markus
>
> 12. jun. 2017 kl. 14.53 skrev Harsh Atal <harsh.atal@xxxxxxxxx>:
>
> Hi
>
> I am making events through API which include coordinates. But when posting
> the event everything gets saved except coordinates.
>
> URL : http://localhost:8090/dhis/api/events/
> Pay Load :
>
> {
> "coordinate": {"latitude": 13.1707428419558, "longitude":
> 79.6169626173919},
>
> "event": "O02d839dd7c",
> "eventDate": "2017-04-05T16:20:00.360+05:30",
> "orgUnit": "ZFMOv30Ab8b",
> "program": "Ml0ZNj9APN0",
> "programStage": "iWcQ5lxmsy4",
> "status": "COMPLETED"
> }
>
> Import summary is all OK and rest of the data is saved.
>
> Version:2.25Build revision:f20cd15Build date:2017-06-12 17:23
> Same happens in 26 and 27 also.
>
> Regards
> harsh
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
-- 
Pierre Dane
Director of Technology
Jembi Health Systems NPC

PNG image


References