dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #51618
Re: User PUT issue
Looks like I might have been providing too much of the model info
(lastsaveddate and such). Would be great if the docs listed the bare
minimum properties.
*Gregory Wilson*
On Tue, Aug 14, 2018 at 5:37 AM Dusabe Eric <duserik@xxxxxxxxx> wrote:
> Hi Greg,
>
>
>
> To avoid such errors, you only need to update the username from the
> original file you used while POSTing, it should work.
>
>
>
> Regards
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>
> *From: *Greg Wilson <gwilson@xxxxxxxxxxxxxx>
> *Sent: *14 August 2018 11:16
> *To: *DHIS 2 developers <dhis2-devs@xxxxxxxxxxxxxxxxxxx>
> *Subject: *[Dhis2-devs] User PUT issue
>
>
>
> Can someone tell me what I am doing wrong here? According to the docs (
> https://docs.dhis2.org/2.29/en/developer/html/dhis2_developer_manual_full.html#webapi_users_create_update)
> this should work to update a user's account:
>
> curl -X PUT -u "admin:district" -d @u.json -H "Content-Type:
> application/json" https://play.dhis2.org/2.26/api/26/users/DXyJmlo9rge
>
> In this case I am using {"firstName":"ATEST"} as the u.json file.
> Unfortunately I keep receiving errors such as:
>
> "Missing required property `surname`."
>
> If I send a more complete user object it complains that I am missing the
> userCredentials.username property. When I add that, it complains that user
> already exists.
>
>
>
> *Gregory Wilson*
>
>
>
References