Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #67 from Frantisek12/feat/readme
Browse files Browse the repository at this point in the history
Authentication info in readme
  • Loading branch information
m0nhawk authored May 27, 2020
2 parents b37fc07 + 483629b commit b8938eb
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,29 @@ grafana_api.dashboard.update_dashboard(dashboard={'dashboard': {...}, 'folderId'
grafana_api.dashboard.delete_dashboard(dashboard_uid='abcdefgh')
```


## Authentication

There are two ways to autheticate to grafana api. Either use api token or basic auth.

To use admin API you need to use basic auth [as stated here](https://grafana.com/docs/grafana/latest/http_api/admin/)

```python
# Use basic authentication:

grafana_api = GrafanaFace(
auth=("username","password"),
host='api.my-grafana-host.com'
)

# Use token
grafana_api = GrafanaFace(
auth='abcdetoken...',
host='api.my-grafana-host.com'
)
```


## Status of REST API realization

Work on API implementation still in progress.
Expand Down

0 comments on commit b8938eb

Please sign in to comment.