You can use the REST API to retrieve all the details of a VM.
To send REST API calls to Compute Classic, you need a valid authentication token. If you obtained a token less than 30 minutes ago, then you can use that token. Otherwise, get a new token as described in Get an Authentication Token.