mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Docs: misc. nitpicks to the HTTP API docs (#21758)
* Replace bash/json with http in http_api codeblocks Since http is used elsewhere on the API docs and makes the markdown rendering look different on the blocks that use bash/json * Fix the annotations API link on 'Features' - Noticed the Features/Dashboard Features/Annotations link pointing to the HTTP API was linking itself instead of '../http_api/annotations.md'. - Also add a link on Dashboard Export and Import to its HTTP API. * Add missing links to features in API Index Noticed there was 3 missing references in the API docs index. - https://grafana.com/docs/grafana/latest/http_api/playlist - https://grafana.com/docs/grafana/latest/http_api/datasource_permissions - https://grafana.com/docs/grafana/latest/http_api/external_group_sync Last two are Grafana Enterprise -only, so created a separate subsection for them.
This commit is contained in:
committed by
Marcus Efraimsson
parent
1c0d022ac2
commit
261191ffd7
@@ -30,6 +30,7 @@ dashboards, creating users and updating data sources.
|
||||
* [Organization API]({{< relref "org.md" >}})
|
||||
* [Snapshot API]({{< relref "snapshot.md" >}})
|
||||
* [Annotations API]({{< relref "annotations.md" >}})
|
||||
* [Playlists API]({{< relref "playlist.md" >}})
|
||||
* [Alerting API]({{< relref "alerting.md" >}})
|
||||
* [Alert Notification Channels API]({{< relref "alerting_notification_channels.md" >}})
|
||||
* [User API]({{< relref "user.md" >}})
|
||||
@@ -37,3 +38,8 @@ dashboards, creating users and updating data sources.
|
||||
* [Admin API]({{< relref "admin.md" >}})
|
||||
* [Preferences API]({{< relref "preferences.md" >}})
|
||||
* [Other API]({{< relref "other.md" >}})
|
||||
|
||||
### Grafana Enterprise HTTP APIs
|
||||
|
||||
* [Data Source Permissions API]({{< relref "datasource_permissions.md" >}})
|
||||
* [External Group Sync API]({{< relref "external_group_sync.md" >}})
|
||||
|
||||
@@ -23,7 +23,7 @@ Only works with Basic Authentication (username and password). See [introduction]
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```bash
|
||||
```http
|
||||
GET /api/admin/settings
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
@@ -31,7 +31,7 @@ Content-Type: application/json
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```bash
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
@@ -181,7 +181,7 @@ Only works with Basic Authentication (username and password). See [introduction]
|
||||
|
||||
`GET /api/admin/users/:id/auth-tokens`
|
||||
|
||||
```bash
|
||||
Return a list of all auth tokens (devices) that the user currently have logged in from.
|
||||
|
||||
Only works with Basic Authentication (username and password). See [introduction](http://docs.grafana.org/http_api/admin/#admin-api) for an explanation.
|
||||
|
||||
@@ -189,7 +189,7 @@ Content-Type: application/json
|
||||
|
||||
```http
|
||||
GET /api/admin/users/1/auth-tokens HTTP/1.1
|
||||
```json
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
```
|
||||
|
||||
@@ -214,8 +214,8 @@ Content-Type: application/json
|
||||
|
||||
```http
|
||||
POST /api/admin/users/1/revoke-auth-token HTTP/1.1
|
||||
```json
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
@@ -230,7 +230,7 @@ Content-Type: application/json
|
||||
## Logout User
|
||||
|
||||
`POST /api/admin/users/:id/logout`
|
||||
```json
|
||||
|
||||
Logout user revokes all auth tokens (devices) for the user. User of issued auth tokens (devices) will no longer be logged in
|
||||
and will be required to authenticate again upon next activity.
|
||||
|
||||
@@ -246,7 +246,7 @@ Change password for a specific user.
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```json
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
@@ -256,7 +256,7 @@ Content-Type: application/json
|
||||
|
||||
`POST /api/admin/provisioning/dashboards/reload`
|
||||
|
||||
```json
|
||||
`POST /api/admin/provisioning/datasources/reload`
|
||||
|
||||
`POST /api/admin/provisioning/notifications/reload`
|
||||
|
||||
@@ -271,7 +271,7 @@ Only works with Basic Authentication (username and password). See [introduction]
|
||||
```http
|
||||
POST /api/admin/provisioning/dashboards/reload HTTP/1.1
|
||||
Accept: application/json
|
||||
```json
|
||||
Content-Type: application/json
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
@@ -281,7 +281,7 @@ Content-Type: application/json
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
```json
|
||||
|
||||
## Reload LDAP configuration
|
||||
|
||||
`POST /api/admin/ldap/reload`
|
||||
@@ -296,7 +296,7 @@ Only works with Basic Authentication (username and password). See [introduction]
|
||||
POST /api/admin/ldap/reload HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
```json
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
@@ -304,7 +304,7 @@ Content-Type: application/json
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
```json
|
||||
```
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Get all existing playlist for the current organization using pagination
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```bash
|
||||
```http
|
||||
GET /api/playlists HTTP/1.1
|
||||
Accept: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
@@ -35,7 +35,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```json
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
[
|
||||
@@ -53,7 +53,7 @@ Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
```bash
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
@@ -61,7 +61,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
{
|
||||
```
|
||||
|
||||
```json
|
||||
## Get Playlist items
|
||||
|
||||
`GET /api/playlists/:id/items`
|
||||
|
||||
@@ -96,7 +96,7 @@ Content-Type: application/json
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
```bash
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
[
|
||||
```
|
||||
@@ -104,7 +104,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
## Create a playlist
|
||||
|
||||
`POST /api/playlists/`
|
||||
```json
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@@ -133,7 +133,7 @@ Content-Type: application/json
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
```bash
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
@@ -141,7 +141,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
"id": 1,
|
||||
"name": "my playlist",
|
||||
"interval": "5m"
|
||||
```json
|
||||
}
|
||||
```
|
||||
|
||||
## Update a playlist
|
||||
@@ -165,7 +165,7 @@ Content-Type: application/json
|
||||
"value": "3",
|
||||
"order": 1,
|
||||
"title":"my third dasboard"
|
||||
```bash
|
||||
},
|
||||
{
|
||||
"playlistId": 1,
|
||||
"type": "dashboard_by_tag",
|
||||
@@ -192,7 +192,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
```json
|
||||
DELETE /api/playlists/1 HTTP/1.1
|
||||
Accept: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
@@ -208,7 +208,7 @@ Content-Type: application/json
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```bash
|
||||
```http
|
||||
PUT /api/playlists/1 HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
@@ -237,7 +237,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```json
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
{
|
||||
@@ -272,7 +272,7 @@ Content-Type: application/json
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```bash
|
||||
```http
|
||||
DELETE /api/playlists/1 HTTP/1.1
|
||||
Accept: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
@@ -280,7 +280,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```json
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
{}
|
||||
|
||||
@@ -17,7 +17,7 @@ you can get event description and event tags. The text field can include links t
|
||||
|
||||
## Native annotations
|
||||
|
||||
Grafana v4.6+ comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "annotations.md" >}}).
|
||||
Grafana v4.6+ comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../http_api/annotations.md" >}}).
|
||||
|
||||
## Adding annotations
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ weight = 8
|
||||
|
||||
# Export and Import
|
||||
|
||||
Grafana Dashboards can easily be exported and imported, either from the UI or from the HTTP API.
|
||||
Grafana Dashboards can easily be exported and imported, either from the UI or from the [HTTP API]({{< relref "../http_api/dashboard.md#create-update-dashboard" >}}).
|
||||
|
||||
## Exporting a dashboard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user