Child pages
  • WHM API 1 Functions - set_tier
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.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/api/whmapi1

 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