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

 

Description

This function creates or updates a feature list.

Note:

A reseller must possess the Add/Remove Package feature to use this function.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/create_featurelist?api.version=1&featurelist=Arthur&webmail=1&changemx=1&overwrite=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/create_featurelist?api.version=1&featurelist=Arthur&webmail=1&changemx=1&overwrite=1
 Command Line
whmapi1 create_featurelist featurelist=Arthur webmail=1 changemx=1 overwrite=1


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/whmapi1

 Output (JSON)
{
    "data": {
        "featurelist": "Arthur"
    },
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": 1,
        "command": "create_featurelist"
    }
}
 Output (XML)
<result>
    <data>
        <featurelist>Arthur</featurelist>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>create_featurelist</command>
    </metadata>
</result>


Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExample
featureliststring

Required

The feature list's name.

A valid string.Arthur

feature name

Boolean

Whether to include a feature in the feature list.

Notes:

  • The parameter's name is a feature's name. For example, the changemx parameter is the Change Mail Exchanger feature.
  • You can install multiple features.

This parameter defaults to 0.

  • 1 — Install the feature.
  • 0 — Do not install the feature.
1
overwriteBoolean

Whether to overwrite an existing feature list.

This parameter defaults to 0.

  • 1 — Overwrite the feature list.
  • 0 — Do not overwrite the feature list.
1

Returns

ReturnTypeDescriptionPossible valuesExample
featureliststringThe feature list's name.A valid string.
Arthur