Re: [Dhis2-devs] DHIS-2 API's : Updating the attributes values of a specific org Unit

2017-11-26 Thread Morten Olav Hansen
Hi Omer Instead of doing "orgUnit": "YOUR-ID", it should just be "id": "YOUR-ID" -- Morten Olav Hansen Senior Engineer, DHIS 2 University of Oslo http://www.dhis2.org On Fri, Nov 24, 2017 at 5:31 PM, Omer Butt wrote: > Hi, > > I am using that api with json format data to update specific attr

[Dhis2-devs] DHIS-2 API's : Updating the attributes values of a specific org Unit

2017-11-24 Thread Omer Butt
Hi, I am using that api with json format data to update specific attribute of an org unit . But its create a new orgunit rather than updating the existing org unit. kindly explain or guide where i am wrong. Below is the data format in json and api that iam using. I have to update that orgunit wi

Re: [Dhis2-devs] DHIS-2 API's

2017-08-24 Thread Julhas Sujan
Hi Omer Butt, You can parse/decode this json string by using JavaScript, PHP or Java or any other languages. *You can parse by JavaScript as below: * var dhis2JSONObj, x; dhis2JSONObj = {"name":"Bannu","children":[{"id":"yvVnd97UiJN"},{"id":"cdlEAe4BMS2"}],"ancestors":[{"id":"osCztkmFYud"},{"

Re: [Dhis2-devs] DHIS-2 API's

2017-08-23 Thread Em Le Hong
Hi Omer, You can try something like this: ?fields=children[name,id],ancestors[name,id] On Thu, Aug 24, 2017 at 12:29 PM, Omer Butt wrote: > Sir I used that API : > *:/api/organisationUnits/OYfCChzZ1wx.json?fields=ancestors,children,name* > > *Response :* > {"name":"Bannu","children":[{"id":"yv

[Dhis2-devs] DHIS-2 API's

2017-08-23 Thread Omer Butt
Sir, Will there a API to get information about facilities attaced to orgunit group. Like BHU is a orgunit group. will i access the names of facilities that under BHU. Thanks. ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@l

[Dhis2-devs] DHIS-2 API's

2017-08-23 Thread Omer Butt
Sir I used that API : *:/api/organisationUnits/OYfCChzZ1wx.json?fields=ancestors,children,name* *Response :* {"name":"Bannu","children":[{"id":"yvVnd97UiJN"},{"id":"cdlEAe4BMS2"}],"ancestors":[{"id":"osCztkmFYud"},{"id":"KH8VFLnpwWL"}]} *--