Get IP addr of VMs in Option Li

I need the IP address of all the VMs that have been provisioned to be listed on Catalogue Item input dropdown. I am able to get the hostname of the VMs listed on the input dropdown by using Morpheus API option in Option List. However, in my use case, I need the IP address and not the hostnames.
I tried using retrieving the IP address using REST in the Option List. However, that did not work out. How can I achieve this? Any help on this is much appreciated.
Thanks.
Vineeth.

Host endpoint returns externalIp, internalIp, please find the below API doc link.

Thanks for the prompt response, Senthil.
The link you shared retrieves the list of servers while I am looking for list of VMs. I got the enpoint for VMs and I even tried with that but to no avail.

I am specifically looking guidance on how to construct the REST call to retrieve ONLY the IP address of the VMs. I tried with the below request but I am getting “Bad request” error

https://CHANGE_ME/api/instances?max=25&offset=0&showDeleted=false&instances.connectionInfo[0].ip
Can you please help?

instance.connectionInfo as a parameter is not supported to list all instances as per the doc.
you can use details as parameter to list more information for instances.
https://changeme/api/instances?max=25&offset=0&showDeleted=false&details=true

I would suggest you create 2 option inputs, one with Morpheus API to list all instances, and based on the selected instance the other option inputs with REST will fetch all ips associated to the selected VM.
REST option URI : https://changeme/api/servers?name=vmname&max=25&offset=0

I have not tried that approach yet. I will give it a try and get back. Thanks!