Search code examples
apache-cloudstack

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.


Solution

  • 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
        }
      }
    }