Skip to content

Commit 114e02b

Browse files
authored
Merge pull request #14 from ZPascal/add-cw-25-support
Add Admin and update the Playlist support
2 parents 97c3477 + f500bb2 commit 114e02b

File tree

15 files changed

+1904
-74
lines changed

15 files changed

+1904
-74
lines changed

README.md

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,23 @@ In general my focus inside this project is to implement and deliver old and new
162162
- Get team preferences
163163
- Update team preferences
164164

165+
### Legacy Playlist
166+
- Search playlist
167+
- Get playlist by id
168+
- Get playlist items by id
169+
- Get playlist dashboards by id
170+
- Create playlist
171+
- Update playlist by id
172+
- Delete playlist by id
173+
165174
### Playlist
166175
- Search playlist
167-
- Get playlist
168-
- Get playlist items
169-
- Get playlist dashboards
176+
- Get playlist by uid
177+
- Get playlist items by uid
178+
- Get playlist dashboards by uid
170179
- Create playlist
171-
- Update playlist
172-
- Delete playlist
180+
- Update playlist by uid
181+
- Delete playlist by uid
173182

174183
### Reporting
175184
- Send report
@@ -217,17 +226,38 @@ In general my focus inside this project is to implement and deliver old and new
217226
- Get current org preferences
218227
- Update current org preferences
219228

229+
### Admin
230+
- Get settings
231+
- Update settings
232+
- Get stats
233+
- Get preview report
234+
- Create global user
235+
- Update user password
236+
- Update user permissions
237+
- Delete global user
238+
- Pause all alerts
239+
- Unpause all alerts
240+
- Get user auth tokens
241+
- Revoke user auth token
242+
- Logout user
243+
- Reload dashboard provisioning configuration
244+
- Reload datasource provisioning configuration
245+
- Reload plugins provisioning configuration
246+
- Reload notifications provisioning configuration
247+
- Reload access controls provisioning configuration
248+
- Reload LDAP provisioning configuration
249+
- Rotate data encryption keys
250+
220251
## Feature timeline
221252

222253
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.
223254

