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

Description


This function lists features in a specific feature list.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_featurelist_data?api.version=1&featurelist=Mail%20Only
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_featurelist_data?api.version=1&featurelist=Mail%20Only
 Command Line
whmapi1 get_featurelist_data featurelist="Mail Only"


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": {
    "features": [
      {
        "is_disabled": "0",
        "value": "0",
        "id": "sslmanager"
      },
      {
        "is_disabled": "0",
        "value": "1",
        "id": "emailtrace"
      },
      ...
    ]
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "getfeaturelist"
  }
}
 Output (XML)
<result>
    <data>
        <features>
            <is_disabled>0</is_disabled>
            <value>0</value>
            <id>sslmanager</id>
        </features>
        <features>
            <is_disabled>0</is_disabled>
            <value>1</value>
            <id>emailtrace</id>
        </features>
		...
        <featurelist>Mail Only</featurelist>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>get_featurelist_data</command>
    </metadata>
</result>


Note:

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

Parameters

ReturnTypeDescriptionPossible valuesExample

featurelist

string

Required

The feature list for which to list information.

An existing feature list name.Mail Only

Returns

ReturnTypeDescriptionPossible valuesExample

feature

array of hashes

An array of hashes of feature information.

This array includes hashes of feature information. Each hash includes the is_disabled, value, and id returns. 

is_disabled

Boolean

Whether the feature is disabled.

This function returns this value in the feature array.

  • 1 — Disabled.
  • 0 — Not disabled.
0

value

Boolean

Whether the feature is turned on.

This function returns this value in the feature array.

  • 1 — On.
  • 0 — Off.
1

id

string

The feature's ID.

This function returns this value in the feature array.

A valid feature name.email_trace