mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Linked docs from main nav
This commit is contained in:
@@ -76,14 +76,15 @@ pages:
|
||||
- ['datasources/kairosdb.md', 'Data Sources', 'KairosDB']
|
||||
- ['datasources/prometheus.md', 'Data Sources', 'Prometheus']
|
||||
|
||||
- ['http_api/first_steps.md', 'HTTP API', 'Authentication API']
|
||||
- ['http_api/dashboards.md', 'HTTP API', 'Dashboards API']
|
||||
- ['http_api/data_sources.md', 'HTTP API', 'Data Sources API']
|
||||
- ['http_api/orgs.md', 'HTTP API', 'Organisations API']
|
||||
- ['http_api/users.md', 'HTTP API', 'Users API']
|
||||
- ['http_api/admin.md', 'HTTP API', 'Admin API']
|
||||
- ['http_api/snapshots.md', 'HTTP API', 'Snapshots API']
|
||||
- ['http_api/general.md', 'HTTP API', 'Other API']
|
||||
- ['http_api/overview.md', 'API', 'Overview']
|
||||
- ['http_api/auth.md', 'API', 'Authentication API']
|
||||
- ['http_api/dashboard.md', 'API', 'Dashboard API']
|
||||
- ['http_api/data_source.md', 'API', 'Data Source API']
|
||||
- ['http_api/org.md', 'API', 'Organisation API']
|
||||
- ['http_api/user.md', 'API', 'User API']
|
||||
- ['http_api/admin.md', 'API', 'Admin API']
|
||||
- ['http_api/snapshot.md', 'API', 'Snapshot API']
|
||||
- ['http_api/other.md', 'API', 'Other API']
|
||||
|
||||
- ['tutorials/index.md', 'Tutorials', 'Tutorials']
|
||||
- ['tutorials/hubot_howto.md', 'Tutorials', 'How To integrate Hubot and Grafana']
|
||||
|
||||
@@ -4,9 +4,9 @@ page_description: Grafana Admin API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation
|
||||
---
|
||||
|
||||
## Admin API
|
||||
# Admin API
|
||||
|
||||
### Settings
|
||||
## Settings
|
||||
|
||||
`GET /api/admin/settings`
|
||||
|
||||
@@ -162,7 +162,7 @@ page_keywords: grafana, admin, http, api, documentation
|
||||
}
|
||||
}
|
||||
|
||||
### Grafana Stats
|
||||
## Grafana Stats
|
||||
|
||||
`GET /api/admin/stats`
|
||||
|
||||
@@ -190,7 +190,7 @@ page_keywords: grafana, admin, http, api, documentation
|
||||
"grafana_admin_count":2
|
||||
}
|
||||
|
||||
### Global Users
|
||||
## Global Users
|
||||
|
||||
`POST /api/admin/users`
|
||||
|
||||
@@ -217,7 +217,7 @@ Create new user
|
||||
|
||||
{"id":5,"message":"User created"}
|
||||
|
||||
### Password for User
|
||||
## Password for User
|
||||
|
||||
`PUT /api/admin/users/:id/password`
|
||||
|
||||
@@ -237,7 +237,7 @@ Change password for specific user
|
||||
|
||||
{"password":"userpassword"}
|
||||
|
||||
### Permissions
|
||||
## Permissions
|
||||
|
||||
`PUT /api/admin/users/:id/permissions`
|
||||
|
||||
@@ -255,7 +255,7 @@ Change password for specific user
|
||||
|
||||
{message: "User permissions updated"}
|
||||
|
||||
### Delete global User
|
||||
## Delete global User
|
||||
|
||||
`DELETE /api/admin/users/:id`
|
||||
|
||||
@@ -271,4 +271,4 @@ Change password for specific user
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
{message: "User deleted"}
|
||||
{message: "User deleted"}
|
||||
|
||||
@@ -6,9 +6,6 @@ page_keywords: grafana, admin, http, api, documentation
|
||||
|
||||
# Authentication API
|
||||
|
||||
The Grafana backend exposes an HTTP API, the same API is used by the frontend to do everything from saving
|
||||
dashboards, creating users and updating data sources.
|
||||
|
||||
## Tokens
|
||||
|
||||
Currently you can authenticate via an `API Token` or via a `Session cookie` (acquired using regular login or oauth).
|
||||
@@ -1,12 +1,12 @@
|
||||
----
|
||||
page_title: Dashboards API
|
||||
page_description: Grafana Dashboards API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation, dashboards
|
||||
page_title: Dashboard API
|
||||
page_description: Grafana Dashboard API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation, dashboard
|
||||
---
|
||||
|
||||
## Dashboards API
|
||||
# Dashboard API
|
||||
|
||||
### Create / Update dashboard
|
||||
## Create / Update dashboard
|
||||
|
||||
`POST /api/dashboards/db`
|
||||
|
||||
@@ -73,7 +73,7 @@ same status code is also used if another dashboard exists with the same title. T
|
||||
|
||||
In in case of title already exists the `status` property will be `name-exists`.
|
||||
|
||||
### Get dashboard
|
||||
## Get dashboard
|
||||
|
||||
`GET /api/dashboards/db/:slug`
|
||||
|
||||
@@ -110,7 +110,7 @@ Will return the dashboard given the dashboard slug. Slug is the url friendly ver
|
||||
}
|
||||
}
|
||||
|
||||
### Delete dashboard
|
||||
## Delete dashboard
|
||||
|
||||
`DELETE /api/dashboards/db/:slug`
|
||||
|
||||
@@ -130,7 +130,7 @@ The above will delete the dashboard with the specified slug. The slug is the url
|
||||
|
||||
{"title": "Test"}
|
||||
|
||||
### Gets the home dashboard
|
||||
## Gets the home dashboard
|
||||
|
||||
`GET /api/dashboards/home`
|
||||
|
||||
@@ -186,7 +186,7 @@ Will return the home dashboard.
|
||||
}
|
||||
}
|
||||
|
||||
### Tags for Dashboard
|
||||
## Tags for Dashboard
|
||||
|
||||
|
||||
`GET /api/dashboards/tags`
|
||||
@@ -216,11 +216,11 @@ Get all tabs of dashboards
|
||||
}
|
||||
]
|
||||
|
||||
### Dashboard from JSON file
|
||||
## Dashboard from JSON file
|
||||
|
||||
`GET /file/:file`
|
||||
|
||||
### Search Dashboards
|
||||
## Search Dashboards
|
||||
|
||||
`GET /api/search/`
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
----
|
||||
page_title: Data sources API
|
||||
page_description: Grafana Data sources API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation, datasources
|
||||
page_title: Data source API
|
||||
page_description: Grafana Data source API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation, datasource
|
||||
---
|
||||
|
||||
## Data sources API
|
||||
# Data source API
|
||||
|
||||
### Get all datasources
|
||||
## Get all datasources
|
||||
|
||||
`GET /api/datasources`
|
||||
|
||||
@@ -41,7 +41,7 @@ page_keywords: grafana, admin, http, api, documentation, datasources
|
||||
}
|
||||
]
|
||||
|
||||
### Get a single data sources by Id
|
||||
## Get a single data sources by Id
|
||||
|
||||
`GET /api/datasources/:datasourceId`
|
||||
|
||||
@@ -74,7 +74,7 @@ page_keywords: grafana, admin, http, api, documentation, datasources
|
||||
"jsonData":null
|
||||
}
|
||||
|
||||
### Create data source
|
||||
## Create data source
|
||||
|
||||
`POST /api/datasources`
|
||||
|
||||
@@ -101,7 +101,7 @@ page_keywords: grafana, admin, http, api, documentation, datasources
|
||||
|
||||
{"id":1,"message":"Datasource added"}
|
||||
|
||||
### Update an existing data source
|
||||
## Update an existing data source
|
||||
|
||||
`PUT /api/datasources/:datasourceId`
|
||||
|
||||
@@ -136,7 +136,7 @@ page_keywords: grafana, admin, http, api, documentation, datasources
|
||||
|
||||
{"message":"Datasource updated"}
|
||||
|
||||
### Delete an existing data source
|
||||
## Delete an existing data source
|
||||
|
||||
`DELETE /api/datasources/:datasourceId`
|
||||
|
||||
@@ -154,7 +154,7 @@ page_keywords: grafana, admin, http, api, documentation, datasources
|
||||
|
||||
{"message":"Data source deleted"}
|
||||
|
||||
### Available data source types
|
||||
## Available data source types
|
||||
|
||||
`GET /api/datasources/plugins`
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
----
|
||||
page_title: Organisations API
|
||||
page_description: Grafana Organisations API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation, orgs, organisations
|
||||
page_title: Organisation API
|
||||
page_description: Grafana Organisation API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation, orgs, organisation
|
||||
---
|
||||
|
||||
## Organisation API
|
||||
# Organisation API
|
||||
|
||||
### Get current Organisation
|
||||
## Get current Organisation
|
||||
|
||||
`GET /api/org`
|
||||
|
||||
@@ -27,7 +27,7 @@ page_keywords: grafana, admin, http, api, documentation, orgs, organisations
|
||||
"name":"Main Org."
|
||||
}
|
||||
|
||||
### Get Organisation by Id
|
||||
## Get Organisation by Id
|
||||
|
||||
`GET /api/orgs/:orgId`
|
||||
|
||||
@@ -56,7 +56,7 @@ page_keywords: grafana, admin, http, api, documentation, orgs, organisations
|
||||
}
|
||||
}
|
||||
|
||||
### Get Organisation by Name
|
||||
## Get Organisation by Name
|
||||
|
||||
`GET /api/orgs/name/:orgName`
|
||||
|
||||
@@ -85,7 +85,7 @@ page_keywords: grafana, admin, http, api, documentation, orgs, organisations
|
||||
}
|
||||
}
|
||||
|
||||
### Update current Organisation
|
||||
## Update current Organisation
|
||||
|
||||
`PUT /api/org`
|
||||
|
||||
@@ -109,7 +109,7 @@ page_keywords: grafana, admin, http, api, documentation, orgs, organisations
|
||||
{"message":"Organization updated"}
|
||||
|
||||
|
||||
### Get all users within the actual organisation
|
||||
## Get all users within the actual organisation
|
||||
|
||||
`GET /api/org/users`
|
||||
|
||||
@@ -135,7 +135,7 @@ page_keywords: grafana, admin, http, api, documentation, orgs, organisations
|
||||
}
|
||||
]
|
||||
|
||||
### Add a new user to the actual organisation
|
||||
## Add a new user to the actual organisation
|
||||
|
||||
`POST /api/org/users`
|
||||
|
||||
@@ -161,7 +161,7 @@ Adds a global user to the actual organisation.
|
||||
|
||||
{"message":"User added to organization"}
|
||||
|
||||
### Updates the given user
|
||||
## Updates the given user
|
||||
|
||||
`PATCH /api/org/users/:userId`
|
||||
|
||||
@@ -185,7 +185,7 @@ Adds a global user to the actual organisation.
|
||||
{"message":"Organization user updated"}
|
||||
|
||||
|
||||
### Delete user in actual organisation
|
||||
## Delete user in actual organisation
|
||||
|
||||
`DELETE /api/org/users/:userId`
|
||||
|
||||
@@ -204,9 +204,9 @@ Adds a global user to the actual organisation.
|
||||
{"message":"User removed from organization"}
|
||||
|
||||
|
||||
## Organisations
|
||||
# Organisations
|
||||
|
||||
### Search all Organisations
|
||||
## Search all Organisations
|
||||
|
||||
`GET /api/orgs`
|
||||
|
||||
@@ -229,7 +229,7 @@ Adds a global user to the actual organisation.
|
||||
}
|
||||
]
|
||||
|
||||
### Update Organisation
|
||||
## Update Organisation
|
||||
|
||||
`PUT /api/orgs/:orgId`
|
||||
|
||||
@@ -254,7 +254,7 @@ Update Organisation, fields *Adress 1*, *Adress 2*, *City* are not implemented y
|
||||
|
||||
{"message":"Organization updated"}
|
||||
|
||||
### Get Users in Organisation
|
||||
## Get Users in Organisation
|
||||
|
||||
`GET /api/orgs/:orgId/users`
|
||||
|
||||
@@ -279,7 +279,7 @@ Update Organisation, fields *Adress 1*, *Adress 2*, *City* are not implemented y
|
||||
}
|
||||
]
|
||||
|
||||
### Add User in Organisation
|
||||
## Add User in Organisation
|
||||
|
||||
`POST /api/orgs/:orgId/users`
|
||||
|
||||
@@ -302,7 +302,7 @@ Update Organisation, fields *Adress 1*, *Adress 2*, *City* are not implemented y
|
||||
|
||||
{"message":"User added to organization"}
|
||||
|
||||
### Update Users in Organisation
|
||||
## Update Users in Organisation
|
||||
|
||||
`PATCH /api/orgs/:orgId/users/:userId`
|
||||
|
||||
@@ -324,7 +324,7 @@ Update Organisation, fields *Adress 1*, *Adress 2*, *City* are not implemented y
|
||||
|
||||
{"message":"Organization user updated"}
|
||||
|
||||
### Delete User in Organisation
|
||||
## Delete User in Organisation
|
||||
|
||||
`DELETE /api/orgs/:orgId/users/:userId`
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
----
|
||||
page_title: General APIs
|
||||
page_description: Grafana General API Reference
|
||||
page_title: Other APIs
|
||||
page_description: Grafana Other API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation, dashboards
|
||||
---
|
||||
|
||||
## Frontend Settings API
|
||||
# Frontend Settings API
|
||||
|
||||
### Get Settings
|
||||
## Get Settings
|
||||
|
||||
`GET /api/frontend/settings`
|
||||
|
||||
@@ -50,9 +50,9 @@ page_keywords: grafana, admin, http, api, documentation, dashboards
|
||||
"defaultDatasource": "Grafana"
|
||||
}
|
||||
|
||||
## Login API
|
||||
# Login API
|
||||
|
||||
### Renew session based on remember cookie
|
||||
## Renew session based on remember cookie
|
||||
|
||||
`GET /api/login/ping`
|
||||
|
||||
@@ -68,4 +68,4 @@ page_keywords: grafana, admin, http, api, documentation, dashboards
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
{"message": "Logged in"}
|
||||
{"message": "Logged in"}
|
||||
21
docs/sources/http_api/overview.md
Normal file
21
docs/sources/http_api/overview.md
Normal file
@@ -0,0 +1,21 @@
|
||||
----
|
||||
page_title: HTTP API
|
||||
page_description: Grafana HTTP API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation
|
||||
---
|
||||
|
||||
# HTTP API Reference
|
||||
|
||||
The Grafana backend exposes an HTTP API, the same API is used by the frontend to do everything from saving
|
||||
dashboards, creating users and updating data sources.
|
||||
|
||||
###Supported HTTP APIs:
|
||||
|
||||
* [Authentication API](/http_api/auth/)
|
||||
* [Dashboard API](/http_api/dashboard/)
|
||||
* [Data Source API](/http_api/data_source/)
|
||||
* [Organisation API](/http_api/org/)
|
||||
* [User API](/http_api/user/)
|
||||
* [Admin API](/http_api/admin/)
|
||||
* [Snapshot API](/http_api/snapshot/)
|
||||
* [Other API](/http_api/other/)
|
||||
@@ -1,12 +1,12 @@
|
||||
----
|
||||
page_title: Snapshots API
|
||||
page_description: Grafana Snapshots API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation, snapshots, dashboards
|
||||
page_title: Snapshot API
|
||||
page_description: Grafana Snapshot API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation, snapshot, dashboard
|
||||
---
|
||||
|
||||
## Snapshots API
|
||||
# Snapshot API
|
||||
|
||||
### Create new snapshot
|
||||
## Create new snapshot
|
||||
|
||||
`POST /api/snapshots`
|
||||
|
||||
@@ -63,7 +63,7 @@ Keys:
|
||||
- **deleteKey** – Key generated to delete the snapshot
|
||||
- **key** – Key generated to share the dashboard
|
||||
|
||||
### Get Snapshot by Id
|
||||
## Get Snapshot by Id
|
||||
|
||||
`GET /api/snapshots/:key`
|
||||
|
||||
@@ -118,7 +118,7 @@ Keys:
|
||||
}
|
||||
}
|
||||
|
||||
### Delete Snapshot by Id
|
||||
## Delete Snapshot by Id
|
||||
|
||||
`GET /api/snapshots-delete/:key`
|
||||
|
||||
@@ -134,4 +134,4 @@ Keys:
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
{"message":"Snapshot deleted. It might take an hour before it's cleared from a CDN cache."}
|
||||
{"message":"Snapshot deleted. It might take an hour before it's cleared from a CDN cache."}
|
||||
@@ -1,12 +1,12 @@
|
||||
----
|
||||
page_title: Users API
|
||||
page_description: Grafana Users API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation, users
|
||||
page_title: User API
|
||||
page_description: Grafana User API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation, user
|
||||
---
|
||||
|
||||
## Users API
|
||||
# User API
|
||||
|
||||
### Search Users
|
||||
## Search Users
|
||||
|
||||
`GET /api/users`
|
||||
|
||||
@@ -39,7 +39,7 @@ page_keywords: grafana, admin, http, api, documentation, users
|
||||
}
|
||||
]
|
||||
|
||||
### Get single user by Id
|
||||
## Get single user by Id
|
||||
|
||||
`GET /api/users/:id`
|
||||
|
||||
@@ -64,7 +64,7 @@ page_keywords: grafana, admin, http, api, documentation, users
|
||||
"isGrafanaAdmin": true
|
||||
}
|
||||
|
||||
### User Update
|
||||
## User Update
|
||||
|
||||
`PUT /api/users/:id`
|
||||
|
||||
@@ -90,7 +90,7 @@ page_keywords: grafana, admin, http, api, documentation, users
|
||||
{"message":"User updated"}
|
||||
|
||||
|
||||
### Get Organisations for user
|
||||
## Get Organisations for user
|
||||
|
||||
`GET /api/users/:id/orgs`
|
||||
|
||||
@@ -116,7 +116,7 @@ page_keywords: grafana, admin, http, api, documentation, users
|
||||
|
||||
## User
|
||||
|
||||
### Actual User
|
||||
## Actual User
|
||||
|
||||
`GET /api/user`
|
||||
|
||||
@@ -141,7 +141,7 @@ page_keywords: grafana, admin, http, api, documentation, users
|
||||
"isGrafanaAdmin":true
|
||||
}
|
||||
|
||||
### Change Password
|
||||
## Change Password
|
||||
|
||||
`PUT /api/user/password`
|
||||
|
||||
@@ -167,7 +167,7 @@ Changes the password for the user
|
||||
|
||||
{"message":"User password changed"}
|
||||
|
||||
### Switch user context
|
||||
## Switch user context
|
||||
|
||||
`POST /api/user/using/:organisationId`
|
||||
|
||||
@@ -187,7 +187,7 @@ Switch user context to the given organisation.
|
||||
|
||||
{"message":"Active organization changed"}
|
||||
|
||||
### Organisations of the actual User
|
||||
## Organisations of the actual User
|
||||
|
||||
`GET /api/user/orgs`
|
||||
|
||||
@@ -213,7 +213,7 @@ Return a list of all organisations of the current user.
|
||||
}
|
||||
]
|
||||
|
||||
### Star a dashboard
|
||||
## Star a dashboard
|
||||
|
||||
`POST /api/user/stars/dashboard/:dashboardId`
|
||||
|
||||
@@ -233,7 +233,7 @@ Stars the given Dashboard for the actual user.
|
||||
|
||||
{"message":"Dashboard starred!"}
|
||||
|
||||
### Unstar a dashboard
|
||||
## Unstar a dashboard
|
||||
|
||||
`DELETE /api/user/stars/dashboard/:dashboardId`
|
||||
|
||||
@@ -251,4 +251,4 @@ Deletes the starring of the given Dashboard for the actual user.
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
{"message":"Dashboard unstarred"}
|
||||
{"message":"Dashboard unstarred"}
|
||||
@@ -20,7 +20,7 @@ migrate to Grafana 2.0.
|
||||
## Adding Data sources
|
||||
|
||||
The `config.js` file has been deprecated. Data sources are now managed via
|
||||
the UI or [HTTP API](../http_api/first_steps.md). Manage your
|
||||
the UI or [HTTP API](../http_api/overview.md). Manage your
|
||||
organizations data sources by clicking on the `Data Sources` menu on the
|
||||
side menu (which can be toggled via the Grafana icon in the upper left
|
||||
of your browser).
|
||||
|
||||
Reference in New Issue
Block a user