- 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
Introduction
You can use additional variables to sort WHM API 1 output.
Notes:
You can test WHM API 1 functions in WHM's API Shell interface (Home >> Development >> API Shell). Click Show Sort/Filter/Paginate Options to display the additional text boxes.
Sort output
WHM API 1 sorting uses four basic variables:
Variable | Type | Description | Possible values |
---|---|---|---|
api.sort.enable | Boolean | Whether to enable sorting. |
|
api.sort.a.field | string | The return to sort by. | The name of one of the function's returns. |
api.sort.a.method | string | The type of sorting to use. This variable defaults to Warning: You must set this parameter whenever you sort numeric values, or the function will fail. |
|
api.sort.a.reverse | Boolean | Whether to sort data in reverse order. This parameter defaults to |
|
Examples
The following example function calls execute the listaccts
function and sort the output by the user
parameter:
/json-api/listaccts?api.version=1&api.sort.a.field=user&api.sort.enable=1
/xml-api/listaccts?api.version=1&api.sort.a.field=user&api.sort.enable=1
whmapi1 listsuspended api.sort.enable=1 api.sort.field=owner
Use multiple sort parameters
To sort output by multiple parameters in a single WHM API 1 call, increment the letter in each filter variable.
For example, use the following variables to pass two sets of sort information:
- Pass the first set of sort information to the
api.sort.a.field
,api.sort.a.method
, andapi.sort.a.reverse
variables. - Pass the second set of sort information to the
api.sort.b.field
,api.sort.b.method
, andapi.sort.b.reverse
variables.
Notes:
- Do not include more than one
api.sort.enable
Boolean variable. - The order of sort parameters determines the order in which WHM API 1 uses them to sort output. For example, the system applies the sort criteria from the
api.sort.a.field
parameter before it applies the criteria from theapi.sort.b.field
parameter.
Examples
The following example function calls execute the listsuspended
function and sort the results by the owner
parameter's value, and then by the user
parameter's value:
/json-api/listsuspended?api.version=1&api.sort.a.field=owner&api.sort.b.field=user&api.sort.enable=1
/xml-api/listsuspended?api.version=1&api.sort.a.field=owner&api.sort.b.field=user&api.sort.enable=1
whmapi1 listsuspended api.sort.enable=1 api.sort.field=owner api.sort.b.field=user
WHM API 1 Basics
Available in:
WHM 11+
Languages:
JSON, XML
Methods:
GET, POST
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.
Related Documentation
-
Page:WHM API 1 Functions - list_configclusterservers — This function lists the servers in the server's configuration cluster.
-
Page:WHM API 1 Functions - update_configclusterserver — This function updates the username or remote access key for a cluster server.
-
Page:WHM API 1 Functions - delete_configclusterserver — This function removes a server from a configuration cluster.
-
Page:WHM API 1 Functions - add_configclusterserver — This function adds a server to a configuration cluster.
-
Page:WHM API 1 Functions - abort_transfer_session — This function aborts an active transfer session.