fallshuang
fallshuang

Reputation: 23

How to get the version of CloudStack through the API?

I want to get the version of CloudStack through the API:

http://cloudstack.apache.org/docs/api/apidocs-4.4/TOC_Root_Admin.html

But I can't find any API command to get the CloudStack version. How can I do it?

Thank in advance.

Upvotes: 2

Views: 1460

Answers (1)

Miguel Ferreira
Miguel Ferreira

Reputation: 1417

The listCapabilities API command will give you the version number of CloudStack.

Assuming you are running the management server on localhost:

http://localhost:8096/client/api?response=json&command=listCapabilities

Result:

{ 
 "listcapabilitiesresponse" :  
  { 
   "capability" : 
    {
     "securitygroupsenabled":false,
     "cloudstackversion":"4.5.0-SNAPSHOT",
     "userpublictemplateenabled":true,
     "supportELB":"false",
     "projectinviterequired":false,
     "allowusercreateprojects":true,
     "customdiskofferingminsize":1,
     "customdiskofferingmaxsize":1024,
     "regionsecondaryenabled":false,
     "kvmsnapshotenabled":false
    }
  }
}

Upvotes: 3

Related Questions