Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation

Retrieve a List of Features — getfeaturelist

This function is only available in version 11.27/11.28+.

This function will retrieve a list of available features.

Calling Functions

Using the XML API

To use the XML API to perform the getfeaturelist function from within your custom script:

  • Append the /xml-api/getfeaturelist function call name, plus the required variables (see below), to a URL which includes the address of your server.

  • For example, on a server whose hostname is example.com, you would include the following string in your script: https://example.com:2087/xml-api/getfeaturelist

  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.

  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.

Using the JSON API

To use the JSON API to perform the getfeaturelist function from within your custom script:

  • Append the /json-api/getfeaturelist function call name, plus the required variables (see below), to a URL which includes the address of your server.

  • For example, on a server whose hostname is example.com, you would include the following string in your script: https://example.com:2087/json-api/getfeaturelist

  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.

  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.

Variables

Input

This function does not take any input parameters.

Output

  • getfeaturelist — The getfeaturelist results container.
  • feature — The feature container.
  • name (string) — The name of a feature.
  • id (string) — The unique ID of a feature.

Examples

XML API

Calling this URL in WebHost Manager:

https://example.com:2087/xml-api/getfeaturelist

will produce output similar to:

<getfeaturelist>
   <feature>
      <name>Install Perl Modules</name>
      <id>modules-perl</id>
   </feature>
   <feature>
      <name>Install PHP Pear Modules</name>
      <id>modules-php-pear</id>
   </feature>
   <feature>
      <name>Agora Shopping Cart</name>
      <id>agora</id>
   </feature>
   <feature>
      <name>BoxTrapper Spam Trap</name>
      <id>boxtrapper</id>
   </feature>
   <feature>
      <name>Forwarder Manager</name>
      <id>forwarders</id>
   </feature>
   <feature>
      <name>Redirect Manager</name>
      <id>redirects</id>
   </feature>
   <feature>
      <name>Analog Stats</name>
      <id>analog</id>
   </feature>
   <feature>
      <name>Webalizer Stats</name>
      <id>webalizer</id>
   </feature>
   <feature>
      <name>Server Status Viewer</name>
      <id>serverstatus</id>
   </feature>
   <feature>
      <name>Email Filtering Manager</name>
      <id>blockers</id>
   </feature>
</getfeaturelist>

JSON API

Calling this URL in WebHost Manager:

https://example.com:2087/json-api/getfeaturelist

will produce output similar to:

{
      "feature":[
         {
            "id":"modules-perl",
            "name":"Install Perl Modules"
         },
         {
            "id":"modules-php-pear",
            "name":"Install PHP Pear Modules"
         },
         {
            "id":"agora",
            "name":"Agora Shopping Cart"
         },
         {
            "id":"boxtrapper",
            "name":"BoxTrapper Spam Trap"
         },
         {
            "id":"fantastico",
            "name":"Fantastico"
         }
      ]
   }

Topic revision: r7 - 08 Nov 2010 - 22:30:58 - Main.JustinSchaefer
AllDocumentation/AutomationIntegration.XmlGetFeatureList moved from Sandbox.XmlGetFeatureList on 02 Sep 2010 - 19:23 by Main.JustinSchaefer