Hello @ANIRUDH TPVS ,
You can find the links to requested REST APIs below:
To create or update a security rule in the specified network security group. which can be used to enable ports 80 and 443 along with inbound rules:
https://learn.microsoft.com/en-us/rest/api/virtualnetwork/securityrules/createorupdate
To get the network interface ip configuration of a VM:
https://learn.microsoft.com/en-us/rest/api/virtualnetwork/networkinterfaceipconfigurations/get
To get the public IP address of a VM in a specified resource group:
https://learn.microsoft.com/en-us/rest/api/virtualnetwork/publicipaddresses/get
Kindly let us know if the above helps or you need further assistance on this issue.
----------------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.