Referência da APIRule sets
Create rule set
`jsonataExpr` is required when `engine = jsonata` (default). For `engine = jsonata-batch` the matcher expressions live inside `params.matchers` and `jsonataExpr` may be omitted. Field references inside `jsonataExpr` (`left.<key>`, `right.<key>`) are validated against the dataset's declared fields when `RULE_SETS_VALIDATE_FIELDS_STRICT=1`.
Authorization
ApiKeyAuth x-api-key<token>
Tenant API key
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Create a rule set. jsonataExpr is required when engine is jsonata (default); for jsonata-batch it may be omitted because matcher expressions live inside params.matchers.
name*string
Length
1 <= lengthleftDatasetId*string
Format
uuidrightDatasetId*string
Format
uuidengine?string
Default
"jsonata"Value in
- "jsonata"
- "jsonata-batch"
jsonataExpr?string
Length
length <= 65536params*
Scoring parameters for a rule set. Tpossible must be ≤ Tmatch.
logicJson?
[key: string]?any
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/rule-sets" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "leftDatasetId": "da32655f-386b-4d51-8ebc-4ea0ec36d9bf", "rightDatasetId": "4d1d05d0-fe34-4c93-bf81-eed475911387", "params": { "Tmatch": 0, "Tpossible": 0 } }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "left_dataset_id": "cb62a89e-6ea5-4cc0-b5b1-5e46e13b5681", "right_dataset_id": "63e40be6-71bb-4521-bff6-3e1b9d7738e8", "engine": "jsonata", "jsonata_expr": "string", "params": { "Tmatch": 0, "Tpossible": 0, "windowDays": 0, "amountTolerancePercent": 0, "filters": [ "string" ], "matchers": [ { "id": "string", "name": "string", "expr": "string", "weight": 0, "required": true } ], "blocking": { "amountKey": "string", "dateKey": "string", "amountKeyLeft": "string", "amountKeyRight": "string", "dateKeyLeft": "string", "dateKeyRight": "string", "amountTolerancePercent": 5, "amountBucketSize": 10, "amountBucketWindow": 2, "dateToleranceDays": 5, "enabled": true }, "composition": { "enabled": true, "direction": "left_to_many_right", "maxGroupSize": 2, "amountTolerancePercent": 0, "amountField": "string", "groupByField": "string", "dateStrategy": "none", "dateFieldLeft": "string", "dateFieldRight": "string", "dateToleranceDays": 0, "allowNegativeAmounts": false, "preferCompleteGroup": false, "skipAlreadyMatched": true, "partial": { "enabled": true, "minMembers": 2, "minCompletionRatio": 0, "uniformityRatio": 0 }, "installmentDiscovery": { "enabled": true, "maxDivisor": 2, "divisorTolerance": 0, "totalCountField": "string", "unitValueField": "string" } } }, "logic_json": {}, "created_at": "2019-08-24T14:15:22Z"}
