Change configuration programmatically

Hi

What are the options to programmatically change Octoprint configuration?

I'm using "Heater timeout" plugin, which works fine, but from time to time I need to enable heaters and leave then on for some extended testing / tuning. In these situations the plugin interferes as it switches heaters off after a while.

I was toying with the idea of a button (on navbar / in control tab / ...) to change the config of plugin (disable it).
It should be possible through API, but that seems like a roundabout way. Is there a more straightforward approach?

I was thinking of integrating buttons in "control.jinja2" and maybe using the $root, but I don't know what it supports ...

Any pointers pls?

Use the API. It's exactly what the UI uses as well.

Thx for info, i'll do that then.