Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save iamabhishek-dubey/b1b184e3e8edb0f9595c33ca3fbc90af to your computer and use it in GitHub Desktop.
Save iamabhishek-dubey/b1b184e3e8edb0f9595c33ca3fbc90af to your computer and use it in GitHub Desktop.
This commands will help you to create user and organisation in Grafana with HTTP API

User Creation in Grafana with HTTP Api

curl -XPOST -H "Content-Type: application/json" -d '{
  "name":"User",
  "email":"user@graf.com",
  "login":"user",
  "password":"userpassword"
}' http://admin:admin@localhost:3000/api/admin/users

Organisation Creation in Grafana with HTTP Api

curl -v --user admin:admin -X POST -H "Content-Type: application/json"  --data '{ "Name":"Sandy Org" }' localhost:3000/api/orgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment