Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function retrieves the server's current version's cPanel & WHM Long-Term Support version number.

Warning:

We removed this function in cPanel & WHM version 68.

Examples 


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

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. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{  
   "metadata":{  
      "version":1,
      "reason":"OK",
      "command":"getlongtermsupport",
      "result":1
   },
   "data":{  
      "versions":[  
         {  
            "os":"DEFAULT",
            "version":"11.30"
         },
         {  
            "os":"centos",
            "version":"11.30"
         }
      ]
   }
}
 Output (XML)
<result>
    <metadata>
        <reason>OK</reason>
        <result>1</result>
        <version>1</version>
        <command>getlongtermsupport</command>
    </metadata>
    <data>
        <versions>
            <version>11.30</version>
            <os>DEFAULT</os>
        </versions>
        <versions>
            <version>11.30</version>
            <os>centos</os>
        </versions>
    </data>
</result>

Note:

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

   

Parameters

ParametersTypeDescriptionPossible valuesExample
allBoolean

Whether to include all versions and operating systems that receive Long Term Support.

This parameter defaults to 0.

  • 1 — Include all versions.
  • 0 — Include only current version.
0

 

 

Returns

ReturnTypeDescriptionPossible valuesExample
versionsarray of hashesAn array of hashes that contains information about each long term support version.This hash includes the os and version returns. 

os

string

The server's operating system.

The function returns this value in the versions array of hashes.

  • DEFAULT
  • amazon
  • centos
  • cloudlinux
  • redhat
  • rhel
centos

version

string

The cPanel & WHM version that receives Long Term Support.

The function returns this value in the versions array of hashes.

A version of cPanel & WHM.11.44