Plugins: Remove deprecated /api/tsdb/query metrics endpoint (#49916) (#49996)

* remove /api/tsdb/query

* revert changes to alert rules

* regenerate spec based on 9.0.x

(cherry picked from commit abfc711c53)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2022-06-01 13:22:53 +02:00
committed by GitHub
co-authored by Will Browne
parent e58aac1b77
commit d344b69fbb
13 changed files with 869 additions and 546 deletions
-39
View File
@@ -3,7 +3,6 @@ package definitions
import (
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/tsdb/legacydata"
)
// swagger:route GET /datasources datasources getDatasources
@@ -334,29 +333,6 @@ import (
// 404: notFoundError
// 500: internalServerError
// swagger:route POST /tsdb/query datasources queryDatasource
//
// Query metrics.
//
// Please refer to [updated API](#/ds/queryMetricsWithExpressions) instead
//
// Queries a data source having backend implementation.
//
// Most of Grafana’s builtin data sources have backend implementation.
//
// If you are running Grafana Enterprise and have Fine-grained access control enabled
// you need to have a permission with action: `datasources:query`.
//
// Deprecated: true
//
// Responses:
// 200: queryDatasourceResponse
// 401: unauthorisedError
// 400: badRequestError
// 403: forbiddenError
// 404: notFoundError
// 500: internalServerError
// swagger:parameters updateDatasourceByID deleteDatasourceByID getDatasourceByID datasourceProxyGETcalls datasourceProxyPOSTcalls datasourceProxyDELETEcalls
// swagger:parameters enablePermissions disablePermissions getPermissions deletePermissions
// swagger:parameters checkDatasourceHealthByID fetchDatasourceResourcesByID
@@ -411,13 +387,6 @@ type UpdateDatasource struct {
Body models.UpdateDataSourceCommand
}
// swagger:parameters queryDatasource
type QueryDatasource struct {
// in:body
// required:true
Body dtos.MetricRequest
}
// swagger:response getDatasourcesResponse
type GetDatasourcesResponse struct {
// The response message
@@ -486,11 +455,3 @@ type DeleteDatasourceByNameResponse struct {
Message string `json:"message"`
} `json:"body"`
}
// swagger:response queryDatasourceResponse
type QueryDatasourceResponse struct {
// The response message
// in: body
//nolint: staticcheck // plugins.DataResponse deprecated
Body legacydata.DataResponse `json:"body"`
}