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

Description

This function lists the details of the authenticated user's available feature lists.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_feature_metadata?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_feature_metadata?api.version=1
 Command Line
whmapi1 get_feature_metadata


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

 Output (JSON)
{
  "data": {
    "features": [
      {
        "is_plugin": "0",
        "name": "Site Software",
        "id": "addoncgi",
        "is_cpaddon": "0"
      },
      {
        "is_plugin": "0",
        "name": "Addon Domain Manager",
        "id": "addondomains",
        "is_cpaddon": "0"
      },
	...
    ]
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "get_feature_metadata"
  }
}
 Output (XML)
<result>
    <data>
        <features>
            <is_plugin>0</is_plugin>
            <name>Site Software</name>
            <id>addoncgi</id>
            <is_cpaddon>0</is_cpaddon>
        </features>
        <features>
            <is_plugin>0</is_plugin>
            <name>Addon Domain Manager</name>
            <id>addondomains</id>
            <is_cpaddon>0</is_cpaddon>
        </features>
	...
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>get_feature_metadata</command>
    </metadata>
</result>


Note:

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

Parameters

This function does not accept parameters. 

Returns

ReturnTypeDescriptionPossible valuesExample
featuresarray of hashesAn array of hashes of each feature's information.

This array includes hashes of feature information. Each hash includes the is_plugin, name, id, and is_cpaddon returns.

 

is_plugin

Boolean

Whether the feature is a plugin.

The function returns this value in the features array.

  • 1 — Plugin.
  • 0Not a plugin.
0

name

string

The feature's name.

This function returns this value in the feature array.

A valid string.Addon Domain Manager

id

string

The feature's ID.

This function returns this value in the feature array.

A valid feature name.addondomains

is_cpaddon

Boolean

Whether the feature is a cPAddon.

The function returns this value in the features array.

  • 1 — cPAddon.
  • 0Not a cPAddon.
0