Restful switch to Control klipper/moonraker GPIO

I have setup a GPIO led light for my printer using GPIO ,
I can turn the light off and on with macros

I want to turn the light into a devices in Home assistant

I should be able to set it up as a rest switch
https://moonraker.readthedocs.io/en/latest/web_api/#power-apis

but I can’t figure out how to do the templates

not sure where to begin

Start wit a rest switch

I ended up using the command_line switch. Sent in a curl command for off and on with a -H for the api key
the state command was also curl getting the template right took trail and error but now it works.