openapi: 3.2.0 info: description: '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.' title: Grafana HTTP API. Health API contact: name: Grafana Labs url: https://grafana.com email: hello@grafana.com version: 0.0.1 servers: - url: /api security: - basic: [] - api_key: [] tags: - name: Health paths: /datasources/uid/{uid}/health: get: tags: - Health summary: Sends a health check request to the plugin datasource identified by the UID operationId: checkDatasourceHealthWithUID parameters: - name: uid in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/okResponse' '400': $ref: '#/components/responses/badRequestError' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '500': $ref: '#/components/responses/internalServerError' /health: get: description: 'apiHealthHandler will return ok if Grafana''s web server is running and it can access the database. If the database cannot be accessed it will return http status code 503.' tags: - Health operationId: getHealth responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/healthResponse' '503': $ref: '#/components/responses/internalServerError' summary: Get health x-summary-source: derived components: responses: unauthorisedError: description: UnauthorizedError is returned when the request is not authenticated. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' internalServerError: description: InternalServerError is a general error indicating something went wrong internally. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' badRequestError: description: BadRequestError is returned when the request is invalid and it cannot be processed. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' okResponse: description: An OKResponse is returned if the request was successful. content: application/json: schema: $ref: '#/components/schemas/SuccessResponseBody' forbiddenError: description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' schemas: ErrorResponseBody: type: object required: - message properties: error: description: Error An optional detailed description of the actual error. Only included if running in developer mode. type: string message: description: a human readable version of the error type: string status: description: 'Status An optional status to denote the cause of the error. For example, a 412 Precondition Failed error may include additional information of why that error happened.' type: string healthResponse: type: object properties: apiserver: type: string commit: type: string database: type: string enterpriseCommit: type: string version: type: string SuccessResponseBody: type: object properties: message: type: string securitySchemes: api_key: type: apiKey name: Authorization in: header basic: type: http scheme: basic