API queryZones problem after update to 4.8.0


After updating to 4.8.0. the queryZones API action is not working well. When it prints the $result[‘payload’] value, it gives back an empty array and to the $result[‘status’] gives a 0. I’m attaching my code which I have been able to use without any fail.

$action = 'queryZones';
$api_controller = '/nodeworx/dns/zone';
$input = array('domain' => $domain);
$params = array( 'apikey' => $key, 'ctrl_name' => $api_controller, 'action' => $action);
$client = new SoapClient( 'https://'.$api_domain.':2443/soap?wsdl' );
$result = $client->route( $key, $api_controller, $action, $input);

// Only to test

print_r($result['payload']); //print only Array ( ) 

//Default output
    foreach($result['payload'] as $result)
            echo $result->zone_id;

What can be the problem?


Hi Adam,

This is likely a bug - I’ll forward to a developer to get this looked at.

Thank You!

I am testing Soap now and I have problems too:
$api_controller = ‘/nodeworx/siteworx’;
$action = ‘listMasterDomains’;
$input = array();
$params = array( ‘apikey’ => $key,
‘ctrl_name’ => $api_controller,
‘action’ => $action,
‘input’ => $input );

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘https://myhost:2443/soap?wsdl’ : failed to load external entity “https://myhost:2443/soap?wsdl

SoapClient->SoapClient(‘https://myhost…’) #1 {main} thrown

Same error with API KEY access or main nodeworx account.
My Interworx is 4.8.1 last version.

sorry to respond to such an old issue, but I’ve been going through the forums today.

What do you see when you var_dump() the $result value that you get back from the API call? That is probably the best way to figure out what’s wrong.