← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] Web API Update User Info

 

Thanx Antonia. I tried PUT earlier and it needed uploading the entire
payload.

On Feb 9, 2017 5:57 PM, "Antonia - Pro" <antonia@xxxxxxxxxxx> 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
> <https://www.linkedin.com/company/informapro>
> INFORMAPRO S.r.l. - via Luigi Rava 43,  Rome 00149 , Italy
> tel. +39 06 5758926 <+39%2006%20575%208926>, 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@xxxxxxxxx>:
>
>> 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@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>

References