mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 06:02:25 +08:00

* API: Using go-swagger for extracting OpenAPI specification from source code * Merge Grafana Alerting spec * Include enterprise endpoints (if enabled) * Serve SwaggerUI under feature flag * Fix building dev docker images * Configure swaggerUI * Add missing json tags Co-authored-by: Ying WANG <ying.wang@grafana.com> Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
35 lines
867 B
Go
35 lines
867 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
|
|
// 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"`
|
|
}
|