mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
API keys: Add deprecation to api keys (#65948)
* add: deprecation to api keys write path * boolean w. meessage * add read and delete endpoints * better description of deprecation * updated with puncutations
This commit is contained in:
@@ -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 >}}
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user