Creating Detection Rules
You can define Detection Rules “inline” in the body of each request to the scan endpoint. See the example in the walk through of the scan endpoint Creating an Inline Detection Rule.
You can also use the Nightfall UI > Detection Rules to predefine your Detection Rules. Once you have created a Detection Rule, you will receive a UUID, which you can pass in as part of your API request payloads.
You may add up to 50 detectors to your detection rule.
To create a Detection Rule in the Nightfall UI, Select "Detection Rules" from the left hand navigation.
Click the + New Detection Rule
button in the upper right hand corner.
![The Nightfall Detection Rules page](https://help.nightfall.ai/~gitbook/image?url=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Ffiles.readme.io%2F0719d8f-Detection_Rule_Listing_Update.png&width=768&dpr=4&quality=100&sign=80130842&sv=1)
First, enter a name for your Detection Rule as well as an optional description.
![Creating a New Detection Rule](https://help.nightfall.ai/~gitbook/image?url=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Ffiles.readme.io%2F076dff0-New_Detector_Rule_Set_Up.png&width=768&dpr=4&quality=100&sign=5db7453a&sv=1)
Then click the + Detectors
button to add Detectors to your Detection Rule.
![Selecting Detectors for a Detection Rule](https://help.nightfall.ai/~gitbook/image?url=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Ffiles.readme.io%2F08ba944-New_Detector_Rule_-_Chose_Detector.png&width=768&dpr=4&quality=100&sign=97310db6&sv=1)
In this example we have selected the US drivers license and Canada Government ID detectors.
Click the Add
button in the lower right hand corner at the end of the detector list when you are done adding detectors.
Now that your Detectors are set, choose a minimum confidence level and a minimum # of findings for each detector.
If these minimums for a Detector are not met, the Detection Rule will not be triggered.
![Setting confidence levels and minimum findings for a Detection Rule](https://help.nightfall.ai/~gitbook/image?url=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Ffiles.readme.io%2F3c358c2-New_Detector_-_Minimums.png&width=768&dpr=4&quality=100&sign=92a5c9f6&sv=1)
Save your Detection Rule in the lower left hand corner once you are done.
Once the Detection Rule is saved, it is available for use in requests to the Nightfall API to scan your data for sensitive information. Pass in the UUID of the Detection Rule as the detectionRuleUUIDs
field of your requests to the the scan endpoints.
The UUID may be obtained by clicking the "copy" icon, the left most icon in the set of icons that appear next to the Detection Rules name when your cursor highlights a Detection Rule in the list of Detection Rules.
See Using Pre-Configured Detection Rules for an example of using a Detection Rule UUID.
![Copying a UUID for a Detection Rule](https://help.nightfall.ai/~gitbook/image?url=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Ffiles.readme.io%2F8ca0ad8-Detection_Rule_Listing.png&width=768&dpr=4&quality=100&sign=42cf2bd8&sv=1)
Last updated