The rest api documentation already contains usable examples: Rest Api — Hestia Control Panel documentation