curl --request GET \
--url 'https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public' \
--header 'Authorization: Bearer fini_your_api_key'
const response = await fetch('https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public', {
method: 'GET',
headers: {
Authorization: 'Bearer fini_your_api_key'
}
});
const data = await response.json();
import requests
response = requests.get(
"https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
data = response.json()
[
{
"path": "interactionHistoryTranscript",
"dataType": "string",
"testValue": "User: Hi, I need help with my account"
},
{
"path": "formattedUserAttributes",
"dataType": "string",
"testValue": "Plan: Premium"
}
]
Business Rules
Get Business Rule test fields
Return the fields available for testing one saved Business Rule.
GET
/
v2
/
business-rules
/
{id}
/
test-fields
/
public
curl --request GET \
--url 'https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public' \
--header 'Authorization: Bearer fini_your_api_key'
const response = await fetch('https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public', {
method: 'GET',
headers: {
Authorization: 'Bearer fini_your_api_key'
}
});
const data = await response.json();
import requests
response = requests.get(
"https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
data = response.json()
[
{
"path": "interactionHistoryTranscript",
"dataType": "string",
"testValue": "User: Hi, I need help with my account"
},
{
"path": "formattedUserAttributes",
"dataType": "string",
"testValue": "Plan: Premium"
}
]
Returns the test fields Fini derives from one saved Business Rule. Use this to build a rule test form or validate which fields are required before running an evaluation.
Returns an array of test field definitions.
Headers
string
required
Bearer token containing your Fini workspace API key. Format:
Bearer fini_... The key needs read scope.Path parameters
string
required
Business Rule ID.
Response
curl --request GET \
--url 'https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public' \
--header 'Authorization: Bearer fini_your_api_key'
const response = await fetch('https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public', {
method: 'GET',
headers: {
Authorization: 'Bearer fini_your_api_key'
}
});
const data = await response.json();
import requests
response = requests.get(
"https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
data = response.json()
[
{
"path": "interactionHistoryTranscript",
"dataType": "string",
"testValue": "User: Hi, I need help with my account"
},
{
"path": "formattedUserAttributes",
"dataType": "string",
"testValue": "Plan: Premium"
}
]
Errors
401 Unauthorized
401 Unauthorized
The API key is missing, malformed, revoked, or invalid.
403 Forbidden
403 Forbidden
The API key does not include the
read scope required for this route.404 Not Found
404 Not Found
The Business Rule does not exist in your workspace.
Was this page helpful?

