Advertisement
Guest User

Untitled

a guest
Apr 9th, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. Create new user:
  2. curl -XPOST -H "Content-Type: application/json" -d '{
  3. "name":"User",
  4. "email":"user@graf.com",
  5. "login":"user",
  6. "password":"userpassword"
  7. }' http://admin:admin@localhost:3000/api/admin/users
  8.  
  9. Change password:
  10. PUT /api/admin/users/:id/password
  11. PUT /api/admin/users/2/password HTTP/1.1
  12. Accept: application/json
  13. Content-Type: application/json
  14.  
  15. {"password":"userpassword"}
  16. ---------------------------------------------------------------
  17. Change password for "user" which has :id = 2 :
  18. curl -XPUT -H "Content-Type: application/json" -d '{
  19. "password":"newpassword"
  20. }' http://admin:admin@localhost:3000/api/admin/users/2/password
  21.  
  22. Permissions
  23. curl -XPUT -H "Content-Type: application/json" -d '{
  24. "isGrafanaAdmin": true
  25. }' http://admin:admin@localhost:3000/api/admin/users/2/permissions
  26.  
  27. Delete global User
  28. curl -XDELETE -H "Content-Type: application/json" http://admin:admin@localhost:3000/api/admin/users/2
  29.  
  30. Map all users
  31. curl -XGET -H "Content-Type: application/json" http://admin:admin@localhost:3000/api/users?perpage=10&page=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement