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_available_applications
Skip to end of metadata
Go to start of metadata

Description

This function returns the contents of a dynamicui file. For more information, read our Guide to WHM dynamicui Files documentation.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_available_applications?api.version=1&file=dynamicui.conf&applications_list=create_support_ticket
 Command Line
whmapi1 get_available_applications file=dynamicui.conf applications_list=create_support_ticket


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)



{
	"metadata": {
		"reason": "OK",
		"version": 1,
		"command": "get_available_applications",
		"result": 1
	},
	"data":

	{
		"groups": [{
			"file": "support.png",
			"grouporder": 2,
			"imgtype": "icon",
			"groupdesc": "$LANG{'Support'}",
			"type": "image",
			"searchtext": "support",
			"subtype": "img",
			"group": "support",
			"dnsonly_ok": "dns",
			"items": [{
				"acl": "ACL=all",
				"file": "create_support_ticket.png",
				"type": "image",
				"imgtype": "icon",
				"subitems": [],
				"subtype": "img",
				"searchtext": "support create support ticket",
				"itemdesc": "$LANG{'Create Support Ticket'}",
				"dnsonly_ok": "dns",
				"url": "/scripts7/create_support_ticket",
				"itemorder": 2,
				"group": "support"
			}]
		}]
	}
}




Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExample

file

string

The dynamicui file to retrieve.

This parameter defaults to dynamicui.conf.

  • dynamicui.conf
  • A custom dynamicui filename.
dynamicui.conf
applications_liststring

A list of the application entries to return.

If you do not specify a value, the function returns the entire dynamicui.conf file.

A comma-separated list of application names.

To determine the application's name, find its file value in the dynamicui.conf file, and then remove the file extension.

create_support_ticket

Returns

ReturnTypeDescriptionPossible valuesExample
groupsarray of hashesAn array of hashes of the dynamicui file's contents.A valid hash of dynamicui data.