curl --request GET \
--url 'https://api-prod.usefini.com/v2/hc-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/hc-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/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
data = response.json()
{
"contextFields": [
{
"path": "message.text",
"dataType": "string"
},
{
"path": "user.email",
"dataType": "string"
}
],
"operatorTypes": [
"==",
"!=",
"contains"
],
"quantifierTypes": [
"ANY",
"ALL",
"NONE"
]
}
Rules
Get rule test fields
Return the fields available for testing one saved rule.
GET
/
v2
/
hc-rules
/
{id}
/
test-fields
/
public
curl --request GET \
--url 'https://api-prod.usefini.com/v2/hc-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/hc-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/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
data = response.json()
{
"contextFields": [
{
"path": "message.text",
"dataType": "string"
},
{
"path": "user.email",
"dataType": "string"
}
],
"operatorTypes": [
"==",
"!=",
"contains"
],
"quantifierTypes": [
"ANY",
"ALL",
"NONE"
]
}
Returns the test fields Fini derives from one saved 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
Rule ID.
Response
curl --request GET \
--url 'https://api-prod.usefini.com/v2/hc-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/hc-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/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
data = response.json()
{
"contextFields": [
{
"path": "message.text",
"dataType": "string"
},
{
"path": "user.email",
"dataType": "string"
}
],
"operatorTypes": [
"==",
"!=",
"contains"
],
"quantifierTypes": [
"ANY",
"ALL",
"NONE"
]
}
Was this page helpful?
⌘I

