Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function verifies the connection from the cPanel Customer Portal to the server.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/ticket_ssh_test?api.version=1&ticket_id=999999999&server_num=2
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/ticket_ssh_test?api.version=1&ticket_id=999999999&server_num=2
 Command Line
whmapi1 ticket_ssh_test 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. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
    "metadata": {
        "reason": "OK",
        "version": 1,
        "command": "ticket_ssh_test",
        "result": 1
    },
    "data": {
        "non_fatals": [],
        "result": "SUCCESS"
    }
}
 Output (XML)
<result>
 <metadata>
  <version>1</version>
  <result>1</result>
  <reason>OK</reason>
  <command>ticket_ssh_test</command>
 </metadata>
 <data>
  <result>TIMEOUT</result>
 </data>
</result>


Note:

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

   

Parameters

ParameterTypeDescriptionPossible valuesExample
ticket_idinteger

Required

The ticket's ID number.

A valid positive integer.999999999

server_num

integer

Required

The server's ID number.

A valid positive integer.

2

Returns

ReturnTypeDescriptionPossible valuesExample
resultstringThe SSH test's result.A valid string.SUCCESS

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.

2