mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 07:12:09 +08:00
Service accounts: Update docs to mention about reverting token to API key (#52608)
* Service accounts: Update docs to mention about reverting token to API key * Update docs/sources/administration/api-keys/_index.md
This commit is contained in:
@ -110,8 +110,6 @@ Authorization: Basic YWRtaW46YWRtaW4=
|
||||
|
||||
`PATCH /api/serviceaccounts/:id`
|
||||
|
||||
## Update service account
|
||||
|
||||
**Required permissions**
|
||||
|
||||
See note in the [introduction]({{< ref "#service-account-api" >}}) for an explanation.
|
||||
@ -153,8 +151,6 @@ Content-Type: application/json
|
||||
| serviceaccounts:read | serviceaccounts:id:1 |
|
||||
|
||||
**Example Request**:
|
||||
|
||||
| Action | Scope |
|
||||
|
||||
```http
|
||||
GET /api/serviceaccounts/2/tokens HTTP/1.1
|
||||
@ -201,8 +197,6 @@ Authorization: Basic YWRtaW46YWRtaW4=
|
||||
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
## Delete service account tokens
|
||||
|
||||
`DELETE /api/serviceaccounts/:id/tokens/:tokenId`
|
||||
@ -225,8 +219,6 @@ Content-Type: application/json
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
@ -248,8 +240,6 @@ Content-Type: application/json
|
||||
| ---------------------- | ----- |
|
||||
| serviceaccounts:delete | n/a |
|
||||
|
||||
Requires basic authentication and that the authenticated user is a Grafana Admin.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
@ -295,8 +285,6 @@ Authorization: Basic YWRtaW46YWRtaW4=
|
||||
}
|
||||
```
|
||||
|
||||
Requires basic authentication and that the authenticated user is a Grafana Admin.
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
@ -331,8 +319,6 @@ Content-Type: application/json
|
||||
Authorization: Basic YWRtaW46YWRtaW4=
|
||||
```
|
||||
|
||||
Requires basic authentication and that the authenticated user is a Grafana Admin.
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
@ -343,3 +329,37 @@ Content-Type: application/json
|
||||
"message": "API key deleted"
|
||||
}
|
||||
```
|
||||
|
||||
## Revert service account token to API key
|
||||
|
||||
`DELETE /api/serviceaccounts/revert/:keyId`
|
||||
|
||||
This operation will delete the service account and create a legacy API Key for the given `keyId`.
|
||||
|
||||
**Required permissions**
|
||||
|
||||
See note in the [introduction]({{< ref "#service-account-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ---------------------- | ----- |
|
||||
| serviceaccounts:delete | n/a |
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
DELETE /api/serviceaccounts/revert/glsa_VVQjot0nijQ59lun6pMZRtsdBXxnFQ9M_77c34a79 HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Basic YWRtaW46YWRtaW4=
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"message": "Reverted service account to API key"
|
||||
}
|
||||
```
|
||||
|
Reference in New Issue
Block a user