解决了

无法从V2 / V3 API检索CVM

  • 2021年7月6日
  • 1回复
  • 161意见

最近,我们一直在探索一些与Nutanix Prism元素从V1 API接口到V3的代码,并且我们正在从API的V2或V3中检索CVM的问题。

查看: / vms / call v1 api的响应,我们将收到10个总条目,其中包括我们的CVM:

V1 VMS API结果
V1 VMS CVM结果

但是,当我们对版本2或3进行等效的API调用时,我们只接收9个条目,结果集不包含CVM:

V2 VMS API结果
V3 VMS API结果

搜索API文档后,没有什么立即作为获得CVM的适当端点而脱颖而出。我的问题是,使用V3或V2 API时如何检索CVM?

图标

最好的答案Nupur.Sakhalkar2021年7月7日,17:23

@Lucas Anderson<\/user-mention>\u00a0Unfortunately getting CVM\u00a0info via v2\/v3 rest API \/vms\/ call is not implemented as of yet and that\u2019s the reason as to why you are unable to retrieve CVM info from these API calls. Currently, only guest user VMs can be retrieved from the v2\/v3 vms\/ API call. Our ENG team is currently working on getting this feature added\u00a0in v2\/v3 API calls but it is not implemented till now.\u00a0<\/p>","className":"post__content__best_answer"}">
查看原件

该主题已关闭以供评论

1回复

UserLevel 3
徽章 +5

@Lucas Anderson不幸的是,尚未实现通过V2/V3 REST API/VMS/呼叫获取CVM信息,这就是为什么您无法从这些API呼叫中检索CVM信息的原因。当前,只能从V2/ V3 VMS/ API调用中检索访客用户VM。我们的ENG团队目前正在努力在V2/V3 API呼叫中添加此功能,但直到现在才实现。

Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu