SLO API
Get started with and use the SLO API to create, manage, and maintain your SLOs.
To use the SLO API, complete the following steps.
Create a Grafana service account token (/docs/grafana/latest/administration/service-accounts/) with Editor permissions.
Using any HTTP client like
curl
or HTTPie, make calls to the plugin’s resource API.- Make your API calls to the SLO resource API: {stackURL}/api/plugins/grafana-slo-app/resources/v1/slo
- Use “Authorization: Bearer $APITOKEN” and “Accept application/json” as request headers.
- The plugin uses GET to list all SLOs or read a specific one.
- DELETE to delete an individual SLO.
- POST to create an SLO.
- PUT to update an SLO.
For a full definition of the API, download this OpenAPIv3 specification.
Here is an example request body to create an SLO: