# DLP # Datasets ## Fetch all datasets `client.zeroTrust.dlp.datasets.list(DatasetListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/datasets` Lists all DLP datasets configured for the account, including custom word lists and EDM datasets. ### Parameters - `params: DatasetListParams` - `account_id: string` ### Returns - `Dataset` - `id: string` - `columns: Array` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: Array` - `num_cells: number` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive?: boolean` - `description?: string | null` The description of the dataset. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const dataset of client.zeroTrust.dlp.datasets.list({ account_id: 'account_id' })) { console.log(dataset.id); } ``` #### Response ```json { "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", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" } ] } ``` ## Fetch a specific dataset `client.zeroTrust.dlp.datasets.get(stringdatasetId, DatasetGetParamsparams, RequestOptionsoptions?): Dataset` **get** `/accounts/{account_id}/dlp/datasets/{dataset_id}` Fetch a specific dataset ### Parameters - `datasetId: string` - `params: DatasetGetParams` - `account_id: string` ### Returns - `Dataset` - `id: string` - `columns: Array` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: Array` - `num_cells: number` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive?: boolean` - `description?: string | null` The description of the dataset. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataset = await client.zeroTrust.dlp.datasets.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', }); console.log(dataset.id); ``` #### Response ```json { "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", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" } } ``` ## Create a new dataset `client.zeroTrust.dlp.datasets.create(DatasetCreateParamsparams, RequestOptionsoptions?): DatasetCreation` **post** `/accounts/{account_id}/dlp/datasets` Creates a new DLP (Data Loss Prevention) dataset for storing custom detection patterns. Datasets can contain exact match data, word lists, or EDM (Exact Data Match) configurations. ### Parameters - `params: DatasetCreateParams` - `account_id: string` Path param - `name: string` Body param - `case_sensitive?: boolean` Body param: Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if `secret` is true or undefined - `description?: string | null` Body param: The description of the dataset. - `encoding_version?: number` Body param: Dataset encoding version Non-secret custom word lists with no header are always version 1. Secret EDM lists with no header are version 1. Multicolumn CSV with headers are version 2. Omitting this field provides the default value 0, which is interpreted the same as 1. - `secret?: boolean` Body param: Generate a secret dataset. If true, the response will include a secret to use with the EDM encoder. If false, the response has no secret and the dataset is uploaded in plaintext. ### Returns - `DatasetCreation` - `dataset: Dataset` - `id: string` - `columns: Array` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: Array` - `num_cells: number` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive?: boolean` - `description?: string | null` The description of the dataset. - `encoding_version: number` Encoding version to use for dataset. - `max_cells: number` - `version: number` The version to use when uploading the dataset. - `secret?: string` The secret to use for Exact Data Match datasets. This is not present in Custom Wordlists. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const datasetCreation = await client.zeroTrust.dlp.datasets.create({ account_id: 'account_id', name: 'name', }); console.log(datasetCreation.dataset); ``` #### Response ```json { "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": { "dataset": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" }, "encoding_version": 0, "max_cells": 0, "version": 0, "secret": "secret" } } ``` ## Update details about a dataset `client.zeroTrust.dlp.datasets.update(stringdatasetId, DatasetUpdateParamsparams, RequestOptionsoptions?): Dataset` **put** `/accounts/{account_id}/dlp/datasets/{dataset_id}` Updates the configuration of an existing DLP dataset, such as its name, description, or detection settings. ### Parameters - `datasetId: string` - `params: DatasetUpdateParams` - `account_id: string` Path param - `case_sensitive?: boolean` Body param: Determines if the words should be matched in a case-sensitive manner. Only required for custom word lists. - `description?: string | null` Body param: The description of the dataset. - `name?: string | null` Body param: The name of the dataset, must be unique. ### Returns - `Dataset` - `id: string` - `columns: Array` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: Array` - `num_cells: number` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive?: boolean` - `description?: string | null` The description of the dataset. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataset = await client.zeroTrust.dlp.datasets.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', }); console.log(dataset.id); ``` #### Response ```json { "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", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" } } ``` ## Delete a dataset `client.zeroTrust.dlp.datasets.delete(stringdatasetId, DatasetDeleteParamsparams, RequestOptionsoptions?): void` **delete** `/accounts/{account_id}/dlp/datasets/{dataset_id}` This deletes all versions of the dataset. ### Parameters - `datasetId: string` - `params: DatasetDeleteParams` - `account_id: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); await client.zeroTrust.dlp.datasets.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', }); ``` ## Domain Types ### Dataset - `Dataset` - `id: string` - `columns: Array` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: Array` - `num_cells: number` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive?: boolean` - `description?: string | null` The description of the dataset. ### Dataset Array - `DatasetArray = Array` - `id: string` - `columns: Array` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: Array` - `num_cells: number` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive?: boolean` - `description?: string | null` The description of the dataset. ### Dataset Creation - `DatasetCreation` - `dataset: Dataset` - `id: string` - `columns: Array` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: Array` - `num_cells: number` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive?: boolean` - `description?: string | null` The description of the dataset. - `encoding_version: number` Encoding version to use for dataset. - `max_cells: number` - `version: number` The version to use when uploading the dataset. - `secret?: string` The secret to use for Exact Data Match datasets. This is not present in Custom Wordlists. # Upload ## Prepare to upload a new version of a dataset `client.zeroTrust.dlp.datasets.upload.create(stringdatasetId, UploadCreateParamsparams, RequestOptionsoptions?): NewVersion` **post** `/accounts/{account_id}/dlp/datasets/{dataset_id}/upload` Creates a new version of a DLP dataset, allowing you to stage changes before activation. Used for single-column EDM and custom word lists. ### Parameters - `datasetId: string` - `params: UploadCreateParams` - `account_id: string` ### Returns - `NewVersion` - `encoding_version: number` - `max_cells: number` - `version: number` - `case_sensitive?: boolean` - `columns?: Array` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `secret?: string` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const newVersion = await client.zeroTrust.dlp.datasets.upload.create( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(newVersion.encoding_version); ``` #### Response ```json { "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": { "encoding_version": 0, "max_cells": 0, "version": 0, "case_sensitive": true, "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "secret": "secret" } } ``` ## Upload a new version of a dataset `client.zeroTrust.dlp.datasets.upload.edit(stringdatasetId, numberversion, "string" | "ArrayBufferView" | "ArrayBuffer" | BlobLikedataset, UploadEditParamsparams, RequestOptionsoptions?): Dataset` **post** `/accounts/{account_id}/dlp/datasets/{dataset_id}/upload/{version}` This is used for single-column EDMv1 and Custom Word Lists. The EDM format can only be created in the Cloudflare dashboard. For other clients, this operation can only be used for non-secret Custom Word Lists. The body must be a UTF-8 encoded, newline (NL or CRNL) separated list of words to be matched. ### Parameters - `datasetId: string` - `version: number` - `dataset: "string" | "ArrayBufferView" | "ArrayBuffer" | BlobLike` - `params: UploadEditParams` - `account_id: string` Path param ### Returns - `Dataset` - `id: string` - `columns: Array` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: string` - `encoding_version: number` - `name: string` - `num_cells: number` - `secret: boolean` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: string` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: Array` - `num_cells: number` - `status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: number` - `case_sensitive?: boolean` - `description?: string | null` The description of the dataset. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataset = await client.zeroTrust.dlp.datasets.upload.edit( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 0, fs.createReadStream('path/to/file'), { account_id: 'account_id' }, ); console.log(dataset.id); ``` #### Response ```json { "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", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" } } ``` ## Domain Types ### New Version - `NewVersion` - `encoding_version: number` - `max_cells: number` - `version: number` - `case_sensitive?: boolean` - `columns?: Array` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `secret?: string` # Versions ## Sets the column information for a multi-column upload `client.zeroTrust.dlp.datasets.versions.create(stringdatasetId, numberversion, VersionCreateParamsparams, RequestOptionsoptions?): SinglePage` **post** `/accounts/{account_id}/dlp/datasets/{dataset_id}/versions/{version}` This is used for multi-column EDMv2 datasets. The EDMv2 format can only be created in the Cloudflare dashboard. The columns in the response appear in the same order as in the request. ### Parameters - `datasetId: string` - `version: number` - `params: VersionCreateParams` - `account_id: string` Path param - `body: Array` Body param - `ExistingColumn` - `entry_id: string` - `header_name?: string` - `num_cells?: number` - `NewColumn` - `entry_name: string` - `header_name?: string` - `num_cells?: number` ### Returns - `VersionCreateResponse` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const versionCreateResponse of client.zeroTrust.dlp.datasets.versions.create( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 0, { account_id: 'account_id', body: [{ entry_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }] }, )) { console.log(versionCreateResponse.entry_id); } ``` #### Response ```json { "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": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ] } ``` ## Domain Types ### Version Create Response - `VersionCreateResponse` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` # Entries ## Upload a new version of a multi-column dataset `client.zeroTrust.dlp.datasets.versions.entries.create(stringdatasetId, numberversion, stringentryId, "string" | "ArrayBufferView" | "ArrayBuffer" | BlobLikedatasetVersionEntry, EntryCreateParamsparams, RequestOptionsoptions?): EntryCreateResponse` **post** `/accounts/{account_id}/dlp/datasets/{dataset_id}/versions/{version}/entries/{entry_id}` This is used for multi-column EDMv2 datasets. The EDMv2 format can only be created in the Cloudflare dashboard. ### Parameters - `datasetId: string` - `version: number` - `entryId: string` - `datasetVersionEntry: "string" | "ArrayBufferView" | "ArrayBuffer" | BlobLike` - `params: EntryCreateParams` - `account_id: string` Path param ### Returns - `EntryCreateResponse` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const entry = await client.zeroTrust.dlp.datasets.versions.entries.create( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 0, '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', fs.createReadStream('path/to/file'), { account_id: 'account_id' }, ); console.log(entry.entry_id); ``` #### Response ```json { "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": { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } } ``` ## Domain Types ### Entry Create Response - `EntryCreateResponse` - `entry_id: string` - `header_name: string` - `num_cells: number` - `upload_status: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` # Patterns ## Validate a DLP regex pattern `client.zeroTrust.dlp.patterns.validate(PatternValidateParamsparams, RequestOptionsoptions?): PatternValidateResponse` **post** `/accounts/{account_id}/dlp/patterns/validate` Validates whether this pattern is a valid regular expression. Rejects it if the regular expression is too complex or can match an unbounded-length string. The regex will be rejected if it uses `*` or `+`. Bound the maximum number of characters that can be matched using a range, e.g. `{1,100}`. ### Parameters - `params: PatternValidateParams` - `account_id: string` Path param: Account ID. - `regex: string` Body param - `max_match_bytes?: number | null` Body param: Maximum number of bytes that the regular expression can match. If this is `null` then there is no limit on the length. Patterns can use `*` and `+`. Otherwise repeats should use a range `{m,n}` to restrict patterns to the length. If this field is missing, then a default length limit is used. Note that the length is specified in bytes. Since regular expressions use UTF-8 the pattern `.` can match up to 4 bytes. Hence `.{1,256}` has a maximum length of 1024 bytes. ### Returns - `PatternValidateResponse` - `valid: boolean` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.zeroTrust.dlp.patterns.validate({ account_id: 'account_id', regex: 'regex', }); console.log(response.valid); ``` #### Response ```json { "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": { "valid": true } } ``` ## Domain Types ### Pattern Validate Response - `PatternValidateResponse` - `valid: boolean` # Payload Logs ## Get payload log settings `client.zeroTrust.dlp.payloadLogs.get(PayloadLogGetParamsparams, RequestOptionsoptions?): PayloadLogGetResponse` **get** `/accounts/{account_id}/dlp/payload_log` Gets the current payload logging configuration for DLP, showing whether matched content is being logged. ### Parameters - `params: PayloadLogGetParams` - `account_id: string` ### Returns - `PayloadLogGetResponse` - `updated_at: string` - `masking_level?: "full" | "partial" | "clear" | "default"` Masking level for payload logs. - `full`: The entire payload is masked. - `partial`: Only partial payload content is masked. - `clear`: No masking is applied to the payload content. - `default`: DLP uses its default masking behavior. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key?: string | null` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const payloadLog = await client.zeroTrust.dlp.payloadLogs.get({ account_id: 'account_id' }); console.log(payloadLog.updated_at); ``` #### Response ```json { "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": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } ``` ## Set payload log settings `client.zeroTrust.dlp.payloadLogs.update(PayloadLogUpdateParamsparams, RequestOptionsoptions?): PayloadLogUpdateResponse` **put** `/accounts/{account_id}/dlp/payload_log` Enables or disables payload logging for DLP matches. When enabled, matched content is stored for review. ### Parameters - `params: PayloadLogUpdateParams` - `account_id: string` Path param - `masking_level?: "full" | "partial" | "clear" | "default"` Body param: Masking level for payload logs. - `full`: The entire payload is masked. - `partial`: Only partial payload content is masked. - `clear`: No masking is applied to the payload content. - `default`: DLP uses its default masking behavior. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key?: string | null` Body param: Base64-encoded public key for encrypting payload logs. - Set to null or empty string to disable payload logging. - Set to a non-empty base64 string to enable payload logging with the given key. For customers with configurable payload masking feature rolled out: - If the field is missing, the existing setting will be kept. Note that this is different from setting to null or empty string. For all other customers: - If the field is missing, the existing setting will be cleared. ### Returns - `PayloadLogUpdateResponse` - `updated_at: string` - `masking_level?: "full" | "partial" | "clear" | "default"` Masking level for payload logs. - `full`: The entire payload is masked. - `partial`: Only partial payload content is masked. - `clear`: No masking is applied to the payload content. - `default`: DLP uses its default masking behavior. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key?: string | null` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const payloadLog = await client.zeroTrust.dlp.payloadLogs.update({ account_id: 'account_id' }); console.log(payloadLog.updated_at); ``` #### Response ```json { "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": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } ``` ## Domain Types ### Payload Log Get Response - `PayloadLogGetResponse` - `updated_at: string` - `masking_level?: "full" | "partial" | "clear" | "default"` Masking level for payload logs. - `full`: The entire payload is masked. - `partial`: Only partial payload content is masked. - `clear`: No masking is applied to the payload content. - `default`: DLP uses its default masking behavior. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key?: string | null` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Payload Log Update Response - `PayloadLogUpdateResponse` - `updated_at: string` - `masking_level?: "full" | "partial" | "clear" | "default"` Masking level for payload logs. - `full`: The entire payload is masked. - `partial`: Only partial payload content is masked. - `clear`: No masking is applied to the payload content. - `default`: DLP uses its default masking behavior. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key?: string | null` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. # Email # Account Mapping ## Get mapping `client.zeroTrust.dlp.email.accountMapping.get(AccountMappingGetParamsparams, RequestOptionsoptions?): AccountMappingGetResponse` **get** `/accounts/{account_id}/dlp/email/account_mapping` Retrieves the email provider mapping configuration for DLP email scanning. ### Parameters - `params: AccountMappingGetParams` - `account_id: string` ### Returns - `AccountMappingGetResponse` - `addin_identifier_token: string` - `auth_requirements: UnionMember0 | Type` - `UnionMember0` - `allowed_microsoft_organizations: Array` - `type: "Org"` - `"Org"` - `Type` - `type: "NoAuth"` - `"NoAuth"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const accountMapping = await client.zeroTrust.dlp.email.accountMapping.get({ account_id: 'account_id', }); console.log(accountMapping.addin_identifier_token); ``` #### Response ```json { "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": { "addin_identifier_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "auth_requirements": { "allowed_microsoft_organizations": [ "string" ], "type": "Org" } } } ``` ## Create mapping `client.zeroTrust.dlp.email.accountMapping.create(AccountMappingCreateParamsparams, RequestOptionsoptions?): AccountMappingCreateResponse` **post** `/accounts/{account_id}/dlp/email/account_mapping` Creates a mapping between a Cloudflare account and an email provider for DLP email scanning integration. ### Parameters - `params: AccountMappingCreateParams` - `account_id: string` Path param - `auth_requirements: UnionMember0 | Type` Body param - `UnionMember0` - `allowed_microsoft_organizations: Array` - `type: "Org"` - `"Org"` - `Type` - `type: "NoAuth"` - `"NoAuth"` ### Returns - `AccountMappingCreateResponse` - `addin_identifier_token: string` - `auth_requirements: UnionMember0 | Type` - `UnionMember0` - `allowed_microsoft_organizations: Array` - `type: "Org"` - `"Org"` - `Type` - `type: "NoAuth"` - `"NoAuth"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const accountMapping = await client.zeroTrust.dlp.email.accountMapping.create({ account_id: 'account_id', auth_requirements: { allowed_microsoft_organizations: ['string'], type: 'Org' }, }); console.log(accountMapping.addin_identifier_token); ``` #### Response ```json { "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": { "addin_identifier_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "auth_requirements": { "allowed_microsoft_organizations": [ "string" ], "type": "Org" } } } ``` ## Domain Types ### Account Mapping Get Response - `AccountMappingGetResponse` - `addin_identifier_token: string` - `auth_requirements: UnionMember0 | Type` - `UnionMember0` - `allowed_microsoft_organizations: Array` - `type: "Org"` - `"Org"` - `Type` - `type: "NoAuth"` - `"NoAuth"` ### Account Mapping Create Response - `AccountMappingCreateResponse` - `addin_identifier_token: string` - `auth_requirements: UnionMember0 | Type` - `UnionMember0` - `allowed_microsoft_organizations: Array` - `type: "Org"` - `"Org"` - `Type` - `type: "NoAuth"` - `"NoAuth"` # Rules ## List all email scanner rules `client.zeroTrust.dlp.email.rules.list(RuleListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/email/rules` Lists all email scanner rules for an account. ### Parameters - `params: RuleListParams` - `account_id: string` ### Returns - `RuleListResponse` - `action: Action` - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const ruleListResponse of client.zeroTrust.dlp.email.rules.list({ account_id: 'account_id', })) { console.log(ruleListResponse.rule_id); } ``` #### Response ```json { "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": [ { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ] } ``` ## Get an email scanner rule `client.zeroTrust.dlp.email.rules.get(stringruleId, RuleGetParamsparams, RequestOptionsoptions?): RuleGetResponse` **get** `/accounts/{account_id}/dlp/email/rules/{rule_id}` Gets detailed configuration for a specific DLP email scanning rule, including detection patterns and actions. ### Parameters - `ruleId: string` - `params: RuleGetParams` - `account_id: string` ### Returns - `RuleGetResponse` - `action: Action` - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const rule = await client.zeroTrust.dlp.email.rules.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', }); console.log(rule.rule_id); ``` #### Response ```json { "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": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Create email scanner rule `client.zeroTrust.dlp.email.rules.create(RuleCreateParamsparams, RequestOptionsoptions?): RuleCreateResponse` **post** `/accounts/{account_id}/dlp/email/rules` Creates a new DLP email scanning rule that defines what content patterns to detect in email messages and what actions to take. ### Parameters - `params: RuleCreateParams` - `account_id: string` Path param - `action: Action` Body param - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Body param: Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `enabled: boolean` Body param - `name: string` Body param - `description?: string | null` Body param ### Returns - `RuleCreateResponse` - `action: Action` - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const rule = await client.zeroTrust.dlp.email.rules.create({ account_id: 'account_id', action: { action: 'Block' }, conditions: [ { operator: 'InList', selector: 'Recipients', value: ['string'], }, ], enabled: true, name: 'name', }); console.log(rule.rule_id); ``` #### Response ```json { "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": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Update email scanner rule `client.zeroTrust.dlp.email.rules.update(stringruleId, RuleUpdateParamsparams, RequestOptionsoptions?): RuleUpdateResponse` **put** `/accounts/{account_id}/dlp/email/rules/{rule_id}` Update email scanner rule ### Parameters - `ruleId: string` - `params: RuleUpdateParams` - `account_id: string` Path param - `action: Action` Body param - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Body param: Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `enabled: boolean` Body param - `name: string` Body param - `description?: string | null` Body param ### Returns - `RuleUpdateResponse` - `action: Action` - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const rule = await client.zeroTrust.dlp.email.rules.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', action: { action: 'Block' }, conditions: [ { operator: 'InList', selector: 'Recipients', value: ['string'], }, ], enabled: true, name: 'name', }); console.log(rule.rule_id); ``` #### Response ```json { "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": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Delete email scanner rule `client.zeroTrust.dlp.email.rules.delete(stringruleId, RuleDeleteParamsparams, RequestOptionsoptions?): RuleDeleteResponse` **delete** `/accounts/{account_id}/dlp/email/rules/{rule_id}` Removes a DLP email scanning rule. The rule will no longer be applied to email messages. ### Parameters - `ruleId: string` - `params: RuleDeleteParams` - `account_id: string` ### Returns - `RuleDeleteResponse` - `action: Action` - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const rule = await client.zeroTrust.dlp.email.rules.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', }); console.log(rule.rule_id); ``` #### Response ```json { "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": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Update email scanner rule priorities `client.zeroTrust.dlp.email.rules.bulkEdit(RuleBulkEditParamsparams, RequestOptionsoptions?): RuleBulkEditResponse` **patch** `/accounts/{account_id}/dlp/email/rules` Reorders DLP email scanning rules by updating their priority values. Higher priority rules are evaluated first. ### Parameters - `params: RuleBulkEditParams` - `account_id: string` Path param - `new_priorities: Record` Body param ### Returns - `RuleBulkEditResponse` - `action: Action` - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.zeroTrust.dlp.email.rules.bulkEdit({ account_id: 'account_id', new_priorities: { foo: 0 }, }); console.log(response.rule_id); ``` #### Response ```json { "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": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Domain Types ### Rule List Response - `RuleListResponse` - `action: Action` - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description?: string | null` ### Rule Get Response - `RuleGetResponse` - `action: Action` - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description?: string | null` ### Rule Create Response - `RuleCreateResponse` - `action: Action` - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description?: string | null` ### Rule Update Response - `RuleUpdateResponse` - `action: Action` - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description?: string | null` ### Rule Delete Response - `RuleDeleteResponse` - `action: Action` - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description?: string | null` ### Rule Bulk Edit Response - `RuleBulkEditResponse` - `action: Action` - `action: "Block"` - `"Block"` - `message?: string | null` - `conditions: Array` Triggered if all conditions match. - `operator: "InList" | "NotInList" | "MatchRegex" | "NotMatchRegex"` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: "Recipients" | "Sender" | "DLPProfiles"` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Array | string` - `Array` - `string` - `created_at: string` - `enabled: boolean` - `name: string` - `priority: number` - `rule_id: string` - `updated_at: string` - `description?: string | null` # Profiles ## List all profiles `client.zeroTrust.dlp.profiles.list(ProfileListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/profiles` Lists all DLP profiles in an account. ### Parameters - `params: ProfileListParams` - `account_id: string` Path param - `all?: boolean` Query param: Return all profiles, including those that current account does not have access to. ### Returns - `Profile = CustomProfile | PredefinedProfile | IntegrationProfile` - `CustomProfile` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `type: "custom"` - `"custom"` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes?: Array` Data classes associated with this profile. - `data_tags?: Array` Data tags associated with this profile. - `description?: string | null` The description of the profile. - `entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `sensitivity_levels?: Array` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `PredefinedProfile` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` The name of the predefined profile. - `type: "predefined"` - `"predefined"` - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled?: boolean` - `open_access?: boolean` Whether this profile can be accessed by anyone. - `IntegrationProfile` - `id: string` - `created_at: string` - `entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` - `shared_entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `type: "integration"` - `"integration"` - `updated_at: string` - `description?: string | null` The description of the profile. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const profile of client.zeroTrust.dlp.profiles.list({ account_id: 'account_id' })) { console.log(profile); } ``` #### Response ```json { "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", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } ] } ``` ## Get DLP Profile `client.zeroTrust.dlp.profiles.get(stringprofileId, ProfileGetParamsparams, RequestOptionsoptions?): Profile` **get** `/accounts/{account_id}/dlp/profiles/{profile_id}` Fetches a DLP profile by ID. ### Parameters - `profileId: string` - `params: ProfileGetParams` - `account_id: string` ### Returns - `Profile = CustomProfile | PredefinedProfile | IntegrationProfile` - `CustomProfile` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `type: "custom"` - `"custom"` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes?: Array` Data classes associated with this profile. - `data_tags?: Array` Data tags associated with this profile. - `description?: string | null` The description of the profile. - `entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `sensitivity_levels?: Array` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `PredefinedProfile` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` The name of the predefined profile. - `type: "predefined"` - `"predefined"` - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled?: boolean` - `open_access?: boolean` Whether this profile can be accessed by anyone. - `IntegrationProfile` - `id: string` - `created_at: string` - `entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` - `shared_entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `type: "integration"` - `"integration"` - `updated_at: string` - `description?: string | null` The description of the profile. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const profile = await client.zeroTrust.dlp.profiles.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', }); console.log(profile); ``` #### Response ```json { "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", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } } ``` ## Domain Types ### Context Awareness - `ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. ### Profile - `Profile = CustomProfile | PredefinedProfile | IntegrationProfile` - `CustomProfile` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `type: "custom"` - `"custom"` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes?: Array` Data classes associated with this profile. - `data_tags?: Array` Data tags associated with this profile. - `description?: string | null` The description of the profile. - `entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `sensitivity_levels?: Array` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `PredefinedProfile` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` The name of the predefined profile. - `type: "predefined"` - `"predefined"` - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled?: boolean` - `open_access?: boolean` Whether this profile can be accessed by anyone. - `IntegrationProfile` - `id: string` - `created_at: string` - `entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` - `shared_entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `type: "integration"` - `"integration"` - `updated_at: string` - `description?: string | null` The description of the profile. ### Skip Configuration - `SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. # Custom ## Get custom profile `client.zeroTrust.dlp.profiles.custom.get(stringprofileId, CustomGetParamsparams, RequestOptionsoptions?): Profile` **get** `/accounts/{account_id}/dlp/profiles/custom/{profile_id}` Fetches a custom DLP profile by id. ### Parameters - `profileId: string` - `params: CustomGetParams` - `account_id: string` ### Returns - `Profile = CustomProfile | PredefinedProfile | IntegrationProfile` - `CustomProfile` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `type: "custom"` - `"custom"` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes?: Array` Data classes associated with this profile. - `data_tags?: Array` Data tags associated with this profile. - `description?: string | null` The description of the profile. - `entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `sensitivity_levels?: Array` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `PredefinedProfile` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` The name of the predefined profile. - `type: "predefined"` - `"predefined"` - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled?: boolean` - `open_access?: boolean` Whether this profile can be accessed by anyone. - `IntegrationProfile` - `id: string` - `created_at: string` - `entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` - `shared_entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `type: "integration"` - `"integration"` - `updated_at: string` - `description?: string | null` The description of the profile. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const profile = await client.zeroTrust.dlp.profiles.custom.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(profile); ``` #### Response ```json { "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", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } } ``` ## Create custom profile `client.zeroTrust.dlp.profiles.custom.create(CustomCreateParamsparams, RequestOptionsoptions?): Profile` **post** `/accounts/{account_id}/dlp/profiles/custom` Creates a DLP custom profile. ### Parameters - `params: CustomCreateParams` - `account_id: string` Path param - `name: string` Body param - `ai_context_enabled?: boolean` Body param - `allowed_match_count?: number` Body param: Related DLP policies will trigger when the match count exceeds the number set. - `confidence_threshold?: string | null` Body param - `context_awareness?: ContextAwareness` Body param: Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes?: Array` Body param: Data class IDs to associate with the profile. - `data_tags?: Array` Body param: Data tag IDs to associate with the profile. - `description?: string | null` Body param: The description of the profile. - `entries?: Array` Body param - `DLPNewCustomEntry` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `description?: string | null` - `DLPNewWordListEntry` - `enabled: boolean` - `name: string` - `words: Array` - `ocr_enabled?: boolean` Body param - `sensitivity_levels?: Array` Body param: Sensitivity levels to associate with the profile. - `group_id: string` - `level_id: string` - `shared_entries?: Array` Body param: Entries from other profiles (e.g. pre-defined Cloudflare profiles, or your Microsoft Information Protection profiles). - `enabled: boolean` - `entry_id: string` ### Returns - `Profile = CustomProfile | PredefinedProfile | IntegrationProfile` - `CustomProfile` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `type: "custom"` - `"custom"` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes?: Array` Data classes associated with this profile. - `data_tags?: Array` Data tags associated with this profile. - `description?: string | null` The description of the profile. - `entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `sensitivity_levels?: Array` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `PredefinedProfile` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` The name of the predefined profile. - `type: "predefined"` - `"predefined"` - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled?: boolean` - `open_access?: boolean` Whether this profile can be accessed by anyone. - `IntegrationProfile` - `id: string` - `created_at: string` - `entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` - `shared_entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `type: "integration"` - `"integration"` - `updated_at: string` - `description?: string | null` The description of the profile. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const profile = await client.zeroTrust.dlp.profiles.custom.create({ account_id: 'account_id', name: 'name', }); console.log(profile); ``` #### Response ```json { "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", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } } ``` ## Update custom profile `client.zeroTrust.dlp.profiles.custom.update(stringprofileId, CustomUpdateParamsparams, RequestOptionsoptions?): Profile` **put** `/accounts/{account_id}/dlp/profiles/custom/{profile_id}` Updates a DLP custom profile. ### Parameters - `profileId: string` - `params: CustomUpdateParams` - `account_id: string` Path param - `name: string` Body param - `ai_context_enabled?: boolean` Body param - `allowed_match_count?: number | null` Body param - `confidence_threshold?: string | null` Body param - `context_awareness?: ContextAwareness` Body param: Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes?: Array | null` Body param: Data class IDs to associate with the profile. If omitted, existing associations are unchanged. - `data_tags?: Array | null` Body param: Data tag IDs to associate with the profile. If omitted, existing associations are unchanged. - `description?: string | null` Body param: The description of the profile. - `entries?: Array | null` Body param: Custom entries from this profile. If this field is omitted, entries owned by this profile will not be changed. - `DLPNewCustomEntryWithID` - `enabled: boolean` - `entry_id: string` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `description?: string | null` - `DLPNewCustomEntry` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `description?: string | null` - `ocr_enabled?: boolean` Body param - `sensitivity_levels?: Array | null` Body param: Sensitivity levels to associate with the profile. If omitted, existing associations are unchanged. - `group_id: string` - `level_id: string` - `shared_entries?: Array` Body param: Other entries, e.g. predefined or integration. - `enabled: boolean` - `entry_id: string` ### Returns - `Profile = CustomProfile | PredefinedProfile | IntegrationProfile` - `CustomProfile` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `type: "custom"` - `"custom"` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes?: Array` Data classes associated with this profile. - `data_tags?: Array` Data tags associated with this profile. - `description?: string | null` The description of the profile. - `entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `sensitivity_levels?: Array` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `PredefinedProfile` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` The name of the predefined profile. - `type: "predefined"` - `"predefined"` - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled?: boolean` - `open_access?: boolean` Whether this profile can be accessed by anyone. - `IntegrationProfile` - `id: string` - `created_at: string` - `entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` - `shared_entries: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `type: "integration"` - `"integration"` - `updated_at: string` - `description?: string | null` The description of the profile. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const profile = await client.zeroTrust.dlp.profiles.custom.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', name: 'name' }, ); console.log(profile); ``` #### Response ```json { "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", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } } ``` ## Delete custom profile `client.zeroTrust.dlp.profiles.custom.delete(stringprofileId, CustomDeleteParamsparams, RequestOptionsoptions?): CustomDeleteResponse | null` **delete** `/accounts/{account_id}/dlp/profiles/custom/{profile_id}` Deletes a DLP custom profile. ### Parameters - `profileId: string` - `params: CustomDeleteParams` - `account_id: string` ### Returns - `CustomDeleteResponse = unknown` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const custom = await client.zeroTrust.dlp.profiles.custom.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(custom); ``` #### Response ```json { "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": {} } ``` ## Domain Types ### Custom Profile - `CustomProfile` - `id: string` The id of the profile (uuid). - `allowed_match_count: number` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: string` When the profile was created. - `name: string` The name of the profile. - `ocr_enabled: boolean` - `updated_at: string` When the profile was lasted updated. - `ai_context_enabled?: boolean` - `confidence_threshold?: "low" | "medium" | "high" | "very_high"` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness?: ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: boolean` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: boolean` If the content type is a file, skip context analysis and return all matches. - `data_classes?: Array` Data classes associated with this profile. - `data_tags?: Array` Data tags associated with this profile. - `description?: string | null` The description of the profile. - `entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `sensitivity_levels?: Array` Sensitivity levels associated with this profile. - `group_id: string` - `level_id: string` - `shared_entries?: Array` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` ### Pattern - `Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` ### Custom Delete Response - `CustomDeleteResponse = unknown` # Predefined ## Get predefined profile config `client.zeroTrust.dlp.profiles.predefined.get(stringprofileId, PredefinedGetParamsparams, RequestOptionsoptions?): PredefinedProfile` **get** `/accounts/{account_id}/dlp/profiles/predefined/{profile_id}/config` This is similar to `get_predefined` but only returns entries that are enabled. This is needed for our terraform API Fetches a predefined DLP profile by id. ### Parameters - `profileId: string` - `params: PredefinedGetParams` - `account_id: string` ### Returns - `PredefinedProfile` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `confidence_threshold: string | null` - `enabled_entries: Array` Entries to enable for this predefined profile. Any entries not provided will be disabled. - `entries: Array` This field has been deprecated for `enabled_entries`. - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` The name of the predefined profile. - `ai_context_enabled?: boolean` - `ocr_enabled?: boolean` - `open_access?: boolean` Whether this profile can be accessed by anyone. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const predefinedProfile = await client.zeroTrust.dlp.profiles.predefined.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(predefinedProfile.id); ``` #### Response ```json { "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", "allowed_match_count": 0, "confidence_threshold": "confidence_threshold", "enabled_entries": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "name": "name", "ai_context_enabled": true, "ocr_enabled": true, "open_access": true } } ``` ## Update predefined profile config `client.zeroTrust.dlp.profiles.predefined.update(stringprofileId, PredefinedUpdateParamsparams, RequestOptionsoptions?): PredefinedProfile` **put** `/accounts/{account_id}/dlp/profiles/predefined/{profile_id}/config` This is similar to `update_predefined` but only returns entries that are enabled. This is needed for our terraform API Updates a DLP predefined profile. Only supports enabling/disabling entries. ### Parameters - `profileId: string` - `params: PredefinedUpdateParams` - `account_id: string` Path param - `ai_context_enabled?: boolean` Body param - `allowed_match_count?: number | null` Body param - `confidence_threshold?: string | null` Body param - `enabled_entries?: Array | null` Body param - `entries?: Array` Body param - `id: string` - `enabled: boolean` - `ocr_enabled?: boolean` Body param ### Returns - `PredefinedProfile` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `confidence_threshold: string | null` - `enabled_entries: Array` Entries to enable for this predefined profile. Any entries not provided will be disabled. - `entries: Array` This field has been deprecated for `enabled_entries`. - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` The name of the predefined profile. - `ai_context_enabled?: boolean` - `ocr_enabled?: boolean` - `open_access?: boolean` Whether this profile can be accessed by anyone. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const predefinedProfile = await client.zeroTrust.dlp.profiles.predefined.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(predefinedProfile.id); ``` #### Response ```json { "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", "allowed_match_count": 0, "confidence_threshold": "confidence_threshold", "enabled_entries": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "name": "name", "ai_context_enabled": true, "ocr_enabled": true, "open_access": true } } ``` ## Delete predefined profile `client.zeroTrust.dlp.profiles.predefined.delete(stringprofileId, PredefinedDeleteParamsparams, RequestOptionsoptions?): PredefinedDeleteResponse | null` **delete** `/accounts/{account_id}/dlp/profiles/predefined/{profile_id}` This is a no-op as predefined profiles can't be deleted but is needed for our generated terraform API. ### Parameters - `profileId: string` - `params: PredefinedDeleteParams` - `account_id: string` ### Returns - `PredefinedDeleteResponse = unknown` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const predefined = await client.zeroTrust.dlp.profiles.predefined.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(predefined); ``` #### Response ```json { "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": {} } ``` ## Domain Types ### Predefined Profile - `PredefinedProfile` - `id: string` The id of the predefined profile (uuid). - `allowed_match_count: number` - `confidence_threshold: string | null` - `enabled_entries: Array` Entries to enable for this predefined profile. Any entries not provided will be disabled. - `entries: Array` This field has been deprecated for `enabled_entries`. - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `name: string` The name of the predefined profile. - `ai_context_enabled?: boolean` - `ocr_enabled?: boolean` - `open_access?: boolean` Whether this profile can be accessed by anyone. ### Predefined Delete Response - `PredefinedDeleteResponse = unknown` # Limits ## Fetch limits associated with DLP for account `client.zeroTrust.dlp.limits.list(LimitListParamsparams, RequestOptionsoptions?): LimitListResponse` **get** `/accounts/{account_id}/dlp/limits` Retrieves current DLP usage limits and quotas for the account, including dataset limits and scan quotas. ### Parameters - `params: LimitListParams` - `account_id: string` ### Returns - `LimitListResponse` - `max_dataset_cells: number` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const limits = await client.zeroTrust.dlp.limits.list({ account_id: 'account_id' }); console.log(limits.max_dataset_cells); ``` #### Response ```json { "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": { "max_dataset_cells": 0 } } ``` ## Domain Types ### Limit List Response - `LimitListResponse` - `max_dataset_cells: number` # Entries ## List all entries `client.zeroTrust.dlp.entries.list(EntryListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Parameters - `params: EntryListParams` - `account_id: string` ### Returns - `EntryListResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const entryListResponse of client.zeroTrust.dlp.entries.list({ account_id: 'account_id', })) { console.log(entryListResponse); } ``` #### Response ```json { "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", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "upload_status": "empty" } ] } ``` ## Get DLP Entry `client.zeroTrust.dlp.entries.get(stringentryId, EntryGetParamsparams, RequestOptionsoptions?): EntryGetResponse` **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Parameters - `entryId: string` - `params: EntryGetParams` - `account_id: string` ### Returns - `EntryGetResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const entry = await client.zeroTrust.dlp.entries.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', }); console.log(entry); ``` #### Response ```json { "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", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "profiles": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ], "upload_status": "empty" } } ``` ## Create custom entry `client.zeroTrust.dlp.entries.create(EntryCreateParamsparams, RequestOptionsoptions?): EntryCreateResponse` **post** `/accounts/{account_id}/dlp/entries` Creates a DLP custom entry. ### Parameters - `params: EntryCreateParams` - `account_id: string` Path param - `enabled: boolean` Body param - `name: string` Body param - `pattern: Pattern` Body param - `regex: string` - `validation?: "luhn"` - `"luhn"` - `description?: string | null` Body param - `profile_id?: string` Body param ### Returns - `EntryCreateResponse` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const entry = await client.zeroTrust.dlp.entries.create({ account_id: 'account_id', enabled: true, name: 'name', pattern: { regex: 'regex' }, }); console.log(entry.id); ``` #### Response ```json { "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", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Update entry `client.zeroTrust.dlp.entries.update(stringentryId, EntryUpdateParamsparams, RequestOptionsoptions?): EntryUpdateResponse` **put** `/accounts/{account_id}/dlp/entries/{entry_id}` Updates a DLP entry. ### Parameters - `entryId: string` - `EntryUpdateParams = Variant0 | Variant1 | Variant2` - `EntryUpdateParamsBase` - `Variant0 extends EntryUpdateParamsBase` - `Variant1 extends EntryUpdateParamsBase` - `Variant2 extends EntryUpdateParamsBase` ### Returns - `EntryUpdateResponse = CustomEntry | PredefinedEntry | IntegrationEntry | 3 more` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const entry = await client.zeroTrust.dlp.entries.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', name: 'name', pattern: { regex: 'regex' }, type: 'custom', }); console.log(entry); ``` #### Response ```json { "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", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Delete custom entry `client.zeroTrust.dlp.entries.delete(stringentryId, EntryDeleteParamsparams, RequestOptionsoptions?): EntryDeleteResponse | null` **delete** `/accounts/{account_id}/dlp/entries/{entry_id}` Deletes a DLP custom entry. ### Parameters - `entryId: string` - `params: EntryDeleteParams` - `account_id: string` ### Returns - `EntryDeleteResponse = unknown` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const entry = await client.zeroTrust.dlp.entries.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', }); console.log(entry); ``` #### Response ```json { "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": {} } ``` ## Domain Types ### Entry List Response - `EntryListResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Entry Get Response - `EntryGetResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Entry Create Response - `EntryCreateResponse` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` ### Entry Update Response - `EntryUpdateResponse = CustomEntry | PredefinedEntry | IntegrationEntry | 3 more` - `CustomEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `PredefinedEntry` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `IntegrationEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `ExactDataEntry` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `WordListEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` ### Entry Delete Response - `EntryDeleteResponse = unknown` # Custom ## Create custom entry `client.zeroTrust.dlp.entries.custom.create(CustomCreateParamsparams, RequestOptionsoptions?): CustomCreateResponse` **post** `/accounts/{account_id}/dlp/entries` Creates a DLP custom entry. ### Parameters - `params: CustomCreateParams` - `account_id: string` Path param - `enabled: boolean` Body param - `name: string` Body param - `pattern: Pattern` Body param - `regex: string` - `validation?: "luhn"` - `"luhn"` - `description?: string | null` Body param - `profile_id?: string` Body param ### Returns - `CustomCreateResponse` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const custom = await client.zeroTrust.dlp.entries.custom.create({ account_id: 'account_id', enabled: true, name: 'name', pattern: { regex: 'regex' }, }); console.log(custom.id); ``` #### Response ```json { "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", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Update custom entry `client.zeroTrust.dlp.entries.custom.update(stringentryId, CustomUpdateParamsparams, RequestOptionsoptions?): CustomUpdateResponse` **put** `/accounts/{account_id}/dlp/entries/custom/{entry_id}` Updates a DLP custom entry. ### Parameters - `entryId: string` - `params: CustomUpdateParams` - `account_id: string` Path param - `enabled: boolean` Body param - `name: string` Body param - `pattern: Pattern` Body param - `regex: string` - `validation?: "luhn"` - `"luhn"` - `description?: string | null` Body param ### Returns - `CustomUpdateResponse` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const custom = await client.zeroTrust.dlp.entries.custom.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', enabled: true, name: 'name', pattern: { regex: 'regex' }, }, ); console.log(custom.id); ``` #### Response ```json { "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", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Delete custom entry `client.zeroTrust.dlp.entries.custom.delete(stringentryId, CustomDeleteParamsparams, RequestOptionsoptions?): CustomDeleteResponse | null` **delete** `/accounts/{account_id}/dlp/entries/{entry_id}` Deletes a DLP custom entry. ### Parameters - `entryId: string` - `params: CustomDeleteParams` - `account_id: string` ### Returns - `CustomDeleteResponse = unknown` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const custom = await client.zeroTrust.dlp.entries.custom.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(custom); ``` #### Response ```json { "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": {} } ``` ## Get DLP Entry `client.zeroTrust.dlp.entries.custom.get(stringentryId, CustomGetParamsparams, RequestOptionsoptions?): CustomGetResponse` **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Parameters - `entryId: string` - `params: CustomGetParams` - `account_id: string` ### Returns - `CustomGetResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const custom = await client.zeroTrust.dlp.entries.custom.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(custom); ``` #### Response ```json { "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", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "profiles": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ], "upload_status": "empty" } } ``` ## List all entries `client.zeroTrust.dlp.entries.custom.list(CustomListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Parameters - `params: CustomListParams` - `account_id: string` ### Returns - `CustomListResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const customListResponse of client.zeroTrust.dlp.entries.custom.list({ account_id: 'account_id', })) { console.log(customListResponse); } ``` #### Response ```json { "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", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "upload_status": "empty" } ] } ``` ## Domain Types ### Custom Create Response - `CustomCreateResponse` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` ### Custom Update Response - `CustomUpdateResponse` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` ### Custom Delete Response - `CustomDeleteResponse = unknown` ### Custom Get Response - `CustomGetResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Custom List Response - `CustomListResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` # Predefined ## Create predefined entry `client.zeroTrust.dlp.entries.predefined.create(PredefinedCreateParamsparams, RequestOptionsoptions?): PredefinedCreateResponse` **post** `/accounts/{account_id}/dlp/entries/predefined` Predefined entries can't be created, this will update an existing predefined entry. This is needed for our generated terraform API. ### Parameters - `params: PredefinedCreateParams` - `account_id: string` Path param - `enabled: boolean` Body param - `entry_id: string` Body param - `profile_id?: string | null` Body param: This field is not used as the owning profile. For predefined entries it is already set to a predefined profile. ### Returns - `PredefinedCreateResponse` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const predefined = await client.zeroTrust.dlp.entries.predefined.create({ account_id: 'account_id', enabled: true, entry_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', }); console.log(predefined.id); ``` #### Response ```json { "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", "confidence": { "ai_context_available": true, "available": true }, "enabled": true, "name": "name", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "variant": { "topic_type": "Intent", "type": "PromptTopic", "description": "description" } } } ``` ## Update predefined entry `client.zeroTrust.dlp.entries.predefined.update(stringentryId, PredefinedUpdateParamsparams, RequestOptionsoptions?): PredefinedUpdateResponse` **put** `/accounts/{account_id}/dlp/entries/predefined/{entry_id}` Updates a DLP entry. ### Parameters - `entryId: string` - `params: PredefinedUpdateParams` - `account_id: string` Path param - `enabled: boolean` Body param ### Returns - `PredefinedUpdateResponse` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const predefined = await client.zeroTrust.dlp.entries.predefined.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', enabled: true }, ); console.log(predefined.id); ``` #### Response ```json { "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", "confidence": { "ai_context_available": true, "available": true }, "enabled": true, "name": "name", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "variant": { "topic_type": "Intent", "type": "PromptTopic", "description": "description" } } } ``` ## Delete predefined entry `client.zeroTrust.dlp.entries.predefined.delete(stringentryId, PredefinedDeleteParamsparams, RequestOptionsoptions?): PredefinedDeleteResponse | null` **delete** `/accounts/{account_id}/dlp/entries/predefined/{entry_id}` This is a no-op as predefined entires can't be deleted but is needed for our generated terraform API. ### Parameters - `entryId: string` - `params: PredefinedDeleteParams` - `account_id: string` ### Returns - `PredefinedDeleteResponse = unknown` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const predefined = await client.zeroTrust.dlp.entries.predefined.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(predefined); ``` #### Response ```json { "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": {} } ``` ## Get DLP Entry `client.zeroTrust.dlp.entries.predefined.get(stringentryId, PredefinedGetParamsparams, RequestOptionsoptions?): PredefinedGetResponse` **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Parameters - `entryId: string` - `params: PredefinedGetParams` - `account_id: string` ### Returns - `PredefinedGetResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const predefined = await client.zeroTrust.dlp.entries.predefined.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(predefined); ``` #### Response ```json { "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", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "profiles": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ], "upload_status": "empty" } } ``` ## List all entries `client.zeroTrust.dlp.entries.predefined.list(PredefinedListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Parameters - `params: PredefinedListParams` - `account_id: string` ### Returns - `PredefinedListResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const predefinedListResponse of client.zeroTrust.dlp.entries.predefined.list({ account_id: 'account_id', })) { console.log(predefinedListResponse); } ``` #### Response ```json { "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", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "upload_status": "empty" } ] } ``` ## Domain Types ### Predefined Create Response - `PredefinedCreateResponse` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` ### Predefined Update Response - `PredefinedUpdateResponse` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `profile_id?: string | null` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` ### Predefined Delete Response - `PredefinedDeleteResponse = unknown` ### Predefined Get Response - `PredefinedGetResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Predefined List Response - `PredefinedListResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` # Integration ## Create integration entry `client.zeroTrust.dlp.entries.integration.create(IntegrationCreateParamsparams, RequestOptionsoptions?): IntegrationCreateResponse` **post** `/accounts/{account_id}/dlp/entries/integration` Integration entries can't be created, this will update an existing integration entry. This is needed for our generated terraform API. ### Parameters - `params: IntegrationCreateParams` - `account_id: string` Path param - `enabled: boolean` Body param - `entry_id: string` Body param - `profile_id?: string | null` Body param: This field is not used as the owning profile. For predefined entries it is already set to a predefined profile. ### Returns - `IntegrationCreateResponse` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `updated_at: string` - `profile_id?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const integration = await client.zeroTrust.dlp.entries.integration.create({ account_id: 'account_id', enabled: true, entry_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', }); console.log(integration.id); ``` #### Response ```json { "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", "enabled": true, "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Update integration entry `client.zeroTrust.dlp.entries.integration.update(stringentryId, IntegrationUpdateParamsparams, RequestOptionsoptions?): IntegrationUpdateResponse` **put** `/accounts/{account_id}/dlp/entries/integration/{entry_id}` Updates a DLP entry. ### Parameters - `entryId: string` - `params: IntegrationUpdateParams` - `account_id: string` Path param - `enabled: boolean` Body param ### Returns - `IntegrationUpdateResponse` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `updated_at: string` - `profile_id?: string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const integration = await client.zeroTrust.dlp.entries.integration.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', enabled: true }, ); console.log(integration.id); ``` #### Response ```json { "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", "enabled": true, "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Delete integration entry `client.zeroTrust.dlp.entries.integration.delete(stringentryId, IntegrationDeleteParamsparams, RequestOptionsoptions?): IntegrationDeleteResponse | null` **delete** `/accounts/{account_id}/dlp/entries/integration/{entry_id}` This is a no-op as integration entires can't be deleted but is needed for our generated terraform API. ### Parameters - `entryId: string` - `params: IntegrationDeleteParams` - `account_id: string` ### Returns - `IntegrationDeleteResponse = unknown` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const integration = await client.zeroTrust.dlp.entries.integration.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(integration); ``` #### Response ```json { "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": {} } ``` ## Get DLP Entry `client.zeroTrust.dlp.entries.integration.get(stringentryId, IntegrationGetParamsparams, RequestOptionsoptions?): IntegrationGetResponse` **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Parameters - `entryId: string` - `params: IntegrationGetParams` - `account_id: string` ### Returns - `IntegrationGetResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const integration = await client.zeroTrust.dlp.entries.integration.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(integration); ``` #### Response ```json { "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", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "profiles": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ], "upload_status": "empty" } } ``` ## List all entries `client.zeroTrust.dlp.entries.integration.list(IntegrationListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Parameters - `params: IntegrationListParams` - `account_id: string` ### Returns - `IntegrationListResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const integrationListResponse of client.zeroTrust.dlp.entries.integration.list({ account_id: 'account_id', })) { console.log(integrationListResponse); } ``` #### Response ```json { "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", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "upload_status": "empty" } ] } ``` ## Domain Types ### Integration Create Response - `IntegrationCreateResponse` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `updated_at: string` - `profile_id?: string | null` ### Integration Update Response - `IntegrationUpdateResponse` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `updated_at: string` - `profile_id?: string | null` ### Integration Delete Response - `IntegrationDeleteResponse = unknown` ### Integration Get Response - `IntegrationGetResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Integration List Response - `IntegrationListResponse = UnionMember0 | UnionMember1 | UnionMember2 | 3 more` - `UnionMember0` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `pattern: Pattern` - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` - `"custom"` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember1` - `id: string` - `confidence: Confidence` - `ai_context_available: boolean` Indicates whether this entry has AI remote service validation. - `available: boolean` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: boolean` - `name: string` - `type: "predefined"` - `"predefined"` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant?: Variant` - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` - `UnionMember2` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "integration"` - `"integration"` - `updated_at: string` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember3` - `id: string` - `case_sensitive: boolean` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: string` - `enabled: boolean` - `name: string` - `secret: boolean` - `type: "exact_data"` - `"exact_data"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember4` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "word_list"` - `"word_list"` - `updated_at: string` - `word_list: unknown` - `profile_id?: string | null` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"`