diff --git a/docs/sources/administration/api-keys/index.md b/docs/sources/administration/api-keys/index.md index d9f4fdf8653..2b9da4c533d 100644 --- a/docs/sources/administration/api-keys/index.md +++ b/docs/sources/administration/api-keys/index.md @@ -17,7 +17,7 @@ An API key is a randomly generated string that external systems use to interact When you create an API key, you specify a **Role** that determines the permissions associated with the API key. Role permissions control that actions the API key can perform on Grafana resources. -> **Note:** If you use Grafana v8.5 or newer, use service accounts instead of API keys. For more information, refer to [Grafana service accounts]({{< relref "../service-accounts/" >}}). +> **Note:** If you use Grafana v9.1 or newer, use service accounts instead of API keys. For more information, refer to [Grafana service accounts]({{< relref "../service-accounts/" >}}). {{< section >}} diff --git a/pkg/api/apikey.go b/pkg/api/apikey.go index fc48575ee50..ecd2b1e03a0 100644 --- a/pkg/api/apikey.go +++ b/pkg/api/apikey.go @@ -20,6 +20,11 @@ import ( // // Will return auth keys. // +// Deprecated: true. +// +// Deprecated. Please use GET /api/serviceaccounts and GET /api/serviceaccounts/{id}/tokens instead +// see https://grafana.com/docs/grafana/next/administration/api-keys/#migrate-api-keys-to-grafana-service-accounts-using-the-api. +// // Responses: // 200: getAPIkeyResponse // 401: unauthorisedError @@ -66,6 +71,10 @@ func (hs *HTTPServer) GetAPIKeys(c *contextmodel.ReqContext) response.Response { // // Delete API key. // +// Deletes an API key. +// Deprecated. See: https://grafana.com/docs/grafana/next/administration/api-keys/#migrate-api-keys-to-grafana-service-accounts-using-the-api. +// +// Deprecated: true // Responses: // 200: okResponse // 401: unauthorisedError @@ -99,6 +108,11 @@ func (hs *HTTPServer) DeleteAPIKey(c *contextmodel.ReqContext) response.Response // // Will return details of the created API key. // +// Deprecated: true +// Deprecated. Please use POST /api/serviceaccounts and POST /api/serviceaccounts/{id}/tokens +// +// see: https://grafana.com/docs/grafana/next/administration/api-keys/#migrate-api-keys-to-grafana-service-accounts-using-the-api. +// // Responses: // 200: postAPIkeyResponse // 400: badRequestError