|
@@ -6,6 +6,10 @@ page_keywords: grafana, admin, http, api, documentation
|
|
|
|
|
|
|
|
# Admin API
|
|
# Admin API
|
|
|
|
|
|
|
|
|
|
+The admin http API does not currently work with an api token. Api Token's are currently only linked to an organization and organization role. They cannot given
|
|
|
|
|
+the permission of server admin, only user's can be given that permission. So in order to use these API calls you will have to use basic auth and Grafana user
|
|
|
|
|
+with Grafana admin permission.
|
|
|
|
|
+
|
|
|
## Settings
|
|
## Settings
|
|
|
|
|
|
|
|
`GET /api/admin/settings`
|
|
`GET /api/admin/settings`
|
|
@@ -15,7 +19,6 @@ page_keywords: grafana, admin, http, api, documentation
|
|
|
GET /api/admin/settings
|
|
GET /api/admin/settings
|
|
|
Accept: application/json
|
|
Accept: application/json
|
|
|
Content-Type: application/json
|
|
Content-Type: application/json
|
|
|
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
|
|
|
|
|
|
|
|
|
**Example Response**:
|
|
**Example Response**:
|
|
|
|
|
|
|
@@ -171,7 +174,6 @@ page_keywords: grafana, admin, http, api, documentation
|
|
|
GET /api/admin/stats
|
|
GET /api/admin/stats
|
|
|
Accept: application/json
|
|
Accept: application/json
|
|
|
Content-Type: application/json
|
|
Content-Type: application/json
|
|
|
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
|
|
|
|
|
|
|
|
|
**Example Response**:
|
|
**Example Response**:
|
|
|
|
|
|
|
@@ -201,7 +203,6 @@ Create new user
|
|
|
POST /api/admin/users HTTP/1.1
|
|
POST /api/admin/users HTTP/1.1
|
|
|
Accept: application/json
|
|
Accept: application/json
|
|
|
Content-Type: application/json
|
|
Content-Type: application/json
|
|
|
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
|
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
"name":"User",
|
|
"name":"User",
|
|
@@ -228,7 +229,6 @@ Change password for specific user
|
|
|
PUT /api/admin/users/2/password HTTP/1.1
|
|
PUT /api/admin/users/2/password HTTP/1.1
|
|
|
Accept: application/json
|
|
Accept: application/json
|
|
|
Content-Type: application/json
|
|
Content-Type: application/json
|
|
|
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
|
|
|
|
|
|
|
|
|
**Example Response**:
|
|
**Example Response**:
|
|
|
|
|
|
|
@@ -246,7 +246,6 @@ Change password for specific user
|
|
|
PUT /api/admin/users/2/permissions HTTP/1.1
|
|
PUT /api/admin/users/2/permissions HTTP/1.1
|
|
|
Accept: application/json
|
|
Accept: application/json
|
|
|
Content-Type: application/json
|
|
Content-Type: application/json
|
|
|
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
|
|
|
|
|
|
|
|
|
**Example Response**:
|
|
**Example Response**:
|
|
|
|
|
|
|
@@ -264,7 +263,6 @@ Change password for specific user
|
|
|
DELETE /api/admin/users/2 HTTP/1.1
|
|
DELETE /api/admin/users/2 HTTP/1.1
|
|
|
Accept: application/json
|
|
Accept: application/json
|
|
|
Content-Type: application/json
|
|
Content-Type: application/json
|
|
|
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
|
|
|
|
|
|
|
|
|
**Example Response**:
|
|
**Example Response**:
|
|
|
|
|
|