Child pages
  • WHM API 1 Functions - get_lts_wexpire

Versions Compared

Key

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

Description

Excerpt

This function parses the /etc/cpanel/TIERS.json file and returns whether a branch qualifies for Long-Term Support (LTS).

 For more information about LTS, read our cPanel Long-Term Support documentation.

Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


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



Expand
titleXML API


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



Expand
titleCommand Line


Code Block
languagebash
whmapi1 get_lts_wexpire

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "branch":{  
      "11.69.9065":[  
         {  
            "build":"11.69.9065.0"
         }
      ],
      "11.69.9049":[  
         {  
            "build":"11.69.9049.6"
         }
      ],
      "11.67.9010":[  
         {  
            "build":"11.67.9010.9"
         }
      ],
...
      "11.71.9002":[  
         {  
            "build":"11.71.9002.0"
         }
      ]
   },
   "tiers":{  
      "11.62":[  
         {  
            "build":"11.62.0.35",
            "is_lts":1,
            "expires":1522454401
         }
      ],
      "11.64":[  
         {  
            "build":"11.64.0.42"
         }
      ],
      "11.66":[  
         {  
            "build":"11.66.0.34"
         }
      ],
      "11.68":[  
         {  
            "build":"11.68.0.19",
            "named":[  
               "release",
               "stable"
            ]
         },
         {  
            "build":"11.68.0.20",
            "named":[  
               "current",
               "edge"
            ]
         }
      ]
   }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<data>
   <branch>
      <11.56.9065>  
         <build>11.56.9065.0</build>
      </11.56.9065>  
      <11.58.9049>  
         <build>11.58.9049.6</build>
      </11.58.9049>  
      <11.60.9010>  
         <build>11.60.9010.9</build>
      </11.60.9010>  
      <11.62.9002>  
         <build>11.62.9002.0</build>
      </11.62.9002>  
   </branch>
   <name>tiers</name>
      <56>
         <build>11.56.0.35</build>
         <expires>1473112978</expires>
         <is_lts>0</is_lts>
         <named>CURRENT</named>
      </56>
      <58>
         <build>11.58.0.32</build>
         <expires>1474112978</expires>
         <is_lts>1</is_lts>
         <named>STABLE</named>
         <named>RELEASE</named>
      </58>
      <60>
         <build>11.60.0.10</build>
         <expires>1477112978</expires>
         <is_lts>0</is_lts>
         <named>EDGE</named>
      </60>
      <62>
         <build>11.61.9999.21</build>
         <expires>1477312978</expires>
         <is_lts>0</is_lts>
      </62>
   </name>
   <metadata>
      <command>get_lts_wexpire</command>
      <reason>OK</reason>
      <result>1</result>
      <version>1</version>
   </metadata> 
</data>   


Note
titleNote:

This API function does not return valid XML and may fail to load.


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible ValuesExample
branchhashA hash that lists information about available branch builds.This hash includes the versionnumber array of hashes.

versionnumber

array of hashes

An array of ashes that contains information about a build version.

Note
titleNote:

This return's name is the version number.

The function returns this value in the branch hash.

This array of hashes includes the build return.

build

string

The build version number.

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

A valid build version number.

11.60.0.35

tiers

hashA hash that lists information about build versions in release tiers.This hash includes the versionnumber array of hashes.

versionnumber

array of hashes

An array of hashes that contains information about a release version.

Note
titleNote:

This return's name is the version number.

The function returns this value in the tiers hash.

This array of hashes includes the is_lts, build, and expires returns and the named array.

 

is_lts

Boolean

Whether cPanel offers this version as LTS.

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

  • 1 — Long-term support.
  • 0 — No Long-term support.

0

named

array

The release tier or tiers which currently offer this branch, if applicable.

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

  • EDGE
  • CURRENT
  • RELEASE
  • STABLE
CURRENT

build

string

The build version number.

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

A valid build version number.

11.60.0.35

expires

integer

When cPanel, Inc. support for the build version expires.

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

A valid date, in Unix time format.

1473112978