1 of 1 people found this helpful
You will need to get an external IP for your GCP VM so that you can access it publicly.
https://<external-ip>/piwebapi is how i tried to access the api. This is giving me the following error:
This site can’t be reached
external-ip took too long to respond.
But tried http://<external-ip>. It works and displays a windows iis server page.
I am not familiar with networking part. Can you suggest what might i be doing wrong in accessing the pi web api.
Looks like some issue with Public ip address and private ip address in the cloud. Request you to check network settings if you are using google cloud(external IP Address and firewall rules : IP Addresses | Compute Engine Documentation | Google Cloud especially firewall rules : Firewall Rules Overview | VPC | Google Cloud )
Click Create firewall rule.
Enter a name for the rule, such as default-allow-http.
Under Source IP ranges, enter 0.0.0.0/0 to allow traffic from all sources.
Under Protocols and ports, check Specified protocols and ports and enter tcp:443
Create your firewall rule.