Description

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


We removed this function in cPanel & WHM version 68.


Examples 




https://hostname.example.com:2087/cpsess##########/json-api/getlongtermsupport?api.version=1&all=0




https://hostname.example.com:2087/cpsess##########/xml-api/getlongtermsupport?api.version=1&all=0




whmapi1 getlongtermsupport all=0



{  
   "metadata":{  
      "version":1,
      "reason":"OK",
      "command":"getlongtermsupport",
      "result":1
   },
   "data":{  
      "versions":[  
         {  
            "os":"DEFAULT",
            "version":"11.30"
         },
         {  
            "os":"centos",
            "version":"11.30"
         }
      ]
   }
}




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



   

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