JSON data missing in Foreman hooks (Foreman v1.6.1 & Foreman hooks version 0.3.7)

Hello,
I am using the foreman hooks documentation
(GitHub - theforeman/foreman_hooks: Run custom hook scripts on Foreman events) and the example utility to
retrieve the data passed during the Host Create event. Apparently the JSON
data is not being passed into the foreman hooks and I am only getting
HOST_EVENT as the event name (i.e. create/destroy/etc.) and HOST_OBJECT as
the hostname of the machine.

Am I missing something in foreman_hooks. I have attached my hooks scripts
with this for your kind reference. Any pointer will be extremely useful. I
am attempting to edit a VM cloned from a template on VMware compute
resource through VMware api by invoking them in foreman hooks. I have a
script that can edit the VM but it would require the VM data as captured by
foreman during the host creation process from the UI (.e.g network
interface details, disks, etc.)

I have added some echo statements in the scripts to debug (output log file
also attached here)

autostart.sh (1.03 KB)

hook_functions.sh (734 Bytes)

hooks.log (85 Bytes)