- Created by Documentation, last modified on Apr 09, 2018
disable_authentication_provider
disable_failing_authentication_providers
enable_authentication_provider
get_available_authentication_providers
get_provider_client_configurations
get_provider_configuration_fields
get_provider_display_configurations
get_users_authn_linked_accounts
set_provider_client_configurations
set_provider_display_configurations
twofactorauth_generate_tfa_config
twofactorauth_get_user_configs
cpgreylist_is_server_netblock_trusted
cpgreylist_list_entries_for_common_mail_provider
cpgreylist_load_common_mail_providers_config
cpgreylist_save_common_mail_providers_config
cpgreylist_trust_entries_for_common_mail_provider
cpgreylist_untrust_entries_for_common_mail_provider
create_cpgreylist_trusted_host
delete_cpgreylist_trusted_host
Description
This function retrieves a hosting plan's package extension templates.
_PACKAGE_EXTENSIONS
value. The function returns the contents of the /var/cpanel/packages/extensions/name.tt2
file for each package extension in the list, where name
represents the package extension's name.
For more information, read our Guide to Package Extensions.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/_getpkgextensionform?api.version=1&pkg=package1
https://hostname.example.com:2087/cpsess##########/xml-api/_getpkgextensionform?api.version=1&pkg=package1
whmapi1 _getpkgextensionform pkg=package1
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
{ "data":{ "html":"<div class="fatBorder" id="dog_Extension">\n<fieldset class="groupEditor">\n<div class="propertyGroup">\n<h3>Dog Settings</h3>\n<div class="propertyEditor">\n <div class="propertyLabel">Dog Species</div>\n <div class="propertyValue"><input id="dog_species" type="text" name="dog_species" value="dalmatian"></div>\n</div>\n\n<div class="propertyEditor">\n <div class="propertyLabel">Tail Length</div>\n <div class="propertyValue">\n <input type="radio" id="dogTailLengthTiny" name="dog_tail_length" value="tiny">\n <label for="dogTailLengthTiny">Tiny</label><br>\n <input type="radio" id="dogTailLengthNormal" name="dog_tail_length" value="normal">\n <label for="dogTailLengthNormal">Normal</label><br>\n <input type="radio" id="dogTailLengthLong" name="dog_tail_length" value="long">\n <label for="dogTailLengthLong">Long</label>\n </div>\n</div>\n\n<div class="propertyEditor">\n <div class="propertyLabel"><label for="dog_spots">Has Spots</label></div>\n <div class="propertyValue">\n <input id="dog_spots" type="checkbox" name="dog_spots" value="y" checked="checked">\n </div>\n</div>\n\n</div>\n</fieldset>\n</div>\n" }, "metadata":{ "version":1, "reason":"OK", "result":1, "command":"_getpkgextensionform" } }
<result> <data> <html> <div class="fatBorder" id="dog_Extension"> <fieldset class="groupEditor"> <div class="propertyGroup"> <h3>Dog Settings</h3> <div class="propertyEditor"> <div class="propertyLabel">Dog Species</div> <div class="propertyValue"><input id="dog_species" type="text" name="dog_species" value="dalmatian"></div> </div> <div class="propertyEditor"> <div class="propertyLabel">Tail Length</div> <div class="propertyValue"> <input type="radio" id="dogTailLengthTiny" name="dog_tail_length" value="tiny"> <label for="dogTailLengthTiny">Tiny</label><br> <input type="radio" id="dogTailLengthNormal" name="dog_tail_length" value="normal"> <label for="dogTailLengthNormal">Normal</label><br> <input type="radio" id="dogTailLengthLong" name="dog_tail_length" value="long"> <label for="dogTailLengthLong">Long</label> </div> </div> <div class="propertyEditor"> <div class="propertyLabel"><label for="dog_spots">Has Spots</label></div> <div class="propertyValue"> <input id="dog_spots" type="checkbox" name="dog_spots" value="y" checked="checked"> </div> </div> </div> </fieldset> </div> </html> </data> <metadata> <version>1</version> <reason>OK</reason> <result>1</result> <command>_getpkgextensionform</command> </metadata> </result>
Note:
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
pkg | string | Required The hosting plan's name. | A valid hosting plan name on the server. | package1 |
Returns
Note:
This function returns only metadata if the hosting plan does not use package extensions, or if the extensions' template files are empty.
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
html | string | The source code for the hosting plan's extensions' templates. | HTML and Template Toolkit code for one or more package extension forms. | Click to view... <div class="fatBorder" id="dog_Extension"> <fieldset class="groupEditor"> <div class="propertyGroup"> <h3>Dog Settings</h3> <div class="propertyEditor"> <div class="propertyLabel">Dog Species</div> <div class="propertyValue"><input id="dog_species" type="text" name="dog_species" value="dalmatian"></div> </div> <div class="propertyEditor"> <div class="propertyLabel">Tail Length</div> <div class="propertyValue"> <input type="radio" id="dogTailLengthTiny" name="dog_tail_length" value="tiny"> <label for="dogTailLengthTiny">Tiny</label><br> <input type="radio" id="dogTailLengthNormal" name="dog_tail_length" value="normal"> <label for="dogTailLengthNormal">Normal</label><br> <input type="radio" id="dogTailLengthLong" name="dog_tail_length" value="long"> <label for="dogTailLengthLong">Long</label> </div> </div> <div class="propertyEditor"> <div class="propertyLabel"><label for="dog_spots">Has Spots</label></div> <div class="propertyValue"> <input id="dog_spots" type="checkbox" name="dog_spots" value="y" checked="checked"> </div> </div> </div> </fieldset> </div> |
Function information
API Version:
Available in:
WHM 11.40+
Methods:
GET, POST
Required Parameters:
pkg
Return Formats:
About WHM API 1
WHM API 1 performs functions and accesses data in WHM.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 1 Functions - changepackage — This function changes a cPanel account's hosting plan (package).
-
Page:WHM API 1 Functions - killpkg — This function deletes a hosting plan (package).
-
Page:WHM API 1 Functions - _getpkgextensionform — This function retrieves a hosting plan's package extension templates.
-
Page:WHM API 1 Sections - Packages — Package functions allow you to manage hosting plans for resellers and cPanel users.
-
Page:WHM API 1 Functions - addpkgext — This function adds a package extension to a hosting plan (package).