Hi Shenal:
I hope you are fine.
It seems that the API error is caused because the "wazuh-analysisd" daemon is down. This might be caused to a bug. Could you first send me your Wazuh version?
For version older than 4.2.0:
# cat /var/ossec/etc/ossec-init.conf
For Wazuh 4.2.0 and higher versions:
# /var/ossec/bin/wazuh-control info
I hope this helps.
Thanks