Reputation: 191
I am trying to detect the version of Bluemix/Cloud Foundry. Is there a command I can use to do this?
cf -version tells you the version of the commandline interface, but not the version of the server you are "push"ing to.
thanks
anthony
Upvotes: 7
Views: 1882
Reputation: 4964
You can get the version of CloudFoundry that Bluemix is running on via the CloudFoundry info endpoint.
US South Datacenter - https://api.ng.bluemix.net/info (currently 226 as of this posting)
EU UK Datacenter - https://api.eu-gb.bluemix.net/info (currently 226 as of this posting)
AP Datacenter - https://api.au-syd.bluemix.net/info (currently 226 as of this posting)
AP Datacenter - https://api.eu-de.bluemix.net/info (currently 226 as of this posting)
The build is the bit of JSON you want.
{
"name": "Bluemix",
"build": "226004",
"support": "http://ibm.com",
"version": 2,
"description": "IBM Bluemix",
"authorization_endpoint": "https://login.ng.bluemix.net/UAALoginServerWAR",
"token_endpoint": "https://uaa.ng.bluemix.net",
"allow_debug": true
}
Upvotes: 12
Reputation: 697
You can use the command cf curl /v2/info
to access Bluemix's Cloud Controller endpoint to get info about versions, etc. Here's the output I see at the moment:
$ cf curl /v2/info
{
"name": "Bluemix",
"build": "195008",
"support": "http://ibm.com",
"version": 2,
"description": "IBM Bluemix",
"authorization_endpoint": "https://login.ng.bluemix.net/UAALoginServerWAR",
"token_endpoint": "https://uaa.ng.bluemix.net",
"api_version": "2.19.0",
"logging_endpoint": "wss://loggregator.ng.bluemix.net:443",
"user": "<uuid>"
}
The build
property's first three characters map to the version of Cloud Foundry in use. In this case, version 195, which corresponds to the versioned API doc here: http://apidocs.cloudfoundry.org/195/
Upvotes: 12