DNSTemplatesListRedirections

List DNS redirections within template.

Input

Parameter Value Example value
id DNS template ID
Retrieve with DNSListTemplates
Parameter is required
5400


Output

Parameter Value Example value
success command executed successfully 0 = fout
1 = command executed successfully
command_response_message Error
Only sent when value parameter success = 0
incorrect password
total_count Total records
Only sent when value parameter success = 1
20
id_X ID (nuermic).
The X runs from 1 to the value of total_count
Only sent when value parameter success = 1
45221
redirect_from_X Redirecten from.
The X runs from 1 to the value of total_count
Only sent when value parameter success = 1
subdomain.|DOMAIN|
redirect_to_X Redirect to.
The X runs from 1 to the value oftotal_count
Only sent when value parameter success = 1
http://www.redirectdomain.uk


Example

<? require("class_versio_api.php"); unset($command); $command = array( "command" => "DNSTemplatesListRedirections", "id" => "1" ); $api = new Versio_api(); $versio = $api->api_send( $command ); IF($versio['success']==0) { echo("Error occured. Error code: ".$versio['command_response_code'].". Error message: ".$versio['command_response_message'].""); } else { IF($versio['total_count']>0) { ?> <table> <? $teller = 1; while($versio['total_count']>=$teller) { ?> <tr> <td><? echo $versio['id_'.$teller]; ?></td> <td><? echo $versio['redirect_from_'.$teller]; ?></td> <td><? echo $versio['redirect_to_'.$teller]; ?></td> </tr> <? $teller++; } ?> </table> <? } else { echo("No DNS redirections found in template."); } } ?>