We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

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:

  • Unless otherwise noted, 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": "Mail Only",
		"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>
		<featurelist>Mail Only</featurelist>
        <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
featureliststringThe feature list's name.An existing feature list name.Mail Only

features

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 by the disabled feature list.

Note:

  • The disabled feature list does not use this return.
  • Users on your server can't access disabled features. For more information, read our Feature Manager documentation

This function returns this value in the feature array.

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

value

Boolean

Whether the feature list includes the feature.

This function returns this value in the feature array.

  • 1 — The feature list includes this feature.
  • 0 — The feature list does not include this feature.

Important:

The disabled feature list uses the opposite logic for this return.

  • 1 — The disabled feature list does not include this feature.
  • 0 — The disabled feature list includes this feature.
1

id

string

The feature's ID.

This function returns this value in the feature array.

A valid feature name.email_trace