224255
| API endpoint group | Implementation week | Maintainer | PR | State |
225256
|:------------------:|:-------------------:|:----------:|:--:|:-----:|
226-
| [Admin HTTP API](https://grafana.com/docs/grafana/latest/http_api/admin/) | 25 | | | |
227-
| [Fine-grained access control HTTP API](https://grafana.com/docs/grafana/latest/http_api/access_control/) | 25 | | | |
228-
| [Library Element HTTP API](https://grafana.com/docs/grafana/latest/http_api/library_element/) | 25 | | | |
229-
| [Alerting Provisioning HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/) | | | | |
230-
| [Service Account HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/) | 25 | | | |
257+
| [Fine-grained access control HTTP API](https://grafana.com/docs/grafana/latest/http_api/access_control/) | 28 | | | |
258+
| [Library Element HTTP API](https://grafana.com/docs/grafana/latest/http_api/library_element/) | 30 | | | |
259+
| [Alerting Provisioning HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/) | 31 | | | |
260+
| [Service Account HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/) | 28 | | | |
231261

232262
## Installation
233263

docs/content/grafana_api/model.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* [FindAnnotationObject](#grafana_api.model.FindAnnotationObject)
2121
* [AnnotationObject](#grafana_api.model.AnnotationObject)
2222
* [AnnotationGraphiteObject](#grafana_api.model.AnnotationGraphiteObject)
23+
* [GlobalUser](#grafana_api.model.GlobalUser)
2324

2425
<a id="grafana_api.model"></a>
2526

@@ -354,3 +355,21 @@ The class includes all necessary variables to generate a Graphite annotation obj
354355
- `when` _int_ - Specify the optional time as number in milliseconds
355356
- `data` _str_ - Specify the optional annotation description message
356357

358+
<a id="grafana_api.model.GlobalUser"></a>
359+
360+
## GlobalUser Objects
361+
362+
```python
363+
class GlobalUser(NamedTuple)
364+
```
365+
366+
The class includes all necessary variables to generate a global user object
367+
368+
**Arguments**:
369+
370+
- `name` _str_ - Specify the name of the user
371+
- `email` _str_ - Specify the email of the user
372+
- `login` _str_ - Specify the login type of the user
373+
- `password` _str_ - Specify the password of the user
374+
- `org_id` _int_ - Specify the optional org id of the user (default None)
375+

docs/content/index.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ The repository includes an SDK for the Grafana API. It's possible to communicate
55

66
The following list describes the currently supported features of the Grafana API functionality.
77

8-
- [ ] [Admin HTTP API](https://grafana.com/docs/grafana/latest/http_api/admin/)
8+
- [x] [Admin HTTP API](https://grafana.com/docs/grafana/latest/http_api/admin/)
99
- [x] [Legacy Alerting HTTP API](https://grafana.com/docs/grafana/latest/http_api/alerting/)
1010
- [x] [Alerting HTTP API](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/pkg/services/ngalert/api/tooling/post.json)
1111
- [x] [Alerting Notification Channels HTTP API](https://grafana.com/docs/grafana/latest/http_api/alerting_notification_channels/)
12-
- [ ] [Annotations HTTP API](https://grafana.com/docs/grafana/latest/http_api/annotations/)
13-
- [ ] [Authentication HTTP API](https://grafana.com/docs/grafana/latest/http_api/auth/)
12+
- [x] [Annotations HTTP API](https://grafana.com/docs/grafana/latest/http_api/annotations/)
13+
- [x] [Authentication HTTP API](https://grafana.com/docs/grafana/latest/http_api/auth/)
1414
- [x] [Data source HTTP API](https://grafana.com/docs/grafana/latest/http_api/data_source/)
1515
- [x] [Datasource Permissions HTTP API](https://grafana.com/docs/grafana/latest/http_api/datasource_permissions/)
1616
- [x] [Folder HTTP API](https://grafana.com/docs/grafana/v7.5/http_api/folder/)
1717
- [x] [Folder Permissions HTTP API](https://grafana.com/docs/grafana/v7.5/http_api/folder_permissions/)
1818
- [x] [Search HTTP API](https://grafana.com/docs/grafana/v7.5/http_api/folder_dashboard_search/)
19-
- [ ] [External Group Sync HTTP API](https://grafana.com/docs/grafana/latest/http_api/external_group_sync/)
20-
- [ ] [Fine-grained access control HTTP API](https://grafana.com/docs/grafana/latest/http_api/access_control/)
21-
- [ ] [HTTP Preferences API](https://grafana.com/docs/grafana/latest/http_api/preferences/)
19+
- [x] [External Group Sync HTTP API](https://grafana.com/docs/grafana/latest/http_api/external_group_sync/)
20+
- [ ] [Access control HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/access_control/)
21+
- [x] [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/)
2424
- [x] [Query History API](https://grafana.com/docs/grafana/latest/http_api/query_history/)
@@ -30,6 +30,8 @@ The following list describes the currently supported features of the Grafana API
3030
- [x] [Short URL HTTP API](https://grafana.com/docs/grafana/latest/http_api/short_url/)
3131
- [x] [Team HTTP API](https://grafana.com/docs/grafana/latest/http_api/team/)
3232
- [x] [User HTTP API](https://grafana.com/docs/grafana/latest/http_api/user/)
33+
- [ ] [Service Account HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/)
34+
- [ ] [Alerting Provisioning HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/)
3335

3436
## Installation
3537

docs/grafana_api_sdk.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The repository includes an SDK for the Grafana API. It's possible to communicate
55

66
The following list describes the currently supported features of the Grafana API functionality.
77

8-
- [ ] [Admin HTTP API](https://grafana.com/docs/grafana/latest/http_api/admin/)
8+
- [x] [Admin HTTP API](https://grafana.com/docs/grafana/latest/http_api/admin/)
99
- [x] [Legacy Alerting HTTP API](https://grafana.com/docs/grafana/latest/http_api/alerting/)
1010
- [x] [Alerting HTTP API](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/pkg/services/ngalert/api/tooling/post.json)
1111
- [x] [Alerting Notification Channels HTTP API](https://grafana.com/docs/grafana/latest/http_api/alerting_notification_channels/)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setuptools.setup(
1010
name="grafana-api-sdk",
11-
version="0.0.6",
11+
version="0.0.7",
1212
author="Pascal Zimmermann",
1313
author_email="[email protected]",
1414
description="A Grafana API SDK",

0 commit comments

Comments
 (0)