API: Enable serving Swagger UI by default and add docs and guidelines (#63489)

* Enable serving Swagger UI by default

It used to be served behind the `swaggerUi` feature toggle.

* Remove `swaggerUi` feature toggle

* Add docs and guidelines for updating swagger

* Apply suggestions from code review

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
This commit is contained in:
Sofia PapagiannakiandJosh Hunt authored and GitHub committed 2023-03-01 16:36:37 +02:00
1 parent fbd049a094
commit 8aae7be4e5
8 files changed
+91 -15

No files matched your search

@@ -19,6 +19,12 @@ weight: 100
The Grafana backend exposes an HTTP API, which is the same API that is used by the frontend to do everything from saving
dashboards, creating users, and updating data sources.
Since version 8.4, HTTP API details are [specified](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/public/api-merged.json) using OpenAPI v2.
Starting from version 9.1, there is also a [OpenAPI v3 specification](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/public/openapi3.json) (generated by the v2 one).
Users can browser and try out both via the Swagger UI editor (served by the grafana server) by navigating to `/swagger-ui` and `/openapi3` respectively.
## HTTP APIs
- [Admin API]({{< relref "admin/" >}})