<main>
<article class="userContent">
<p>This page gives an example to fetch match count of Action Rules, Routing Rules and SLA Rules.</p><h2 data-id="rule-types">Rule Types</h2><p><code class="code codeInline" spellcheck="false" tabindex="0">ACTION_RULE_MATCH_COUNT</code> <code class="code codeInline" spellcheck="false" tabindex="0">ROUTING_RULE_MATCH_COUNT</code> <code class="code codeInline" spellcheck="false" tabindex="0">SLA_1_RULE_MATCH_COUNT</code> <code class="code codeInline" spellcheck="false" tabindex="0">SLA_2_RULE_MATCH_COUNT</code> <code class="code codeInline" spellcheck="false" tabindex="0">SLA_1_RULE_MISS_COUNT</code> <code class="code codeInline" spellcheck="false" tabindex="0">SLA_2_RULE_MISS_COUNT</code></p><h2 data-id="fetch">Fetch</h2><p>This API call returns a aggregated object of rule matches <a href="https://developers.chatvisor.com/#operation/getUsingPOST_5" rel="nofollow noreferrer ugc">https://developers.chatvisor.com/#operation/getUsingPOST_5</a></p><p>Request</p><p>Request with Filter</p><p>Response</p><pre class="code codeBlock" spellcheck="false" tabindex="0">POST https://api.chatvisor.com/rest/v1/report/rule/?access_token=<TOKEN>
BODY:
{
"metrics": [
{
"metricName": "ACTION_RULE_MATCH_COUNT"
}
],
"dateFilter": {
"grouping": "TODAY"
}
}
</pre><p>The ID of a rule can be found in the backend of TeamViewer Engage within the details of the Action Rules/SLA rules... menu.</p>
</article>
</main>