Files
Will Browne 4ecd57f49c Plugins: Introduce HTTP 207 Multi Status response to api/ds/query (#48550)
* feature toggles

* return HTTP 207 from ds/query

* add ft check

* add API test

* add 207 check for qr

* change to OR

* revert check

* add explicit toggle check for cloudwatch

* remove unused import

* remove from defaults.ini

* add status codes to md and update swagger

* new fangled http api tests pattern

* update swagger

* Update docs/sources/http_api/data_source.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* add missing word and reformat

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-05-03 18:02:20 +02:00

36 lines
893 B
Go

package definitions
import (
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana/pkg/api/dtos"
)
// swagger:route POST /ds/query ds queryMetricsWithExpressions
//
// Query metrics with expressions
//
// If you are running Grafana Enterprise and have Fine-grained access control enabled
// you need to have a permission with action: `datasources:query`.
//
// Responses:
// 200: queryDataResponse
// 207: queryDataResponse
// 401: unauthorisedError
// 400: badRequestError
// 403: forbiddenError
// 500: internalServerError
// swagger:parameters queryMetricsWithExpressions
type QueryMetricsWithExpressionsBodyParam struct {
// in:body
// required:true
Body dtos.MetricRequest `json:"body"`
}
// swagger:response queryDataResponse
type QueryDataResponseResponse struct {
// The response message
// in: body
Body *backend.QueryDataResponse `json:"body"`
}