(APM API) Where to find "hostid" for create custom monitor?

(APM API) Where to find "hostid" for create custom monitor?

According to the guide in AddMonitor APIs - Custom Monitors

If my target is a remote server which already *discover* (by OpManager). I can provide the "hostid" value of that server for the parameter of "choosehost".
The support of Manageengine also told me the parameter of "username" and "password" can be skip too if I provide the credential ID.

As there is no example for this scenario. How can I achieve that ?
1. The target windows server was discovered in OpManager. Where to find its "hostid"?
2. The discovery credential (WMI) was added in OpManager. Where to find its "credential ID"?
3. If I provide the "credential ID". Which parameter should I place the ID. "username" or "password"?

                New to ADManager Plus?

                  New to ADSelfService Plus?