Microsoft Secure Tech Accelerator
Apr 03 2024, 07:00 AM - 11:00 AM (PDT)
Microsoft Tech Community

Create a classification rule (dictionary) with the REST API

Copper Contributor

Hi all trying to create a classification rule by using the Purview REST API and while I could create a rule using Regex for a dictionary based rule I am getting an error.

{"kind": "Custom", "properties": {"minimumDistinctMatchCount": null, "minimumPercentageMatch": 60.0, "classificationAction": "Keep", "dataPatterns": [], "columnPatterns": [], "classificationRuleBloomFilter": {"sourceFileName": "Education_level.csv", "cookedBloomFilter": null, "bloomFilterName": "custom-bf-847367bd-5c6d-4742-a512-73b8877170c1"}, "description": "", "version": 1, "classificationName": "HighSchoolGraduates", "owner": "8db55a93-91ae-4053-888e-1d55286a3a91", "ruleStatus": "Enabled", "createdAt": "2022-03-28T20:57:15.5678731Z", "lastModifiedAt": "2022-03-28T20:57:15.5678733Z", "collection": null}}

Got the JSON from one of my already existing dictionary rules hoping i could just reuse it but got a response like the following

<Response [404]>
{
  "error": {
    "code": "ClassificationRule_BloomFilterNotFound",
    "message": "Cooked bloom filter not found",
    "target": null,
    "details": []
  }
}

 Bloomfilter assumed it meant the dictionary from the Classification rule i copied from, so I wanted to check, is there a way to add/create/get a new BloomFilter so it does not return an error or is the API not enough to create dictionary classification rules just yet? Maybe I am missing something?

 

 

0 Replies