Save alert thresholds
Changes the CPU, memory or disk threshold in the config file. Protection: token. Send the revision from Get config. A save changes only the fields you send. A running watch or alerts process reads thresholds when it starts, so restart_needed names the ones to restart.
Authorizations
The token you start the server with: homebutler serve --token <token>, or web.token in the config file. Send it as Authorization: Bearer <token>. When the server has a token, every /api/ route except the CORS preflight requires it, reads included.
Body
application/jsonThe revision from Get config.
The new CPU threshold in percent.
The new memory threshold in percent.
The new disk threshold in percent.
Response
200 · application/jsonThe thresholds were saved.
true.
The revision of the file as saved. Use it for the next save.
The processes that read this setting at start and need a restart to use it.
Things that are true about the save and worth knowing.