- Created by Documentation, last modified on Oct 15, 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 lists all active and open support tickets from the cPanel Customer Portal.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/ticket_list?api.version=1&ticket_id=999999999&server_num=2
https://hostname.example.com:2087/cpsess##########/xml-api/ticket_list?api.version=1&ticket_id=999999999&server_num=2
whmapi1 ticket_list ticket_id=999999999 server_num=2
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
{ "metadata":{ "version":1, "result":1, "command":"ticket_list", "reason":"OK" }, "data":{ "auths": [ { "ticket_status": "UNKNOWN", "servers": [ { "ssh_username": "root", "server_num": "2", "auth_status": "AUTHED", "ssh": "10.11.12.13:22", "auth_time": 1400000000, "whm_ip": "10.11.12.13", "server_name": "My Server" } ], "ticket_subject": "Example ticket", "ticket_id": "9999999999999" } ] }
<result> <data> <auths> <ticket_status>CLOSED</ticket_status> <servers> <ssh_username>root</ssh_username> <server_num>2</server_num> <auth_status>EXPIRED</auth_status> <ssh>10.11.12.13:22</ssh> <auth_time>1400603945</auth_time> <whm_ip>10.11.12.13</whm_ip> <server_name>My Server</server_name> </servers> <ticket_id>999999999</ticket_id> </auths> </data> <metadata> <version>1</version> <reason>OK</reason> <result>1</result> <command>ticket_list</command> </metadata> </result>
Note:
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
ticket_id | integer | Required The ticket's ID number. | A valid positive integer. | 999999999 |
| integer | Required The server's ID number. | A valid positive integer. | 2 |
ssh_username | string | The username for incoming SSH connections before they escalate to the If you do not specify a value, the function will select the user from the ticket. | A valid username. | root |
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
auths | hash | A hash of the ticket authorization information. | This hash includes the ticket_status and returns and the servers hash. | |
| string | The ticket's status. The function returns this value in the |
|
|
| hash | A hash of server information. The function returns this hash in the | This hash includes the ssh_username , auth_status , auth_time , ticket_id , ssh , whm_ip , server_num , and server_name returns. | |
| string | The username for incoming SSH connections before they escalate to the The function returns this value in the | A valid username. | root |
| string | The installation status. The function returns this value in the |
| AUTHED |
| integer | When the grant happened. The function returns this value in the | A valid date in Unix time format. | 1400603208 |
| integer | The ticket's ID number. The function returns this value in the | A valid positive integer. | 999999999 |
| string | The server's IP address and port for SSH connections. The function returns this value in the | A valid IP address and port number. | 10.11.12.13:22 |
| string | The server's IP address for WHM connections. The function returns this value in the | A valid IP address. | 10.11.12.13 |
| integer | The server's ID number. The function returns this value in the The function returns this value in the | A valid positive integer. | 2 |
| string | The server's human-readable description. The function returns this value in the | A valid string from the cPanel Customer Portal. | My Server |
| integer | The ticket's ID number. The function returns this value in the | A valid positive integer. | 999999999 |
| array | Any non-fatal errors. |
Note: The system stores the local audit log in the | 2 |
Function information
API Version:
Available in:
WHM 11.44+
Methods:
GET, POST
Required Parameters:
ticket_id
, server_num
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 - ticket_ssh_test — This function verifies the connection from the cPanel Customer Portal to the server.
-
Page:WHM API 1 Functions - ticket_revoke — This function removes a cPanel Customer Portal SSH key from the server.
-
Page:WHM API 1 Functions - ticket_update_service_agreement_approval — This function records a user's acceptance of the Technical Support Agreement (TSA).
-
Page:WHM API 1 Functions - ticket_validate_oauth2_code — This function validates the OAuth2 code from the cPanel Customer Portal.
-
Page:WHM API 1 Functions - ticket_ssh_test_start — This function initiates an SSH connection test.