Skip to content

Commit 2b12e48

Browse files
authored
Merge pull request #75 from patsevanton/patch-1
add Create user to README.md
2 parents a86bdbe + c8f1626 commit 2b12e48

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ from grafana_api.grafana_face import GrafanaFace
2525

2626
grafana_api = GrafanaFace(auth='abcde....', host='api.my-grafana-host.com')
2727

28+
# Create user
29+
user = grafana_api.admin.create_user({"name": "User", "email": "[email protected]", "login": "user", "password": "userpassword", "OrgId": 1})
30+
31+
# Change user password
32+
user = grafana_api.admin.change_user_password(2, "464tw4eyw4y4yw")
33+
2834
# Search dashboards based on tag
2935
grafana_api.search.search_dashboards(tag='applications')
3036

0 commit comments

Comments
 (0)