Scanning Text
The scan
endpoint allows you to apply Policies and Detection Rules to a list of text strings provided as a payload
.
curl --request POST \
--url https://api.nightfall.ai/v3/scan \
--header 'Accept: application/json' \
--header 'Authorization: Bearer NF-rEpLaCeM3w1ThYoUrNiGhTfAlLKeY123' \
--header 'Content-Type: application/json' \
--data '
{
"policy": {
"detectionRules": [
{
"detectors": [
{
"minNumFindings": 1,
"minConfidence": "LIKELY",
"displayName": "US Social Security Number",
"detectorType": "NIGHTFALL_DETECTOR",
"nightfallDetector": "US_SOCIAL_SECURITY_NUMBER"
}
],
"name": "My Match Rule",
"logicalOp": "ANY"
}
]
},
"payload": [
"The customer social security number is 458-02-6124",
"No PII in this string"
]
}'
You may use Pre-Configured Detection Rules or Create Inline Detection Rules
Text scanning supports the use of Exclusion Rules, Context Rules, and Redaction as well as other Scanning Features .
For scanning files, see Scanning Files.
Note that you must generate an API key to send requests to the Nightfall API.
Updated about 1 year ago