Replace the policy (server.manage)
Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication
/api/v1/tenants/{tid}/autoheal-policyReplace the policy (server.manage)
Authentication: session cookie __Host-panel_session (contract default; see Authentication).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tid | path | string | required | |
X-CSRF-Token | header | string | optional | Required on unsafe requests authenticated by session cookie; API keys do not use it. |
Request body
required
Content type: application/json
What the panel does by itself with overloads (ADR 0091, 0092)
site_modestring requiredAllowed values:"off""throttle""recycle""both"internal_modestring optionalThe same for sites without a plan, the provider's own and a reseller's own (ADR 0122); absent is both
Allowed values:"off""throttle""recycle""both"cpu_percentinteger required- minimum 10
- maximum 100
memory_mbinteger required- minimum 128
- maximum 65536
queue_activeinteger requiredRequests waiting with none served in the minute
- minimum 1
- maximum 10000
minutesinteger required- minimum 2
- maximum 60
throttle_percentinteger required- minimum 5
- maximum 90
recover_minutesinteger required- minimum 2
- maximum 120
cooldown_minutesinteger required- minimum 1
- maximum 120
max_per_hourinteger required- minimum 1
- maximum 20
servicesobject requiredcpu_percentinteger required10-100, 0 no check
memory_mbinteger required64-262144, 0 no check
minutesinteger required- minimum 2
- maximum 120
actionstring requiredAllowed values:"alert""restart"
Fields of AutoHealServiceRule are shown above.
Fields of AutoHealServiceRule are shown above.
Example
{
"site_mode": "off",
"internal_mode": "off",
"cpu_percent": 10,
"memory_mb": 128,
"queue_active": 1,
"minutes": 2,
"throttle_percent": 5,
"recover_minutes": 2,
"cooldown_minutes": 1,
"max_per_hour": 1,
"services": {
"database": {
"cpu_percent": 0,
"memory_mb": 0,
"minutes": 2,
"action": "alert"
},
"app": {
"cpu_percent": 0,
"memory_mb": 0,
"minutes": 2,
"action": "alert"
},
"cache": {
"cpu_percent": 0,
"memory_mb": 0,
"minutes": 2,
"action": "alert"
}
}
}Responses
200 Saved
Content type: application/json
What the panel does by itself with overloads (ADR 0091, 0092)
Fields of AutoHealPolicy are shown above.
Example
{
"site_mode": "off",
"internal_mode": "off",
"cpu_percent": 10,
"memory_mb": 128,
"queue_active": 1,
"minutes": 2,
"throttle_percent": 5,
"recover_minutes": 2,
"cooldown_minutes": 1,
"max_per_hour": 1,
"services": {
"database": {
"cpu_percent": 0,
"memory_mb": 0,
"minutes": 2,
"action": "alert"
},
"app": {
"cpu_percent": 0,
"memory_mb": 0,
"minutes": 2,
"action": "alert"
},
"cache": {
"cpu_percent": 0,
"memory_mb": 0,
"minutes": 2,
"action": "alert"
}
}
}default Error
Content type: application/json
codestring requiredmessagestring requireddetails_redactedboolean requiredcorrelation_idstring requiredretryableboolean required