API: Add service account routes to the swagger (#52398)

* API: Add service account routes to the swagger
This commit is contained in:
Sofia Papagiannaki
2022-07-19 12:52:51 +03:00
committed by GitHub
parent a0f96ed4e1
commit e6b9ded949
9 changed files with 1772 additions and 69 deletions

View File

@ -115,7 +115,7 @@ Requires basic authentication and that the authenticated user is a Grafana Admin
`PATCH /api/serviceaccounts/:id`
**Required permissions**
See note in the [introduction]({{< ref "#service-account-api" >}}) for an explanation.
| Action | Scope |
@ -140,9 +140,9 @@ Content-Type: application/json
HTTP/1.1 200
Content-Type: application/json
```
---
```
---
## Service account tokens
@ -183,14 +183,14 @@ Content-Type: application/json
**Required permissions**
See note in the [introduction]({{< ref "#service-account-api" >}}) for an explanation.
| Action | Scope |
See note in the [introduction]({{< ref "#service-account-api" >}}) for an explanation.
| Action | Scope |
| --------------------- | -------------------- |
| serviceaccounts:write | serviceaccounts:id:1 |
**Example Request**:
```http
POST /api/serviceaccounts/2/tokens HTTP/1.1
Accept: application/json
@ -235,9 +235,9 @@ Content-Type: application/json
**Example Response**:
```http
HTTP/1.1 200
Content-Type: application/json
HTTP/1.1 200
Content-Type: application/json
```
**Example Request**:
@ -277,9 +277,9 @@ Content-Type: application/json
See note in the [introduction]({{< ref "#service-account-api" >}}) for an explanation.
| Action | Scope |
| --------------------- | ------------------ |
| serviceaccounts:write | serviceaccounts:\* |
| Action | Scope |
| --------------------- | -------------------- |
| serviceaccounts:write | serviceaccounts:id:1 |
**Example Request**:
@ -318,9 +318,9 @@ Content-Type: application/json
See note in the [introduction]({{< ref "#service-account-api" >}}) for an explanation.
| Action | Scope |
| --------------------- | ------------------ |
| serviceaccounts:write | serviceaccounts:\* |
| Action | Scope |
| --------------------- | -------------------- |
| serviceaccounts:write | serviceaccounts:id:1 |
**Example Request**: