From 984daee8bd55ba807842b647b0a352ce61919bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Mon, 31 Mar 2025 14:14:02 +0200 Subject: [PATCH] Add documentation for Supervisor /os/config/swap API (#2611) --- docs/api/supervisor/endpoints.md | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/api/supervisor/endpoints.md b/docs/api/supervisor/endpoints.md index 22c95c32..ac0a8519 100644 --- a/docs/api/supervisor/endpoints.md +++ b/docs/api/supervisor/endpoints.md @@ -2582,6 +2582,40 @@ Change the active boot slot, **This will also reboot the device!** + + +Get current HAOS swap configuration. Unavailable on Supervised. + +**Returned data:** + +| key | type | description | +|------------|--------|----------------------------------| +| swap_size | string | Current swap size. | +| swappiness | int | Current kernel swappiness value. | + +**Example response:** + +```json +{ + "swap_size": "2G", + "swappiness": 1 +} +``` + + + + + +Set HAOS swap configuration. Unavailable on Supervised. + +**Payload:** + +| key | type | description | +|------------|--------|--------------------------------------------------------------------------------------------| +| swap_size | string | New swap siz as number with optional units (K/M/G). Anything lower than 40K disables swap. | +| swappiness | int | New swappiness value (0-100). | + + Returns possible targets for the new data partition.