mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 11:42:20 +08:00
Docs: Add deprecation notices for datasource endpoints (#49411)
* Update markdown * Update swagger
This commit is contained in:

committed by
GitHub

parent
01ef899753
commit
060af782df
@ -65,10 +65,12 @@ Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
```http
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
## Get a single data source by uid
|
||||
@ -121,7 +123,7 @@ Content-Type: application/json
|
||||
```http
|
||||
GET /api/datasources/name/test_datasource HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
@ -177,7 +179,7 @@ Content-Type: application/json
|
||||
| datasources:create | n/a |
|
||||
|
||||
### Examples
|
||||
|
||||
|
||||
**Example Graphite Request**:
|
||||
|
||||
```http
|
||||
@ -233,7 +235,7 @@ Content-Type: application/json
|
||||
> **Warning:** This API is deprecated since Grafana v9.0.0 and will be removed in a future release. Refer to the [new data source update API](#update-an-existing-data-source).
|
||||
|
||||
**Required permissions**
|
||||
|
||||
|
||||
See note in the [introduction]({{< ref "#data-source-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
@ -584,6 +586,8 @@ Content-Type: application/json
|
||||
| Code | Description |
|
||||
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 200 | All data source queries returned a successful response. |
|
||||
| 400 | Bad request due to invalid JSON, missing content type, missing or invalid fields, etc. Or one or more data source queries were unsuccessful. Refer to the body for more details. |
|
||||
| 403 | Access denied. |
|
||||
| 404 | Either the data source or plugin required to fulfil the request could not be found. |
|
||||
| 500 | Unexpected error. Refer to the body and/or server logs for more details. |
|
||||
|
||||
@ -612,7 +616,7 @@ Content-Type: application/json
|
||||
|
||||
JSON Body schema:
|
||||
|
||||
|
||||
- **from/to** – Specifies the time range for the queries. The time can be either epoch timestamps in milliseconds or relative using Grafana time units. For example, `now-5m`.
|
||||
- **queries.refId** – Specifies an identifier of the query. Defaults to "A".
|
||||
- **queries.format** – Specifies the format the data should be returned in. Valid options are `time_series` or `table` depending on the data source.
|
||||
- **queries.datasourceId** – Specifies the data source to be queried. Each `query` in the request must have a unique `datasourceId`.
|
||||
@ -682,11 +686,19 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
## Data source proxy calls
|
||||
## Data source proxy calls by id
|
||||
|
||||
> **Warning:** This API is deprecated since Grafana v9.0.0 and will be removed in a future release. Refer to the [new data source API for proxying requests](#data-source-proxy-calls).
|
||||
|
||||
`GET /api/datasources/proxy/:datasourceId/*`
|
||||
|
||||
Proxies all calls to the actual data source.
|
||||
Proxies all calls to the actual data source identified by the `datasourceId`.
|
||||
|
||||
## Data source proxy calls
|
||||
|
||||
`GET /api/datasources/proxy/uid/:uid/*`
|
||||
|
||||
Proxies all calls to the actual data source identified by the `uid`.
|
||||
|
||||
## Check data source health by id
|
||||
|
||||
@ -945,9 +957,9 @@ In addition, specific properties of each data source should be added in a reques
|
||||
|
||||
The following resources have been deprecated. They will be removed in a future release.
|
||||
|
||||
### Query a data source by ID
|
||||
### Query a data source by id
|
||||
|
||||
> **Warning:** This API is deprecated since Grafana v8.5.0 and will be removed in a future release. Refer to the [new data source query API](#query-a-data-source-by-id).
|
||||
> **Warning:** This API is deprecated since Grafana v8.5.0 and will be removed in a future release. Refer to the [new data source query API](#query-a-data-source).
|
||||
|
||||
Queries a data source having a backend implementation.
|
||||
|
||||
|
Reference in New Issue
Block a user