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

 

Description

This function sets the default cPanel style.

Examples 

 


 

 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/set_default?api.version=1&type=default&name=mystyle
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/set_default?api.version=1&type=default&name=mystyle
 Command Line
whmapi1 set_default type=default name=mystyle


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)
{  
   "metadata":{  
      "result":1,
      "reason":"OK",
      "command":"set_default",
      "version":1
   }
}
 Output (XML)
<result>
    <metadata>
        <command>set_default</command>
        <version>1</version>
        <result>1</result>
        <reason>OK</reason>
    </metadata>
</result>


Note:

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

Parameters

ReturnTypeDescriptionPossible valuesExample
typestring

Required

The style's type.

  • default
  • global
  • reseller
  • user
default 
namestring

Required

The style's name.

  • base — The default Paper Lantern style.
  • retro — The Paper Lantern Retro style.
  • Another valid style name on the server.
mystyle

Returns

This function only returns metadata.