Reputation: 276
I'm using the REST API to control vSphere vCenter Server 6.5 and 6.7.
In order to distinguish the two, I found /rest/appliance/system/version
that is working on 6.5 (in fact GET returns correctly 6.5.xx).
The same path is not working on 6.7 (not found). Is there an equivalent?
Upvotes: 0
Views: 4814
Reputation: 1062
Another way to get current vCenter version for >= 8.0.1 is to:
GET https://$VC/sdk/vim25/8.0.1.0/ServiceInstance/ServiceInstance/content
with example response:
{
...
"about": {
...
"version": "8.0.3",
...
"apiVersion": "8.0.3.0",
...
"licenseProductVersion": "8.0"
},
}
Pros:
Cons:
I personally discovered this while trying to get the so-called release
schema (in this example 8.0.3.0
) - and I wish I was able to do that without requiring some schema first (8.0.1.0
), but oh well...
Source: https://developer.broadcom.com/xapis/virtual-infrastructure-json-api/latest/
Upvotes: 0
Reputation: 2121
It's operational on my system: (pulled from API Explorer)
Request URL
https://vcenter.fqdn/rest/appliance/system/version
Response Body
{
"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"
}
}
It's also still available in the API doc: 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
Upvotes: 2