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

 

Description

This function deletes a cPanel style.

Important:

This function cannot delete cPanel-provided styles. 

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/remove_style?api.version=1&type=reseller&name=mystyle
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/remove_style?api.version=1&type=reseller&name=mystyle
 Command Line
whmapi1 remove_style type=reseller 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. 

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

  • global

    Important:

    Only the root user can delete system-wide (global) styles.

  • reseller
  • user

Remember:

This function cannot delete cPanel-provided (default) styles. 

reseller
namestring

Required

The style's name.

A valid style name on the server.

Remember:

This function cannot delete cPanel-provided (base or retro) styles.

mystyle

Returns

This function only returns metadata.