← Back to team overview

dhis2-devs team mailing list archive

Re: Changing OrgUnit of Tracked Entity Instance with WebAPI

 

Hi Simen

This is not actually supported. Let me see if I can get it in for 2.18
release.
On Tue Jan 20 2015 at 1:55:14 PM Simen Skogly Russnes <
simen_russnes@xxxxxxxxxxx> wrote:

> Hi devs,
>
> I'm trying to move Tracked Entity Instances using the WebAPI by updating a
> Tracked Entity Instance (/api/trackedEntityInstances/<id>),  but with no
> luck. I get it working with adding relationships, but not with changing the
> orgUnit. I get a success and updated: 1 in the response, but in the server
> nothing changes. I'm using DHIS 2.16.
>
> example request:
> {"attributes":[{"value":"Brad","displayName":"First
> name","attribute":"eRsJABP4maZ"},{"value":"Male","displayName":"Sex","attribute":"g8nMl2nGMjo"},{"value":"Pitt","displayName":"Surname","attribute":"imKbcSFoXYW"},{"value":"1971-07-27","displayName":"Date
> of
> birth","attribute":"jLQqopd8JQt"}],"trackedEntityInstance":"gD23tKptvsp","orgUnit":"KgKiMe4EZq3","trackedEntity":"OruGrTv39Fd","relationships":[]}
>
> The response:
>
> {"status":"SUCCESS","importCount":{"imported":0,"updated":1,"ignored":0,"deleted":0},"reference":"gD23tKptvsp"}
>
> Is there something I might be doing wrong that I'm not getting?
>
> Thanks,
> Simen
>  _______________________________________________
> 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
>

References