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

Description

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.

Examples


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


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)
{  
   "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"
            ]
         }
      ]
   }
}
 Output (XML)
<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:

$body


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

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:

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