How to check existing VM ID using API?