Child pages
  • WHM API 1 Functions - get_update_availability
Skip to end of metadata
Go to start of metadata

 

Description

This function checks whether your server uses the latest version of cPanel & WHM for your release tier.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_update_availability?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_update_availability?api.version=1
 Command Line
whmapi1 get_update_availability


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{  
   "metadata":{  
      "command":"get_update_availability",
      "result":1,
      "version":1,
      "reason":"OK"
   },
   "data":{  
      "current_version":"56.0.12",
      "tier":"current",
      "update_available":0,
      "newest_version":"56.0.12"
   }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <result>1</result>
        <reason>OK</reason>
        <command>get_update_availability</command>
    </metadata>
    <data>
        <current_version>56.0.12</current_version>
        <update_available>0</update_available>
        <tier>current</tier>
        <newest_version>56.0.12</newest_version>
    </data>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

This function does not accept parameters.

 

Returns

ReturnTypeDescriptionPossible valuesExample
current_versionstringThe server's current version of cPanel & WHM.A valid cPanel & WHM version number.
56.0.12
update_availableBooleanWhether a new version of cPanel & WHM is available for the server's support tier.
  • 1 — Available
  • 0Not available.
0
tierstringThe server's support tier.
  • edge
  • current
  • release
  • stable
current
newest_versionstringThe available version of cPanel & WHM available for the server's support tier.A valid cPanel & WHM version number.
56.0.12