Docs: Settings updates at runtime (#34169)
* Docs: Settings updates on runtime docs skeleton * Docs: Settings HTTP API * Docs: Minor changes on settings updates at runtime docs * Docs: Settings updates at runtime description * Docs: Minor fix * Docs: Move PUT /api/admin/settings docs into Admin API page * Docs: Added longer explanation into 'Settings updates at runtime' page * Apply suggestions from code review Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> Co-authored-by: Leonard Gram <leo@xlson.com> * Docs: Include order of precedence description at settings updates page * Update docs/sources/http_api/admin.md * Docs: Add link to main configuration page from Settings updates at runtime * Apply suggestions from code review Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com> Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> Co-authored-by: Leonard Gram <leo@xlson.com> Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
This commit is contained in:
co-authored by
achatterjee-grafana
Leonard Gram
Mitch Seaman
parent
8278c7bf77
commit
886f6fc55b
@@ -14,7 +14,7 @@ must have the Grafana Admin permission. (The default admin user is called `admin
|
||||
> If you are running Grafana Enterprise and have [Fine-grained access control]({{< relref "../enterprise/access-control/_index.md" >}}) enabled, for some endpoints you would need to have relevant permissions.
|
||||
Refer to specific resources to understand what permissions are required.
|
||||
|
||||
## Settings
|
||||
## Fetch settings
|
||||
|
||||
`GET /api/admin/settings`
|
||||
|
||||
@@ -172,6 +172,57 @@ Content-Type: application/json
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Update settings
|
||||
|
||||
`PUT /api/admin/settings`
|
||||
|
||||
> **Note:** Available in Grafana Enterprise v8.0+.
|
||||
|
||||
Updates / removes and reloads database settings. You must provide either `updates`, `removals` or both.
|
||||
|
||||
This endpoint only supports changes to `auth.saml` configuration.
|
||||
|
||||
**Example request:**
|
||||
|
||||
```http
|
||||
PUT /api/admin/settings
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
{
|
||||
"updates": {
|
||||
"auth.saml": {
|
||||
"enabled": "true"
|
||||
}
|
||||
},
|
||||
"removals": {
|
||||
"auth.saml": ["single_logout"]
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
**Example response:**
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 32
|
||||
|
||||
{
|
||||
"message":"Settings updated"
|
||||
}
|
||||
```
|
||||
|
||||
Status codes:
|
||||
|
||||
- **200** - OK
|
||||
- **400** - Bad Request
|
||||
- **401** - Unauthorized
|
||||
- **403** - Forbidden
|
||||
- **500** - Internal Server Error
|
||||
|
||||
## Grafana Stats
|
||||
|
||||
`GET /api/admin/stats`
|
||||
|
||||
Reference in New Issue
Block a user