getVariableRulesOfTemplate¶
Request Method: GET
Description: Retrieves the variables rules of a template. If the parameter link id is set then we will retrieve the rules variables with the current values applied to the link.
URL: https://api.iovox.com:444/Rules?v=3&method=getVariableRulesOfTemplate
The following parameters can be sent in the querystring
Parameter | Description | Default Value | Data Type | Mandatory |
v | API version to use | INTEGER | YES | |
page | The page number to return. Use together with limit to achieve paginated results | 1 | INTEGER | NO |
limit | Determines how many results to return. Use together with page to achieve paginated results. Maximum here is 5000 | 5000 | INTEGER | NO |
template_name | Returns the specified rule variables for the specific template name. | STRING | YES | |
link_id | Returns the rule variables for the specified Link ID | STRING | NO | |
output | Specifying XML or JSON returns data in XML or JSON format | XML | STRING | NO |
Result¶
Error Result¶
HTTP Code | Error String | Resolution |
400 | API Version Empty | Add a value for the v parameter in the query string |
400 | API Version Invalid | Correct v parameter |
400 | Request Method must be GET. x attempted | Switch request method x to GET |
400 | Template Name does not exist | Correct the Template Name parameter |
400 | Link ID Doesn't exist | Correct Link ID parameter |
400 | Output Type Invalid | Correct output parameter |
500 | Internal Server Error | Retry later |
Success Result¶
<?xml version="1.0" encoding="UTF-8"?>
<response>
<rules>
<rule>
<rule_id>1</rule_id>
<rule_type>play</rule_type>
<rule_label>Welcome</rule_label>
<sound_files>
<!-- Each sound file being sound group|sound label -->
<sound_file>?|?</sound_file>
</sound_files>
</rule>
<rule>
<rule_id>2</rule_id>
<rule_type>messageKeypress</rule_type>
<rule_label>Options</rule_label>
<play>
<sound_files>
<sound_file>?|?</sound_file>
<sound_file>?|?</sound_file>
</sound_files>
</play>
</rule>
<rule>
<rule_id>3</rule_id>
<rule_type>play</rule_type>
<rule_label>Play Option 1</rule_label>
<sound_files>
<sound_file>?|?</sound_file>
</sound_files>
</rule>
<rule>
<rule_id>4</rule_id>
<rule_type>call</rule_type>
<rule_label>Call</rule_label>
<record_call>FALSE</record_call>
<send_call_alert>NONE</send_call_alert>
<contact>
<contact_id>?</contact_id>
<phone_number>?</phone_number>
</contact>
<caller_message>
<sound_files>
<sound_file>?|?</sound_file>
</sound_files>
</caller_message>
<called_message>
<sound_files>
<sound_file>?|?</sound_file>
<sound_file>?|?</sound_file>
</sound_files>
</called_message>
</rule>
<rule>
<rule_id>5</rule_id>
<rule_type>failure</rule_type>
<rule_label>Call Failed</rule_label>
<failure_message>
<sound_files>
<sound_file>?|?</sound_file>
<sound_file>?|?</sound_file>
</sound_files>
</failure_message>
</rule>
<rule>
<rule_id>6</rule_id>
<rule_type>failure</rule_type>
<rule_label>Failure</rule_label>
<nokey_messages>
<sound_files>
<sound_file>?|?</sound_file>
</sound_files>
</nokey_messages>
<unmatched_messages>
<sound_files>
<sound_file>?|?</sound_file>
</sound_files>
</unmatched_messages>
</rule>
<rule>
<rule_id>7</rule_id>
<rule_type>play</rule_type>
<rule_label>Play Failure</rule_label>
<sound_files>
<sound_file>?|?</sound_file>
</sound_files>
</rule>
</rules>
</response>