Update OrgUnit Attributes via WebAPI

Hi All

Could some please confirm the endpoint to use to update an orgUnit attribute value {orgUnit.attributeValues} in 2.20. A pointer to the documentation if available or a quick example would be highly appreciated.

Regards

Farai Mutero

Are you updating one single org unit? then you would use the /api/organisationUnits/ID endpoint (by sending a PUT with the full payload)

I don’t have an example on hand for 2.20 (as the payload have changed a bit), but what I would do is to create a new org unit in your system (or just update an existing one with the appropriate attribute values), then go to /api/organisationUnits/ID.json and you will see a full example of a payload (adding ?fields=:owner might help also)

···

On Thu, Jan 19, 2017 at 11:40 PM, Farai Mutero fmutero@gmail.com wrote:

Hi All

Could some please confirm the endpoint to use to update an orgUnit attribute value {orgUnit.attributeValues} in 2.20. A pointer to the documentation if available or a quick example would be highly appreciated.

Regards

Farai Mutero


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org