DHIS-2 API: Partial Update of organisation objects (extra attributes)

Hi,

Dhis-2 Developer Guide:

I have to use partial update Api to update the organisation unit attributes .But could not get it. Can you please make sample for orgunit attribute update using api.

below is the api for Partial Update .

The format for updating a single property is the same as when you are updating a complete object, just with only 1 property in the JSON/XML file, i.e.:

curl -X PATCH -d "{\"name\": \"New Name\"}" -H "Content-Type: application/json" -u admin:district [https://play.dhis2.org/dev/api/26/dataElements/fbfJHSPpUQD/name](https://play.dhis2.org/dev/api/26/dataElements/fbfJHSPpUQD/name)


Virus-free. www.avast.com

Hi

That syntax does not work anymore, please try without the /name part at the end

···

On Fri, Nov 24, 2017 at 7:19 PM, Omer Butt omerbutt2521@gmail.com wrote:

Hi,

Dhis-2 Developer Guide:

I have to use partial update Api to update the organisation unit attributes .But could not get it. Can you please make sample for orgunit attribute update using api.

below is the api for Partial Update .

The format for updating a single property is the same as when you are updating a complete object, just with only 1 property in the JSON/XML file, i.e.:

curl -X PATCH -d "{\"name\": \"New Name\"}" -H "Content-Type: application/json" -u admin:district [https://play.dhis2.org/dev/api/26/dataElements/fbfJHSPpUQD/name](https://play.dhis2.org/dev/api/26/dataElements/fbfJHSPpUQD/name)


Virus-free. www.avast.com


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

1 Like