Skip to content

Commit 8dafd01

Browse files
authored
Merge pull request #12 from ZPascal/update-the-documentation
Update the documentation
2 parents a25c4ac + dc72459 commit 8dafd01

File tree

5 files changed

+40
-20
lines changed

5 files changed

+40
-20
lines changed

README.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,23 +171,41 @@ In general my focus inside this project is to implement and deliver old and new
171171
- Update playlist
172172
- Delete playlist
173173

174+
### Reporting
175+
- Send report
176+
177+
### Query History
178+
- Add query to history
179+
- Delete query inside the history
180+
- Update query inside the history
181+
- Search inside the query history
182+
- Star a query inside the history
183+
- Unstar a query inside the history
184+
185+
### Other HTTP
186+
- Get frontend settings
187+
- Renew login session
188+
- Get health status
189+
- Get metrics
190+
191+
### Licensing
192+
- Check license availability
193+
- Manually force license refresh
194+
- Remove the license from the database
195+
174196
## Feature timeline
175197

176198
The following table describes the plan to implement the rest of the Grafana API functionality. Please, open an issue and vote them up, if you prefer a faster implementation of an API functionality.
177199

178200
| API endpoint group | Implementation week | Maintainer | PR | State |
179201
|:------------------:|:-------------------:|:----------:|:--:|:-----:|
180202
| [Admin HTTP API](https://grafana.com/docs/grafana/latest/http_api/admin/) | | | | |
181-
| [Annotations HTTP API](https://grafana.com/docs/grafana/latest/http_api/annotations/) | | | | |
182-
| [Authentication HTTP API](https://grafana.com/docs/grafana/latest/http_api/auth/) | | | | |
183-
| [External Group Sync HTTP API](https://grafana.com/docs/grafana/latest/http_api/external_group_sync/) | | | | |
203+
| [Annotations HTTP API](https://grafana.com/docs/grafana/latest/http_api/annotations/) | 23 | [ZPascal](https://github.com/ZPascal) | | |
204+
| [Authentication HTTP API](https://grafana.com/docs/grafana/latest/http_api/auth/) | 23 | [ZPascal](https://github.com/ZPascal) | | |
205+
| [External Group Sync HTTP API](https://grafana.com/docs/grafana/latest/http_api/external_group_sync/) | 23 | [ZPascal](https://github.com/ZPascal) | | |
184206
| [Fine-grained access control HTTP API](https://grafana.com/docs/grafana/latest/http_api/access_control/) | | | | |
185-
| [HTTP Preferences API](https://grafana.com/docs/grafana/latest/http_api/preferences/) | | | | |
186-
| [Library Element HTTP API](https://grafana.com/docs/grafana/latest/http_api/library_element/) | | | | |
187-
| [Licensing HTTP API](https://grafana.com/docs/grafana/latest/http_api/licensing/) | 22 | [ZPascal](https://github.com/ZPascal) | | |
188-
| [Other HTTP API](https://grafana.com/docs/grafana/latest/http_api/other/) | 22 | [ZPascal](https://github.com/ZPascal) | | |
189-
| [Query History API](https://grafana.com/docs/grafana/latest/http_api/query_history/) | 22 | [ZPascal](https://github.com/ZPascal) | | |
190-
| [Reporting API](https://grafana.com/docs/grafana/latest/http_api/reporting/) | 22 | [ZPascal](https://github.com/ZPascal) | | |
207+
| [HTTP Preferences API](https://grafana.com/docs/grafana/latest/http_api/preferences/) | 23 | [ZPascal](https://github.com/ZPascal) | | |
208+
| [Library Element HTTP API](https://grafana.com/docs/grafana/latest/http_api/library_element/) | | | | |
191209

192210
## Installation
193211

docs/content/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ The following list describes the currently supported features of the Grafana API
2121
- [ ] [HTTP Preferences API](https://grafana.com/docs/grafana/latest/http_api/preferences/)
2222
- [x] [HTTP Snapshot API](https://grafana.com/docs/grafana/latest/http_api/snapshot/)
2323
- [ ] [Library Element HTTP API](https://grafana.com/docs/grafana/latest/http_api/library_element/)
24-
- [ ] [Licensing HTTP API](https://grafana.com/docs/grafana/latest/http_api/licensing/)
24+
- [x] [Query History API](https://grafana.com/docs/grafana/latest/http_api/query_history/)
25+
- [x] [Licensing HTTP API](https://grafana.com/docs/grafana/latest/http_api/licensing/)
2526
- [x] [Organization HTTP API](https://grafana.com/docs/grafana/latest/http_api/org/)
26-
- [ ] [Other HTTP API](https://grafana.com/docs/grafana/latest/http_api/other/)
27+
- [x] [Other HTTP API](https://grafana.com/docs/grafana/latest/http_api/other/)
2728
- [x] [Playlist HTTP API](https://grafana.com/docs/grafana/latest/http_api/playlist/)
28-
- [ ] [Reporting API](https://grafana.com/docs/grafana/latest/http_api/reporting/)
29+
- [x] [Reporting API](https://grafana.com/docs/grafana/latest/http_api/reporting/)
2930
- [x] [Short URL HTTP API](https://grafana.com/docs/grafana/latest/http_api/short_url/)
3031
- [x] [Team HTTP API](https://grafana.com/docs/grafana/latest/http_api/team/)
3132
- [x] [User HTTP API](https://grafana.com/docs/grafana/latest/http_api/user/)

docs/grafana_api_sdk.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ The following list describes the currently supported features of the Grafana API
2121
- [ ] [HTTP Preferences API](https://grafana.com/docs/grafana/latest/http_api/preferences/)
2222
- [x] [HTTP Snapshot API](https://grafana.com/docs/grafana/latest/http_api/snapshot/)
2323
- [ ] [Library Element HTTP API](https://grafana.com/docs/grafana/latest/http_api/library_element/)
24-
- [ ] [Licensing HTTP API](https://grafana.com/docs/grafana/latest/http_api/licensing/)
24+
- [x] [Query History API](https://grafana.com/docs/grafana/latest/http_api/query_history/)
25+
- [x] [Licensing HTTP API](https://grafana.com/docs/grafana/latest/http_api/licensing/)
2526
- [x] [Organization HTTP API](https://grafana.com/docs/grafana/latest/http_api/org/)
26-
- [ ] [Other HTTP API](https://grafana.com/docs/grafana/latest/http_api/other/)
27+
- [x] [Other HTTP API](https://grafana.com/docs/grafana/latest/http_api/other/)
2728
- [x] [Playlist HTTP API](https://grafana.com/docs/grafana/latest/http_api/playlist/)
28-
- [ ] [Reporting API](https://grafana.com/docs/grafana/latest/http_api/reporting/)
29+
- [x] [Reporting API](https://grafana.com/docs/grafana/latest/http_api/reporting/)
2930
- [x] [Short URL HTTP API](https://grafana.com/docs/grafana/latest/http_api/short_url/)
3031
- [x] [Team HTTP API](https://grafana.com/docs/grafana/latest/http_api/team/)
3132
- [x] [User HTTP API](https://grafana.com/docs/grafana/latest/http_api/user/)

src/grafana_api/licensing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def manually_force_license_refresh(self):
7979
else:
8080
return api_call
8181

82-
def remove_license_from_dashboard(self):
82+
def remove_license_from_database(self):
8383
"""The method includes a functionality to removes the license stored in the Grafana database
8484
8585
Required Permissions:

tests/unittests/test_licensing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ def test_manually_force_license_refresh_no_result(self, call_the_api_mock):
5252
licensing.manually_force_license_refresh()
5353

5454
@patch("src.grafana_api.api.Api.call_the_api")
55-
def test_remove_license_from_dashboard(self, call_the_api_mock):
55+
def test_remove_license_from_database(self, call_the_api_mock):
5656
model: APIModel = APIModel(host=MagicMock(), token=MagicMock())
5757
licensing: Licensing = Licensing(grafana_api_model=model)
5858

5959
call_the_api_mock.return_value.status_code = 200
6060

61-
self.assertEqual(None, licensing.remove_license_from_dashboard())
61+
self.assertEqual(None, licensing.remove_license_from_database())
6262

6363
@patch("src.grafana_api.api.Api.call_the_api")
64-
def test_remove_license_from_dashboard_no_result(self, call_the_api_mock):
64+
def test_remove_license_from_database_no_result(self, call_the_api_mock):
6565
model: APIModel = APIModel(host=MagicMock(), token=MagicMock())
6666
licensing: Licensing = Licensing(grafana_api_model=model)
6767

@@ -71,4 +71,4 @@ def test_remove_license_from_dashboard_no_result(self, call_the_api_mock):
7171
call_the_api_mock.return_value = mock
7272

7373
with self.assertRaises(Exception):
74-
licensing.remove_license_from_dashboard()
74+
licensing.remove_license_from_database()

0 commit comments

Comments
 (0)