Get User Information via API Call

  • What Grafana version and what operating system are you using?
    Centos 7 & version 5.4

  • What are you trying to achieve?
    I am trying to get a list of users with their last login time via the grafana api.

  • How are you trying to achieve it?
    I tried a curl curl "http://admin:admin@127.0.0.1:3000/api/api/users?perpage=10&page=1"

  • What happened?

I got the error: {“message”:“Not found”}

  • What did you expect to happen?

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

t=2021-06-03T10:03:31+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/api/users status=404 remote_addr=127.0.0.1 time_ms=65 size=23 referer=

http://admin:admin@127.0.0.1:3000/api/api/users?perpage=10&page=1

You have two "api"s there.

Antony.

1 Like

We call it a Pebcak.

Thank you so much for your assistance :slight_smile: