Unable to run Foreman Hammer command wsgi python script from web server to Foreman

Problem: Unable to run Hammer command from Python script using webserver

**Expected outcome:**Hammer command should succeeed

Foreman and Proxy versions: 3.3.1

Foreman and Proxy plugin versions: 3.3.1

Distribution and version: EL7

Other relevant data:
[Tue Jul 25 00:57:30.816333 2023] [:error] [pid 33881] Command ‘/usr/bin/hammer --username test --password xxxxxxx --server https://foreman.example.com:443 host reboot --id test.example.com’ returned non-zero exit status 64.
[Tue Jul 25 00:57:30.816388 2023] [:error] [pid 33881] Warning: An error occured while loading module hammer_cli_foreman.
[Tue Jul 25 00:57:30.816393 2023] [:error] [pid 33881]
Could not load ‘.aprc’ from ENV[‘HOME’]: no implicit conversion of nil into String
Could not load ‘.aprc’ from ENV[‘HOME’]: no implicit conversion of nil into String
Could not load ‘.aprc’ from ENV[‘HOME’]: no implicit conversion of nil into String
Could not load ‘.aprc’ from ENV[‘HOME’]: no implicit conversion of nil into String
Could not load ‘.aprc’ from ENV[‘HOME’]: no implicit conversion of nil into String
Could not load ‘.aprc’ from ENV[‘HOME’]: no implicit conversion of nil into String
Error: Is a directory @ io_fread - /usr/share/httpd/.cache/apipie_bindings/https___foreman.example.com_443/v2/9b3804bac2c514a02c6f2c79c820ff130def9526.en.json
Error: No such sub-command ‘host’.