[API] /api/users/lookup

Hello Dear grafana community,

I am trying to get a specific user using curl and I’m always getting the following answer from grafana server {“message”:“Failed to get user”}.
Is it normal ?
For the reference, I am using grafana version 4.1.2 and the request I make is as shown bellow:
curl http://admin:mypassword@mygrafanaserver.com/api/users/lookup?loginOrEmail=admin.

Thanks in advance for you help

Hi aime,
Try upgrading your Grafana to the latest version. There have been some recent changes to the users API including lookup/search. If you still have problems, let us know.

That works for me on the latest master. There have been some changes to the API but no breaking changes. Does it work in the browser if you login in as admin and then try: http://mygrafanaserver.com/api/users/lookup?loginOrEmail=admin?

Just a sanity check, I had to quote the curl argument to get it to work:

curl "http://admin:admin@localhost:3000/api/users/lookup?loginOrEmail=admin"