vmware vsphere rest api:如何获取版本

时间:2019-02-08 14:17:37

标签: rest api vmware vsphere

我正在使用REST Api控制vSphere vCenter Server 6.5和6.7 为了区分两者,我发现/ rest / appliance / system / version正在6.5上运行(实际上GET正确返回6.5.xx)。 相同路径在6.7上不起作用(未找到)。有等同吗?

谢谢 洛伦佐

1 个答案:

答案 0 :(得分:0)

它可以在我的系统上运行:(从API Explorer中提取)

请求URL

https://vcenter.fqdn/rest/appliance/system/version

响应正文

{
  "value": {
    "install_time": "2018-09-03T14:28:52 UTC",
    "summary": "Update for VMware vCenter Server Appliance 6.7.0",
    "product": "VMware vCenter Server Appliance",
    "build": "10244745",
    "releasedate": "October 16, 2018",
    "type": "vCenter Server with an embedded Platform Services Controller",
    "version": "6.7.0.20000"
  }

}

API文档https://vdc-download.vmware.com/vmwb-repository/dcr-public/423e512d-dda1-496f-9de3-851c28ca0814/0e3f6e0d-8d05-4f0c-887b-3d75d981bae5/VMware-vSphere-Automation-SDK-REST-6.7.0/docs/apidocs/operations/com/vmware/appliance/system/version.get-operation.html

中仍然可用