mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: manage health settings using Coder API (#10861)
This commit is contained in:
Generated
+77
@@ -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
|
||||
|
||||
Generated
+29
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user