Child pages
  • WHM API 1 Functions - ticket_remove_closed
Skip to end of metadata
Go to start of metadata

Description

This function removes cPanel Support's SSH keys and removes closed support tickets. You can view closed support tickets in WHM's Grant cPanel Support Access interface ( WHM >> Home >> Support >> Grant cPanel Support Access ).

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/ticket_remove_closed?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/ticket_remove_closed?api.version=1
 Command Line
whmapi1 ticket_remove_closed

Unable to render {include} The included page could not be found.

 Output (JSON)
{
	"data": {
		"hulk_wl_status": "INACTIVE",
		"non_fatals": ["TICKET_SYSTEM_LOG_ENTRY", "TICKET_SYSTEM_LOG_ENTRY", "TICKET_SYSTEM_LOG_ENTRY", "TICKET_SYSTEM_LOG_ENTRY", "TICKET_SYSTEM_LOG_ENTRY", "TICKET_SYSTEM_LOG_ENTRY", "TICKET_SYSTEM_LOG_ENTRY", "TICKET_SYSTEM_LOG_ENTRY", "TICKET_SYSTEM_LOG_ENTRY"],
		"revoked_keys": 9,
		"host_access_wl_status": "INACTIVE",
		"chain_status": "INACTIVE"
	},
	"metadata": {
		"command": "ticket_remove_closed",
		"result": 1,
		"reason": "OK",
		"version": 1
	}
}
 Output (XML)
<result>
	<data>
		<hulk_wl_status>INACTIVE</hulk_wl_status>
		<non_fatals>TICKET_SYSTEM_LOG_ENTRY</non_fatals>
		<non_fatals>TICKET_SYSTEM_LOG_ENTRY</non_fatals>
		<non_fatals>TICKET_SYSTEM_LOG_ENTRY</non_fatals>
		<non_fatals>TICKET_SYSTEM_LOG_ENTRY</non_fatals>
		<non_fatals>TICKET_SYSTEM_LOG_ENTRY</non_fatals>
		<non_fatals>TICKET_SYSTEM_LOG_ENTRY</non_fatals>
		<non_fatals>TICKET_SYSTEM_LOG_ENTRY</non_fatals>
		<non_fatals>TICKET_SYSTEM_LOG_ENTRY</non_fatals>
		<non_fatals>TICKET_SYSTEM_LOG_ENTRY</non_fatals>
		<revoked_keys>9</revoked_keys>
		<host_access_wl_status>INACTIVE</host_access_wl_status>
		<chain_status>INACTIVE</chain_status>
	</data>
	<metadata>
		<command>ticket_remove_closed</command>
		<result>1</result>
		<reason>OK</reason>
		<version>1</version>
	</metadata>
</result>	


Note:

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

   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
revoked_keysintegerThe total number of SSH keys that the system removed.A positive integer.9

non_fatals

array

Any non-fatal errors.

  • ticket_system_log_entry The function could not record the grant operation in the ticket.

  • audit_log The function could not record the grant operation in the local audit log.

Note:

The system stores the local audit log in the /var/cpanel/logs/supportauth/audit.log  file.

TICKET_SYSTEM_LOG_ENTRY

chain_statusstring

The status of the iptables whitelist entries.

  • ACTIVEThe system added the appropriate whitelist entries, or they already existed.
  • INACTIVE The system successfully removed the whitelist entries, or they did not exist.
  • ERR_SETUP — The system failed to add the whitelist entries.
  • ERR_UNSETUP — The system failed to remove the whitelist entries.
  • ERR_UNKNOWN An unknown error occurred.
ACTIVE
csf_wl_statusstring

The status of the CSF whitelist entries.

Note:

If CSF does not exist on your server, the function will not display this return.

  • ACTIVEThe system added the appropriate whitelist entries or they already existed.
  • INACTIVE — The system successfully removed the whitelist entires, or they did not exist.
  • ERR_SETUP — The system failed to add the whitelist entries.
  • ERR_UNSETUP — The system failed to remove the whitelist entries.
  • ERR_UNKNOWN — An unknown error occurred.
ACTIVE
hulk_wl_statusstring

The status of the cPHulk whitelist entries.

  • ACTIVE — The system added the appropriate whitelist entries or they already existed.
  • INACTIVE — The whitelist entries were successfully removed or were already deleted.
  • ERR_SETUP — The system failed to add the whitelist entries.
  • ERR_UNSETUP — The system failed to remove the whitelist entries.
  • ERR_UNKNOWN — An unknown error occurred.
ACTIVE