User delete with API

Hello Guys!

We tried to delete a user from Grafana 7.3.4 with API.

We tried this API command:

`curl -u myadmin:mypasswd <mywebsite>/api/users?query="delthis"`


`curl -u myadmin:mypasswd -X DELETE <mywebsite>/api/admin/users/:39`

`{"message":"User deleted"}`

We see, the delete command send me “user deleted” status, but the user will not be deleted. We checked her(API) and on the UI too.

Do we some failure? Please help us!

Thanks, Barnabás


Your delete request should include the id (39). Please use as follow :

Reference :

Hope it helps.

Good Luck

I edited my topics. Sorry, the display was corrupted. We used this command:

curl -u myadmin:mypasswd -X DELETE mywebsite/api/admin/users/:39


Did you try on a newer version ?

Good Luck

No, we use this 7.3.4 version. We only plan an upgrade. You have a new version, and works this command fine?


Indeed the command shouldn’t be saying user deleted :

The correct syntax is (without the : )

Before :

After :

Good Luck

1 Like

Big Thanks, we use :39 This was the problem… Without : is working fine. :slight_smile:

1 Like