The "UnresolvableHostName" error you're encountering typically occurs when the hostname provided in the HTTP POST method cannot be resolved to an IP address. This is common when trying to access APIs on a local network from a cloud-based service like Power Virtual Agents. Here are a few steps and alternatives you can consider to resolve this issue:
- Use a Publicly Accessible Endpoint: Ensure that the API you are trying to access is publicly accessible. If it's on a local network, you might need to expose it to the internet using a public IP address or a domain name that can be resolved.
- Set Up a VPN: If exposing the API publicly is not an option, you can set up a VPN connection between your local network and the cloud service. This way, the cloud service can access the local network as if it were part of it.
- Use a Proxy Server: Another alternative is to use a proxy server that is accessible from both the local network and the cloud service. The proxy server can forward requests from the cloud service to the local API.
- Azure API Management: Consider using Azure API Management to expose your local API securely. Azure API Management can act as a gateway, allowing you to manage and secure your APIs while making them accessible from the cloud.
- Hybrid Connections: If you are using Azure, you can leverage Hybrid Connections to securely connect your on-premises resources to Azure services. This can help in resolving the hostname issue by providing a secure connection path.
- Check DNS Configuration: Ensure that the DNS configuration on your local network is set up correctly and that the hostname can be resolved internally. You might need to add the hostname to your local DNS server or hosts file.
If you continue to face issues, you might want to reach out to your network administrator or IT support team for further assistance. They can provide more detailed guidance based on your specific network setup.