Re: [Dhis2-devs] User password reset through API

2018-04-03 Thread Hendrik de Graaf
Hi Muhammad, Make sure you include the `userCredentials.id` field in your PUT request too. That should be enough for updating a user. However, when you want to set fields for a new user (POST request), you must make sure to also to create a `userCredentials.userInfo.id` field. You can use the

Re: [Dhis2-devs] User password reset through API

2018-04-01 Thread Melaeke Serawit
Hello, In that case from your error it seems that the user doesn't exist. First make sure that the Id you use in the api end point is correct and the user actually exists. (server/api/26/users/*userID). * But for updating the password part, the following json actually works on the demo server.

Re: [Dhis2-devs] User password reset through API

2018-04-01 Thread Melaeke Serawit
Hello, What kind of payload are you trying to send to the Server remember that the password and the username are under userCredentials and not directly under the user. so the payload should be like : { "userCredenttials":{ "id": "userCredentialsID_of_the_user_(Separate from the userID)",

[Dhis2-devs] User password reset through API

2018-03-31 Thread Hannan Khan
Hello Experts Hope you are all enjoying Easter. I am trying to reset/update password through API. Is it possible to send PUT request with jason payload with only ID, username and password? I use curl -X PUT -u user:pass -d @u.json -H "Content-Type: application/json"