We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

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

 

Description

This function sets a cPanel & WHM server to a specified support tier.

Examples 


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

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)
{  
   "data":{  
      "tier":"current"
   },
   "metadata":{  
      "reason":"Update tier successfully changed to current",
      "version":1,
      "result":1,
      "command":"set_tier"
   }
}
 Output (XML)
<result>
    <metadata>
        <command>set_tier</command>
        <version>1</version>
        <result>1</result>
        <reason>Update tier successfully changed to current</reason>
    </metadata>
    <data>
        <tier>current</tier>
    </data>
</result>


Note:

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

   

Parameters

ParameterTypeDescriptionPossible valuesExample

tier

string

Required

The support tier to use.

  • edge
  • current
  • release
  • stable
current

 

Returns

ReturnTypeDescriptionPossible valuesExample
tierstringThe server's new support tier.
  • edge
  • current
  • release
  • stable
current