antonia
(Antonia Bezenchek)
9 February 2017 12:26
1
Hi Pamod,
Yes, you can do it with the PATCH.
For example to change only the surname and firstName of the
Username: konan ; on the the Demo server
https://play.dhis2.org/demo/api/26/users/I9fMsY4pRKk
Username: konan ; Fullname: Didier, Konan
you can do
curl -k -X PATCH -d @user_konan1.json “https://play.dhis2.org/demo/api/26/users/I9fMsY4pRKk ” -H “Content-Type: application/json” -u admin:district
the file user_konan1.json has to contain only:
{ “surname”: “Mona”, “firstName”: “Lisa” }
Regards,
antonia
···
2017-02-09 10:04 GMT+01:00 Pamod Amarakoon pamodm@gmail.com :
Hi,
Is it possible to update only first name and last name of the user without including other info such as assigned org unit in json payload using web API.
Thank you
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp
www.informa.pro - *Seguici su *LinkedIn
INFORMAPRO S.r.l. - via Luigi Rava 43, Rome 00149 , Italy
tel. +39 06 5758926, fax +39 06 62207168, P.IVA IT08095781004
Skype: informa_antonia.bezenchek
Eng. Antonia Bezenchek - CIO - ICT Engineer
Pamod
(Pamod Amarakoon)
9 February 2017 12:29
2
Thanx Antonia. I tried PUT earlier and it needed uploading the entire payload.
···
On Feb 9, 2017 5:57 PM, “Antonia - Pro” antonia@informa.pro wrote:
Hi Pamod,
Yes, you can do it with the PATCH.
For example to change only the surname and firstName of the
Username: konan ; on the the Demo server
https://play.dhis2.org/demo/api/26/users/I9fMsY4pRKk
Username: konan ; Fullname: Didier, Konan
you can do
curl -k -X PATCH -d @user_konan1.json “https://play.dhis2.org/demo/api/26/users/I9fMsY4pRKk ” -H “Content-Type: application/json” -u admin:district
the file user_konan1.json has to contain only:
{ “surname”: “Mona”, “firstName”: “Lisa” }
Regards,
antonia
www.informa.pro - *Seguici su *LinkedIn
INFORMAPRO S.r.l. - via Luigi Rava 43, Rome 00149 , Italy
tel. +39 06 5758926, fax +39 06 62207168, P.IVA IT08095781004
Skype: informa_antonia.bezenchek
Eng. Antonia Bezenchek - CIO - ICT Engineer
2017-02-09 10:04 GMT+01:00 Pamod Amarakoon pamodm@gmail.com :
Hi,
Is it possible to update only first name and last name of the user without including other info such as assigned org unit in json payload using web API.
Thank you
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp
Hi Antonia and DHIS2 community.
Does PATCH request also work for user organisation units? I Tried but doesn’t seem to work that much
Payload used: {“organisationUnits”: [{“id”: “N5yfN0cakpl”}, {“id”: “SFzGL5BkI1i”}]} (orgunit uid from another instance).