feat: manage health settings using Coder API (#10861)

This commit is contained in:
Marcin Tojek
2023-11-28 18:15:17 +01:00
committed by GitHub
parent 452668c893
commit 19b6d194fc
20 changed files with 603 additions and 4 deletions
+77
View File
@@ -298,6 +298,83 @@ curl -X GET http://coder-server:8080/api/v2/debug/health \
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get health settings
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/debug/health/settings \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /debug/health/settings`
### Example responses
> 200 Response
```json
{
"dismissed_healthchecks": ["string"]
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------ |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.HealthSettings](schemas.md#codersdkhealthsettings) |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Update health settings
### Code samples
```shell
# Example request using curl
curl -X PUT http://coder-server:8080/api/v2/debug/health/settings \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`PUT /debug/health/settings`
> Body parameter
```json
{
"dismissed_healthchecks": ["string"]
}
```
### Parameters
| Name | In | Type | Required | Description |
| ------ | ---- | ------------------------------------------------------------------------ | -------- | ---------------------- |
| `body` | body | [codersdk.UpdateHealthSettings](schemas.md#codersdkupdatehealthsettings) | true | Update health settings |
### Example responses
> 200 Response
```json
{
"dismissed_healthchecks": ["string"]
}
```
### Responses
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.UpdateHealthSettings](schemas.md#codersdkupdatehealthsettings) |
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Debug Info Tailnet
### Code samples
+29
View File
@@ -3166,6 +3166,20 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
| `user` |
| `oidc` |
## codersdk.HealthSettings
```json
{
"dismissed_healthchecks": ["string"]
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------------------ | --------------- | -------- | ------------ | ----------- |
| `dismissed_healthchecks` | array of string | false | | |
## codersdk.Healthcheck
```json
@@ -4162,6 +4176,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
| `group` |
| `license` |
| `convert_login` |
| `health_settings` |
| `workspace_proxy` |
| `organization` |
@@ -5158,6 +5173,20 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
| `url` | string | false | | URL to download the latest release of Coder. |
| `version` | string | false | | Version is the semantic version for the latest release of Coder. |
## codersdk.UpdateHealthSettings
```json
{
"dismissed_healthchecks": ["string"]
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------------------ | --------------- | -------- | ------------ | ----------- |
| `dismissed_healthchecks` | array of string | false | | |
## codersdk.UpdateRoles
```json