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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

 

Description

This function lists the authenticated user's feature lists.

Notes:

  • The root account returns all feature lists on the server.
  • Resellers only return feature lists that the account owns.

Examples 


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


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": {
        "features": {
            ...
            "postgres": "0",
            "popaccts": "1",
            ...
            "style": "0",
            "webmail": "1",
            ...
            "analog": "0",
            "changemx": "1",
            ...
        },
        "featurelist": "BoomBoomMancini"
    },
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": 1,
        "command": "read_featurelist"
    }
}
 Output (XML)
<result>
    <data>
        <features>
            ...
            <postgres>0</postgres>
            <popaccts>1</popaccts>
            ...
            <style>0</style>
            <webmail>1</webmail>
            ...
            <analog>0</analog>
            <changemx>1</changemx>
            ...
        </features>
 
        <featurelist>BoomBoomMancini</featurelist>  
    </data>
      
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>read_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

available_featurelists

string

Required

The feature list's name.

A valid string.default

Returns

ReturnTypeDescriptionPossible valuesExample
featureshashA hash of available features in the list.This hash includes the feature parameter. 

featurename

Boolean

Whether the feature exists in the feature list.

Note:

The feature name's is the return's name.

The function returns this value in the features hash.

  • 1 — The feature exists in the feature list.
  • 0 — The feature does not exist in the feature list.
1

featurelist

string

The feature list's name.

A valid string.BoomBoomMancini
  • No labels