File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,23 @@ pip install --upgrade 'grafana-import[builder]'
36
36
The command outlined above describes a full installation of ` grafana-import ` ,
37
37
including support for dashboard builders, aka. dashboard-as-code.
38
38
39
+ ## Synopsis
40
+
41
+ ### Command-line use
42
+ ``` shell
43
+ grafana-import import -u http://admin:admin@localhost:3000 -i grafana_dashboard.json --overwrite
44
+ ```
45
+
46
+ ### API use
47
+ ``` python
48
+ import json
49
+ from pathlib import Path
50
+ from grafana_import.grafana import Grafana
51
+
52
+ dashboard = json.loads(Path(" grafana_dashboard.json" ).read_text())
53
+ gio = Grafana(url = " http://localhost:3000" , credential = (" admin" , " admin" ))
54
+ outcome = gio.import_dashboard(dashboard)
55
+ ```
39
56
40
57
## Ad Hoc Usage
41
58
You can’t perform that action at this time.
0 commit comments