curl --request POST \
--url https://app.herondata.io/api/rules/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"rule": {
"condition": "equal",
"date_range": "last_180_days",
"group": "data_quality_datasource",
"metric_label": "unique_transactions",
"name": "notify_if_debt_investment_count_gt_0_last_180d",
"selector": {
"is_portfolio": true
},
"value": 42.42,
"value_str": "mrc_12345678ijwdd321d921"
}
}'
{
"rule": {
"condition": "equal",
"created": "2025-06-20T13:14:52.958329",
"date_range": "last_180_days",
"group": "data_quality_datasource",
"heron_id": "rul_FyTe27RuRYPZ4cxScWx4GN",
"last_updated": "2025-08-01T13:14:52.958356",
"metric_label": "unique_transactions",
"name": "notify_if_debt_investment_count_gt_0_last_180d",
"selector": {
"is_portfolio": true
},
"value": 42.42,
"value_str": "mrc_12345678ijwdd321d921"
}
}
Create a new rule to send a ‘end_user.review_required’ webhook after processing if rule condition evaluates to true
curl --request POST \
--url https://app.herondata.io/api/rules/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"rule": {
"condition": "equal",
"date_range": "last_180_days",
"group": "data_quality_datasource",
"metric_label": "unique_transactions",
"name": "notify_if_debt_investment_count_gt_0_last_180d",
"selector": {
"is_portfolio": true
},
"value": 42.42,
"value_str": "mrc_12345678ijwdd321d921"
}
}'
{
"rule": {
"condition": "equal",
"created": "2025-06-20T13:14:52.958329",
"date_range": "last_180_days",
"group": "data_quality_datasource",
"heron_id": "rul_FyTe27RuRYPZ4cxScWx4GN",
"last_updated": "2025-08-01T13:14:52.958356",
"metric_label": "unique_transactions",
"name": "notify_if_debt_investment_count_gt_0_last_180d",
"selector": {
"is_portfolio": true
},
"value": 42.42,
"value_str": "mrc_12345678ijwdd321d921"
}
}
OK
The response is of type object
.
Was this page helpful?