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:
co-authored by
Josh Hunt
parent
fbd049a094
commit
8aae7be4e5
@@ -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/" >}})
|
||||
|
||||
@@ -38,7 +38,6 @@ Some stable features are enabled by default. You can disable a stable feature by
|
||||
| `trimDefaults` | Use cue schema to remove values that will be applied automatically |
|
||||
| `panelTitleSearch` | Search for dashboards using panel title |
|
||||
| `prometheusAzureOverrideAudience` | Experimental. Allow override default AAD audience for Azure Prometheus endpoint |
|
||||
| `swaggerUi` | Serves swagger UI |
|
||||
| `migrationLocking` | Lock database during migrations |
|
||||
| `newDBLibrary` | Use jmoiron/sqlx rather than xorm for a few backend services |
|
||||
| `validateDashboardsOnSave` | Validate dashboard JSON POSTed to api/dashboards/db |
|
||||
|
||||
Reference in New Issue
Block a user