Not able to expose a local rest API through API connect on cloud
API Connect on Cloud : error
Created a Rest API in my laptop using IIS, and I want to expose it through API Connect on IBM Cloud. As 'Push Rest API' option in IIB Web Admin is not working, I used the swagger.json file to get the API details manually to APIC on Cloud. I followed the following steps
1) In IBM Cloud created resources for API Connect and Secure Gateway cloud foundry services
2) Created a Secure Gateway Destination and have the SG client running in my laptop
3) Created a simple Rest API using IIB V10 and deployed it to my local Integration Node.
4) Tried to push the Rest API using the IIB Web admin by giving host as "api.us-south.apiconnect.appdomain.cloud" and my IBM Cloud account username/pwd, but it failed saying unable to connect "Unable to connect to IBM API Connect at host 'api.us-south.apiconnect.appdomain.cloud' port '443'"
5) Then I tried to create an API manually using the swagger.json file available in the IIB RestAPI project. I used the option to create new API using "from file or URL" option in the APIC on IBM Cloud .
6) I gave my laptop ip as the 'Host' value in APIC designer
7) In the 'Assembly' I included a 'Proxy' policy and updated its Target URL to 'cap-sg-prd-2.securegateway.appdomain.cloud:17041'
8) When I try to test the above, I am getting the following error Internal Server Error Backside URL invalid
Can you please help to resolve it?
Internal Server Error Backside URL invalid
You're missing one or both of the following:
1) The "Target URL" must be a valid URL. Looks like you just entered a hostname, so likely you need
https://cap-sg-prd-2.securegateway.appdomain.cloud:17041 Doing that and republishing the API should resolve the "Backside URL invalid" error.
Once you do that, you may find that you still can't reach the backend due to either a timeout or connection refused error.
If so: 2) Did you allow access to the secure gateway destination via the client on your local machine? You have to intentionally set an ACL on the client to allow traffic to the host/port on your network.