mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 09:22:20 +08:00
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
|
||||
|
||||
See note in the [introduction]({{< ref "#authentication-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ---------------- | ----- |
|
||||
| `apikeys:create` | n/a |
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
POST /api/auth/keys HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
@ -114,14 +126,20 @@ Error statuses:
|
||||
**Required permissions**
|
||||
|
||||
See note in the [introduction]({{< ref "#authentication-api" >}}) for an explanation.
|
||||
|
||||
|
||||
| Action | Scope |
|
||||
| ---------------- | ---------- |
|
||||
Accept: application/json
|
||||
| `apikeys:delete` | apikeys:\* |
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
DELETE /api/auth/keys/3 HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
|
Reference in New Issue
Block a user