I'd like to call WP REST API to update a user. I have only username, so I suppose I should retrieve user ID first of all, as the endpoint for updating a user is:
How to retrieve the ID with username (that is unique as well)?
but it's not working.
I also tried:
and it works, but I'm not sure it would not return duplicates.
The best would be update directly the user with a single call, with the username as key, but if this is not possible, I would like to be sure 100% the retrieved ID is the one of the unique username I provided.