curl --request POST \
--url 'https://api-prod.usefini.com/v2/hc-rules/test-fields/preview/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"flowConfig": {
"name": "Example",
"value": "message"
}
}'
const response = await fetch('https://api-prod.usefini.com/v2/hc-rules/test-fields/preview/public', {
method: 'POST',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'flowConfig': {
'name': 'Example',
'value': 'message'
}
}
)
});
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/hc-rules/test-fields/preview/public",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"flowConfig": {
"name": "Example",
"value": "message"
}
},
)
data = response.json()
{
"contextFields": [
{
"path": "message.text",
"dataType": "string"
},
{
"path": "user.email",
"dataType": "string"
}
],
"operatorTypes": [
"==",
"!=",
"contains"
],
"quantifierTypes": [
"ANY",
"ALL",
"NONE"
]
}
Rules
Preview rule test fields
Preview test fields for an unsaved Rulebook flow configuration.
POST
/
v2
/
hc-rules
/
test-fields
/
preview
/
public
curl --request POST \
--url 'https://api-prod.usefini.com/v2/hc-rules/test-fields/preview/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"flowConfig": {
"name": "Example",
"value": "message"
}
}'
const response = await fetch('https://api-prod.usefini.com/v2/hc-rules/test-fields/preview/public', {
method: 'POST',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'flowConfig': {
'name': 'Example',
'value': 'message'
}
}
)
});
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/hc-rules/test-fields/preview/public",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"flowConfig": {
"name": "Example",
"value": "message"
}
},
)
data = response.json()
{
"contextFields": [
{
"path": "message.text",
"dataType": "string"
},
{
"path": "user.email",
"dataType": "string"
}
],
"operatorTypes": [
"==",
"!=",
"contains"
],
"quantifierTypes": [
"ANY",
"ALL",
"NONE"
]
}
Derives test fields from a flow configuration payload without requiring the rule to be saved first. Use this while building or editing a rule draft.
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.string
required
application/jsonBody parameters
object
required
Rulebook flow configuration to inspect.
Response
curl --request POST \
--url 'https://api-prod.usefini.com/v2/hc-rules/test-fields/preview/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"flowConfig": {
"name": "Example",
"value": "message"
}
}'
const response = await fetch('https://api-prod.usefini.com/v2/hc-rules/test-fields/preview/public', {
method: 'POST',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'flowConfig': {
'name': 'Example',
'value': 'message'
}
}
)
});
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/hc-rules/test-fields/preview/public",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"flowConfig": {
"name": "Example",
"value": "message"
}
},
)
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

