Child pages
  • WHM API 1 Functions - getlongtermsupport

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

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


Warning
titleWarning:

We removed this function in cPanel & WHM version 68.


Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


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



Expand
titleXML API


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



Expand
titleCommand Line


Code Block
languagebash
whmapi1 getlongtermsupport all=0

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


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



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<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>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


   

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