Hello,
I guess you are trying to connect to the Wazuh manager API, check this page of the documentation where we explain how to do it:
https://documentation.wazuh.com/current/user-manual/api/getting-started.html
And here you have the documentation reference about all the different calls allowed by the API:
https://documentation.wazuh.com/current/user-manual/api/reference.html
Note that the username and password indicated in /usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml are the credentials that will be used by the Wazuh dashboard to communicate with the Wazuh manager API changing the password there will not change the password in the API if you want to modify the credentials of the Wazuh manager API check this:
https://documentation.wazuh.com/current/user-manual/api/securing-api.html
Remember that if you change the credentials for the user wazuh-wui you need to reflect the changes in /usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml to avoid errors in Wazuh dashboard.