When you set a host profile to be used via the API while also setting reboot to true, the host will not reboot. That requires a second API call in order to execute the reboot
In vCenter 7 and above, you can apply host profiles at the host, cluster, datacenter, or even vCenter level.
Setting the reboot section relating to an ESXi host does not automatically trigger a reboot
You will need to first apply the host profile, then trigger the reboot in a separate API call