- 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 the entries on the Greylisting Trusted Hosts list.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/read_cpgreylist_trusted_hosts?api.version=1
https://hostname.example.com:2087/cpsess##########/xml-api/read_cpgreylist_trusted_hosts?api.version=1
whmapi1 read_cpgreylist_trusted_hosts
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": { "greylist_trusted_hosts": [ { "comment": null, "create_time": "2015-02-17 13:52:23", "id": 7, "host_ip": "2.3.4.5" }, { "comment": "Example", "create_time": "2015-03-24 10:22:38", "id": 19, "host_ip": "10.10.10.1" } ] }, "metadata": { "version": 1, "reason": "OK", "result": 1, "command": "read_cpgreylist_trusted_hosts" } }
<result> <data> <greylist_trusted_hosts> <comment/> <create_time>2015-02-17 13:52:23</create_time> <id>7</id> <host_ip>2.3.4.5</host_ip> </greylist_trusted_hosts> <greylist_trusted_hosts> <comment>Example</comment> <create_time>2015-03-24 10:22:38</create_time> <id>19</id> <host_ip>10.10.10.1</host_ip> </greylist_trusted_hosts> </data> <metadata> <version>1</version> <reason>OK</reason> <result>1</result> <command>read_cpgreylist_trusted_hosts</command> </metadata> </result>
Note:
Parameters
This function does not accept parameters.
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
greylist_trusted_hosts | array of hashes | An array of hashes that contains identification information for the trusted hosts. | An array of hashes that each contain the comment , create_time , id , and host_ip returns. | |
| string | The IP address's comment. The function returns this value in the | A valid string with a maximum length of 255 characters. | Example |
| string | The date and time when the system added the IP address to the Trusted Hosts list. The function returns this value in the | The date and time in
| 2015-03-24 10:22:38 |
| integer | The identification number that the system assigned to the IP address. The function returns this value in the | A valid integer. | 19 |
| string | The IP address of the host that the system added to the Trusted Hosts list. The function returns this value in the | A valid IP address. | 10.10.10.1 |
Function information
API Version:
Available in:
WHM 11.50+
Methods:
GET, POST
Required Parameters:
(none)
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 - cpgreylist_is_server_netblock_trusted — This function returns the Greylisting trusted status of the server's netblock.
-
Page:WHM API 1 Functions - cpgreylist_status — This function returns the status of Greylisting.
-
Page:WHM API 1 Functions - create_cpgreylist_trusted_host — This function adds an IP address to the Greylisting Trusted Hosts list.
-
Page:WHM API 1 Functions - delete_cpgreylist_trusted_host — This function deletes an IP address from the Greylisting Trusted Hosts list.
-
Page:WHM API 1 Functions - disable_cpgreylist — This function disables Greylisting.