API Keys: Removal & Redirect of Create endpoint (#92144)
* API keys: redirecting of create endpont * update naming and using admonition * fmt * Apply suggestions from code review Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> --------- Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
@@ -29,6 +29,11 @@ If you use Grafana v9.1 or newer, use service accounts instead of API keys. For
|
||||
|
||||
## List API keys
|
||||
|
||||
{{% admonition type="warning" %}}
|
||||
This endpoint is deprecated.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
`GET /api/auth/keys`
|
||||
|
||||
**Required permissions**
|
||||
@@ -75,6 +80,13 @@ Content-Type: application/json
|
||||
|
||||
## Create API Key
|
||||
|
||||
{{% admonition type="warning" %}}
|
||||
This endpoint has been made obsolete in Grafana 11.3.0.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
Endpoint is obsolete and has been moved to [Grafana service account API]({{< relref "./serviceaccount/" >}}). For more information, refer to [Migrate to Grafana service account API]({{< relref "../../administration/api-keys/#migrate-api-keys-to-grafana-service-accounts-using-the-api" >}}).
|
||||
|
||||
`POST /api/auth/keys`
|
||||
|
||||
**Required permissions**
|
||||
@@ -114,14 +126,20 @@ Error statuses:
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
HTTP/1.1 301
|
||||
Content-Type: application/json
|
||||
|
||||
{"name":"mykey","key":"eyJrIjoiWHZiSWd3NzdCYUZnNUtibE9obUpESmE3bzJYNDRIc0UiLCJuIjoibXlrZXkiLCJpZCI6MX1=","id":1}
|
||||
""
|
||||
```
|
||||
|
||||
## Delete API Key
|
||||
|
||||
{{% admonition type="warning" %}}
|
||||
|
||||
### DEPRECATED
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
`DELETE /api/auth/keys/:id`
|
||||
|
||||
**Required permissions**
|
||||
|
||||
Reference in New Issue
Block a user