> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get rule version test paths
> Generate deterministic test paths for one saved intent-rule version.
Returns the branch paths Fini can derive from one saved intent-rule version.
Use this route to build test coverage around each meaningful path through a
Rulebook tree before running path simulations.
<Info>
Test paths are generated from a version's `flowConfig`. They do not run the
rule or call tools. Use [Run rule version test path](/en/api-reference/run-rule-version-test-path)
to execute a generated path.
</Info>
## Headers
<ParamField header="Authorization" type="string" required>
Bearer token containing your Fini workspace API key. Format: `Bearer fini_...`
The key needs `read` scope.
</ParamField>
## Path parameters
<ParamField path="id" type="string" required>
Intent-rule ID.
</ParamField>
<ParamField path="versionId" type="string" required>
Rule version ID to inspect.
</ParamField>
## Response
Returns an array of rule test path objects.
<RequestExample>
~~~bash cURL theme={null}
curl --request GET \
--url 'https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/versions/rule-version-3/test-paths/public' \
--header 'Authorization: Bearer fini_your_api_key'
~~~
~~~javascript Node.js theme={null}
const ruleId = "4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3";
const versionId = "rule-version-3";
const response = await fetch(
`https://api-prod.usefini.com/v2/hc-rules/${ruleId}/versions/${versionId}/test-paths/public`,
{
method: "GET",
headers: {
Authorization: "Bearer fini_your_api_key",
},
}
);
const testPaths = await response.json();
~~~
~~~python Python theme={null}
import requests
rule_id = "4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3"
version_id = "rule-version-3"
response = requests.get(
f"https://api-prod.usefini.com/v2/hc-rules/{rule_id}/versions/{version_id}/test-paths/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
test_paths = response.json()
~~~
</RequestExample>
<ResponseExample>
~~~json 200 OK theme={null}
[
{
"id": "vip-refund-escalation",
"title": "VIP refund escalation",
"summary": "VIP refund requests reach the escalation reply node.",
"outcome": "reply",
"group": {
"id": "refunds",
"title": "Refund paths",
"summary": "Paths that handle refund requests.",
"pathCount": 2,
"nodeIds": ["root", "check_vip", "reply_escalate"]
},
"testContext": {
"inputContext": {
"message": {
"text": "I am a VIP customer and need a refund."
},
"user": {
"plan": "VIP"
}
},
"runtimeContext": {
"source": "zendesk",
"channel": "email"
},
"notes": ["Set user.plan to VIP so the VIP branch matches."]
},
"terminalNodeId": "reply_escalate",
"terminalNodeName": "Escalate refund",
"nodeIds": ["root", "check_vip", "reply_escalate"],
"steps": [
{
"nodeId": "root",
"nodeName": "Refund workflow",
"kind": "seq",
"label": "Start refund workflow",
"engineType": "SEQUENCE"
},
{
"nodeId": "check_vip",
"nodeName": "VIP customer",
"kind": "check",
"label": "Check user.plan equals VIP",
"engineType": "CONDITION"
},
{
"nodeId": "reply_escalate",
"nodeName": "Escalate refund",
"kind": "reply",
"label": "Send escalation reply",
"engineType": "ACTION",
"engineSubType": "SEND_MESSAGE"
}
],
"requirements": ["user.plan must equal VIP"],
"warnings": ["Path uses synthetic input context; review before saving as a regression test."]
}
]
~~~
</ResponseExample>
## Related topics
- [Overview](/en/api-reference/intent-rules.md)
- [Run rule version test path](/en/api-reference/run-rule-version-test-path.md)
- [Get intent-rule version](/en/api-reference/get-rule-version.md)
This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.
Intent Rules

