Skip to content
Start here

Get a validator

GET/accounts/{account_id}/dlp/validators/{validator_id}

Fetches a validator of any kind by ID.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Zero Trust ReadZero Trust Write
Path ParametersExpand Collapse
account_id: string
validator_id: string
formatuuid
ReturnsExpand Collapse
errors: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
success: true

Whether the API call was successful.

result: optional Validator

Reusable logic that a detection entry can attach to in order to refine its matches. The kind field determines the rest of the body.

One of the following:
ProximityWordValidator object { id, created_at, kind, 4 more }

A reusable list of weighted words. Attaching it to a detection entry raises the confidence of that entry’s matches when one of the words appears nearby, and lowers it when none do.

id: string
formatuuid
created_at: string
formatdate-time
kind: "proximity_words"
name: string

A name for this validator, at most 50 characters.

referenced_by: References { entries, entry_count }

What currently uses a validator. Deleting a validator that is still in use returns 409, so check this first.

Read-only. A validator is attached or detached by updating the detection entry that uses it, not by writing this back.

entries: array of object { id, name, type }

The detection entries using this validator, ordered by name.

id: string
formatuuid
name: string
type: "custom" or "custom_prompt_topic" or "predefined" or 4 more

The type of a detection entry.

One of the following:
"custom"
"custom_prompt_topic"
"predefined"
"integration"
"exact_data"
"document_fingerprint"
"word_list"
entry_count: number

Number of detection entries this validator is attached to.

formatint32
minimum0
updated_at: string
formatdate-time
words: array of Word { weight, word }

The words that raise confidence when found near a match.

weight: Weight

How much a word contributes to a match’s confidence when it is found nearby.

Separate from a profile’s high/medium/low confidence threshold: this describes how telling the word is, not how confident the resulting match is.

One of the following:
"strong"
"moderate"
"weak"
word: string

The word or phrase to look for. Must contain 1–128 characters and is matched case-insensitively.

WorkerValidator object { id, created_at, kind, 5 more }

A customer Worker registered as a validator.

id: string
formatuuid
created_at: string
formatdate-time
kind: "worker"
name: string

A name for this validator, at most 50 characters.

referenced_by: References { entries, entry_count }

What currently uses a validator. Deleting a validator that is still in use returns 409, so check this first.

Read-only. A validator is attached or detached by updating the detection entry that uses it, not by writing this back.

entries: array of object { id, name, type }

The detection entries using this validator, ordered by name.

id: string
formatuuid
name: string
type: "custom" or "custom_prompt_topic" or "predefined" or 4 more

The type of a detection entry.

One of the following:
"custom"
"custom_prompt_topic"
"predefined"
"integration"
"exact_data"
"document_fingerprint"
"word_list"
entry_count: number

Number of detection entries this validator is attached to.

formatint32
minimum0
script_tag: string

The public script tag of the customer’s Worker that scores matches.

updated_at: string
formatdate-time
default: optional number or "veto"
One of the following:
number
"veto"

Get a validator

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/validators/$VALIDATOR_ID \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "created_at": "2019-12-27T18:11:19.117Z",
    "kind": "proximity_words",
    "name": "HIPAA context words",
    "referenced_by": {
      "entries": [
        {
          "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "name": "US Social Security Number",
          "type": "custom"
        }
      ],
      "entry_count": 3
    },
    "updated_at": "2019-12-27T18:11:19.117Z",
    "words": [
      {
        "weight": "strong",
        "word": "social security number"
      }
    ]
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "created_at": "2019-12-27T18:11:19.117Z",
    "kind": "proximity_words",
    "name": "HIPAA context words",
    "referenced_by": {
      "entries": [
        {
          "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "name": "US Social Security Number",
          "type": "custom"
        }
      ],
      "entry_count": 3
    },
    "updated_at": "2019-12-27T18:11:19.117Z",
    "words": [
      {
        "weight": "strong",
        "word": "social security number"
      }
    ]
  }
}