# DLP # Custom Prompt Topics ## List custom prompt topics `client.zeroTrust.dlp.customPromptTopics.list(CustomPromptTopicListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/custom_prompt_topics` Lists all DLP custom prompt topic entries in an account. ### Parameters - `params: CustomPromptTopicListParams` - `account_id: string` ### Returns - `CustomPromptTopic` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `topic: string` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` ### Example ```typescript 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 customPromptTopic of client.zeroTrust.dlp.customPromptTopics.list({ account_id: 'account_id', })) { console.log(customPromptTopic.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", "topic": "topic", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } ``` ## Get custom prompt topic `client.zeroTrust.dlp.customPromptTopics.get(stringentryID, CustomPromptTopicGetParamsparams, RequestOptionsoptions?): CustomPromptTopic` **get** `/accounts/{account_id}/dlp/custom_prompt_topics/{entry_id}` Fetches a DLP custom prompt topic entry by ID. ### Parameters - `entryID: string` - `params: CustomPromptTopicGetParams` - `account_id: string` ### Returns - `CustomPromptTopic` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `topic: string` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const customPromptTopic = await client.zeroTrust.dlp.customPromptTopics.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(customPromptTopic.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", "topic": "topic", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Create custom prompt topic `client.zeroTrust.dlp.customPromptTopics.create(CustomPromptTopicCreateParamsparams, RequestOptionsoptions?): CustomPromptTopic` **post** `/accounts/{account_id}/dlp/custom_prompt_topics` Creates a DLP custom prompt topic entry. ### Parameters - `params: CustomPromptTopicCreateParams` - `account_id: string` Path param - `enabled: boolean` Body param - `name: string` Body param - `topic: string` Body param - `description?: string | null` Body param - `profile_id?: string` Body param ### Returns - `CustomPromptTopic` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `topic: string` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const customPromptTopic = await client.zeroTrust.dlp.customPromptTopics.create({ account_id: 'account_id', enabled: true, name: 'name', topic: 'topic', }); console.log(customPromptTopic.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", "topic": "topic", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Update custom prompt topic `client.zeroTrust.dlp.customPromptTopics.update(stringentryID, CustomPromptTopicUpdateParamsparams, RequestOptionsoptions?): CustomPromptTopic` **put** `/accounts/{account_id}/dlp/custom_prompt_topics/{entry_id}` Updates a DLP custom prompt topic entry. ### Parameters - `entryID: string` - `params: CustomPromptTopicUpdateParams` - `account_id: string` Path param - `enabled: boolean` Body param - `name: string` Body param - `topic: string` Body param - `description?: string | null` Body param ### Returns - `CustomPromptTopic` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `topic: string` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const customPromptTopic = await client.zeroTrust.dlp.customPromptTopics.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', enabled: true, name: 'name', topic: 'topic', }, ); console.log(customPromptTopic.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", "topic": "topic", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Delete custom prompt topic `client.zeroTrust.dlp.customPromptTopics.delete(stringentryID, CustomPromptTopicDeleteParamsparams, RequestOptionsoptions?): CustomPromptTopicDeleteResponse | null` **delete** `/accounts/{account_id}/dlp/custom_prompt_topics/{entry_id}` Deletes a DLP custom prompt topic entry. ### Parameters - `entryID: string` - `params: CustomPromptTopicDeleteParams` - `account_id: string` ### Returns - `CustomPromptTopicDeleteResponse = unknown` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const customPromptTopic = await client.zeroTrust.dlp.customPromptTopics.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(customPromptTopic); ``` #### 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 Prompt Topic - `CustomPromptTopic` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `topic: string` - `updated_at: string` - `description?: string | null` - `profile_id?: string | null` ### Custom Prompt Topic Delete Response - `CustomPromptTopicDeleteResponse = unknown` # 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 ```typescript 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}` Gets a dataset and its latest upload status. ### 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 ```typescript 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 ```typescript 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 ```typescript 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 ```typescript 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 ```typescript 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(numberversion, "string" | "ArrayBuffer" | "ArrayBufferView" | 2 moredataset, 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 - `version: number` - `dataset: "string" | "ArrayBuffer" | "ArrayBufferView" | 2 more` - `params: UploadEditParams` - `account_id: string` Path param - `dataset_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 ```typescript 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( 0, fs.createReadStream('path/to/file'), { account_id: 'account_id', dataset_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }, ); 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(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 - `version: number` - `params: VersionCreateParams` - `account_id: string` Path param - `dataset_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 ```typescript 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(0, { account_id: 'account_id', dataset_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', 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(stringentryID, "string" | "ArrayBuffer" | "ArrayBufferView" | 2 moredatasetVersionEntry, 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 - `entryID: string` - `datasetVersionEntry: "string" | "ArrayBuffer" | "ArrayBufferView" | 2 more` - `params: EntryCreateParams` - `account_id: string` Path param - `dataset_id: string` Path param - `version: number` 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 ```typescript 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', fs.createReadStream('path/to/file'), { account_id: 'account_id', dataset_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', version: 0, }, ); 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 ```typescript 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 ```typescript 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 ```typescript 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. # Settings ## Get DLP account-level settings. `client.zeroTrust.dlp.settings.get(SettingGetParamsparams, RequestOptionsoptions?): DLPSettings` **get** `/accounts/{account_id}/dlp/settings` Gets the account-level DLP settings. ### Parameters - `params: SettingGetParams` - `account_id: string` ### Returns - `DLPSettings` DLP account-level settings response. - `ai_context_analysis: boolean` Whether AI context analysis is enabled at the account level. - `ocr: boolean` Whether OCR is enabled at the account level. - `payload_logging: PayloadLogging` - `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 ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dlpSettings = await client.zeroTrust.dlp.settings.get({ account_id: 'account_id' }); console.log(dlpSettings.ai_context_analysis); ``` #### 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": { "ai_context_analysis": true, "ocr": true, "payload_logging": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } } ``` ## Update DLP account-level settings (full replacement). `client.zeroTrust.dlp.settings.update(SettingUpdateParamsparams, RequestOptionsoptions?): DLPSettings` **put** `/accounts/{account_id}/dlp/settings` Missing fields are reset to initial (unconfigured) values. ### Parameters - `params: SettingUpdateParams` - `account_id: string` Path param - `ai_context_analysis?: boolean | null` Body param: Whether AI context analysis is enabled at the account level. - `ocr?: boolean | null` Body param: Whether OCR is enabled at the account level. - `payload_logging?: PayloadLogging` Body param: Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT). - `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. - Set to a non-empty base64 string to enable payload logging with the given key. - Set to an empty string to disable payload logging. - Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT). ### Returns - `DLPSettings` DLP account-level settings response. - `ai_context_analysis: boolean` Whether AI context analysis is enabled at the account level. - `ocr: boolean` Whether OCR is enabled at the account level. - `payload_logging: PayloadLogging` - `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 ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dlpSettings = await client.zeroTrust.dlp.settings.update({ account_id: 'account_id' }); console.log(dlpSettings.ai_context_analysis); ``` #### 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": { "ai_context_analysis": true, "ocr": true, "payload_logging": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } } ``` ## Partially update DLP account-level settings. `client.zeroTrust.dlp.settings.edit(SettingEditParamsparams, RequestOptionsoptions?): DLPSettings` **patch** `/accounts/{account_id}/dlp/settings` Missing fields keep their existing values. ### Parameters - `params: SettingEditParams` - `account_id: string` Path param - `ai_context_analysis?: boolean | null` Body param: Whether AI context analysis is enabled at the account level. - `ocr?: boolean | null` Body param: Whether OCR is enabled at the account level. - `payload_logging?: PayloadLogging` Body param: Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT). - `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. - Set to a non-empty base64 string to enable payload logging with the given key. - Set to an empty string to disable payload logging. - Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT). ### Returns - `DLPSettings` DLP account-level settings response. - `ai_context_analysis: boolean` Whether AI context analysis is enabled at the account level. - `ocr: boolean` Whether OCR is enabled at the account level. - `payload_logging: PayloadLogging` - `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 ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dlpSettings = await client.zeroTrust.dlp.settings.edit({ account_id: 'account_id' }); console.log(dlpSettings.ai_context_analysis); ``` #### 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": { "ai_context_analysis": true, "ocr": true, "payload_logging": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } } ``` ## Delete (reset) DLP account-level settings to initial values. `client.zeroTrust.dlp.settings.delete(SettingDeleteParamsparams, RequestOptionsoptions?): DLPSettings` **delete** `/accounts/{account_id}/dlp/settings` Deletes account-level DLP settings and returns the initial values. ### Parameters - `params: SettingDeleteParams` - `account_id: string` ### Returns - `DLPSettings` DLP account-level settings response. - `ai_context_analysis: boolean` Whether AI context analysis is enabled at the account level. - `ocr: boolean` Whether OCR is enabled at the account level. - `payload_logging: PayloadLogging` - `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 ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dlpSettings = await client.zeroTrust.dlp.settings.delete({ account_id: 'account_id' }); console.log(dlpSettings.ai_context_analysis); ``` #### 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": { "ai_context_analysis": true, "ocr": true, "payload_logging": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } } ``` ## Domain Types ### DLP Settings - `DLPSettings` DLP account-level settings response. - `ai_context_analysis: boolean` Whether AI context analysis is enabled at the account level. - `ocr: boolean` Whether OCR is enabled at the account level. - `payload_logging: PayloadLogging` - `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 ```typescript 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 ```typescript 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 ```typescript 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 ```typescript 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 ```typescript 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}` Updates a DLP email scanning 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 ```typescript 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 ```typescript 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 ```typescript 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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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 ```typescript 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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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 ```typescript 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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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 ```typescript 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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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 ```typescript 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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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 ```typescript 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 ```typescript 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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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 ```typescript 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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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 ```typescript 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 ```typescript 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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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 maximum allowed counts and current usage for custom entries, dataset cells, and document fingerprints. ### Parameters - `params: LimitListParams` - `account_id: string` ### Returns - `LimitListResponse` - `max_custom_regex_entries: number` Maximum number of custom regex entries allowed for the account. - `max_dataset_cells: number` Maximum number of dataset cells allowed for the account, across all EDM and CWL datasets. - `max_document_fingerprints: number` Maximum number of document fingerprints allowed for the account. - `used_custom_regex_entries: number` Number of custom regex entries currently configured for the account. - `used_dataset_cells: number` Number of dataset cells currently configured for the account, across all EDM and CWL datasets. Document fingerprints do not count towards this limit. - `used_document_fingerprints: number` Number of document fingerprints currently configured for the account. ### Example ```typescript 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_custom_regex_entries); ``` #### 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_custom_regex_entries": 0, "max_dataset_cells": 0, "max_document_fingerprints": 0, "used_custom_regex_entries": 0, "used_dataset_cells": 0, "used_document_fingerprints": 0 } } ``` ## Domain Types ### Limit List Response - `LimitListResponse` - `max_custom_regex_entries: number` Maximum number of custom regex entries allowed for the account. - `max_dataset_cells: number` Maximum number of dataset cells allowed for the account, across all EDM and CWL datasets. - `max_document_fingerprints: number` Maximum number of document fingerprints allowed for the account. - `used_custom_regex_entries: number` Number of custom regex entries currently configured for the account. - `used_dataset_cells: number` Number of dataset cells currently configured for the account, across all EDM and CWL datasets. Document fingerprints do not count towards this limit. - `used_document_fingerprints: number` Number of document fingerprints currently configured for the account. # 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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 ```typescript 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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `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: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 ```typescript 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 ```typescript 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` - `account_id: string` Path param - `name: string` Body param - `pattern: Pattern` Body param - `regex: string` - `validation?: "luhn"` - `"luhn"` - `type: "custom"` Body param - `"custom"` - `description?: string | null` Body param - `enabled?: boolean` Body param - `Variant0 extends EntryUpdateParamsBase` - `Variant1 extends EntryUpdateParamsBase` - `Variant2 extends EntryUpdateParamsBase` ### Returns - `EntryUpdateResponse = CustomEntry | CustomPromptTopicEntry | PredefinedEntry | 4 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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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 ```typescript 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 ```typescript 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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `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: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 | CustomPromptTopicEntry | PredefinedEntry | 4 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` - `CustomPromptTopicEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `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` - `description?: string | null` The optional description of the exact data entry. - `DocumentFingerprintEntry` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `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 ```typescript 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 ```typescript 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 ```typescript 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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `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: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 ```typescript 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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 ```typescript 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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `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: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. ### Example ```typescript 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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. ### Example ```typescript 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 ```typescript 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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `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: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 ```typescript 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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 ```typescript 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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. ### 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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. ### Predefined Delete Response - `PredefinedDeleteResponse = unknown` ### Predefined Get Response - `PredefinedGetResponse = UnionMember0 | UnionMember1 | UnionMember2 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `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: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 ```typescript 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 ```typescript 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 ```typescript 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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `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: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 ```typescript 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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 ```typescript 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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `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: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `profiles?: Array` - `id: string` - `name: string` - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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 | 4 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` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "custom_prompt_topic"` - `"custom_prompt_topic"` - `updated_at: string` - `description?: string | null` The optional description of the custom prompt topic entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember2` - `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?: UnionMember0 | UnionMember1` A Predefined AI prompt classification topic entry. - `UnionMember0` A Predefined AI prompt classification topic entry. - `topic_type: "Intent" | "Content"` - `"Intent"` - `"Content"` - `type: "PromptTopic"` - `"PromptTopic"` - `description?: string | null` A customer-facing explanation of what this predefined AI prompt topic represents. - `UnionMember1` A general predefined entry. - `type: "General"` - `"General"` - `description?: string | null` A customer-facing explanation of what this predefined entry represents. - `UnionMember3` - `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"` - `UnionMember4` - `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` - `description?: string | null` The optional description of the exact data entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember5` - `id: string` - `created_at: string` - `enabled: boolean` - `name: string` - `type: "document_fingerprint"` - `"document_fingerprint"` - `updated_at: string` - `description?: string | null` The optional description of the document fingerprint entry. - `upload_status?: "empty" | "uploading" | "pending" | 3 more` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `UnionMember6` - `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"` # Sensitivity Groups ## Retrieve all sensitivity groups in an account `client.zeroTrust.dlp.sensitivityGroups.list(SensitivityGroupListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/sensitivity_groups` Lists sensitivity groups configured for the account. ### Parameters - `params: SensitivityGroupListParams` - `account_id: string` ### Returns - `SensitivityGroupListResponse` - `id: string` - `created_at: string` - `levels: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `name: string` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Example ```typescript 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 sensitivityGroupListResponse of client.zeroTrust.dlp.sensitivityGroups.list({ account_id: 'account_id', })) { console.log(sensitivityGroupListResponse.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", "levels": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ], "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "template_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } ``` ## Retrieve a specific sensitivity group. `client.zeroTrust.dlp.sensitivityGroups.get(stringsensitivityGroupID, SensitivityGroupGetParamsparams, RequestOptionsoptions?): SensitivityGroupGetResponse` **get** `/accounts/{account_id}/dlp/sensitivity_groups/{sensitivity_group_id}` Gets a sensitivity group and its levels. ### Parameters - `sensitivityGroupID: string` - `params: SensitivityGroupGetParams` - `account_id: string` ### Returns - `SensitivityGroupGetResponse` - `id: string` - `created_at: string` - `levels: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `name: string` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const sensitivityGroup = await client.zeroTrust.dlp.sensitivityGroups.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(sensitivityGroup.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", "levels": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ], "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "template_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Creates a new sensitivity group. `client.zeroTrust.dlp.sensitivityGroups.create(SensitivityGroupCreateParamsparams, RequestOptionsoptions?): SensitivityGroupCreateResponse` **post** `/accounts/{account_id}/dlp/sensitivity_groups` Creates a sensitivity group, optionally from a template. ### Parameters - `params: SensitivityGroupCreateParams` - `account_id: string` Path param - `name: string` Body param - `description?: string | null` Body param - `levels?: Array` Body param: Levels to create with the group. Mutually exclusive with `template_id`. - `name: string` - `description?: string | null` - `template_id?: string | null` Body param ### Returns - `SensitivityGroupCreateResponse` - `id: string` - `created_at: string` - `levels: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `name: string` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const sensitivityGroup = await client.zeroTrust.dlp.sensitivityGroups.create({ account_id: 'account_id', name: 'name', }); console.log(sensitivityGroup.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", "levels": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ], "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "template_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Update the attributes of a single sensitivity group. `client.zeroTrust.dlp.sensitivityGroups.update(stringsensitivityGroupID, SensitivityGroupUpdateParamsparams, RequestOptionsoptions?): SensitivityGroupUpdateResponse` **put** `/accounts/{account_id}/dlp/sensitivity_groups/{sensitivity_group_id}` Updates a sensitivity group and its levels. ### Parameters - `sensitivityGroupID: string` - `params: SensitivityGroupUpdateParams` - `account_id: string` Path param - `description?: string | null` Body param - `levels?: Array | null` Body param: The desired final state of levels. - `None` (omitted): no level changes. - `Some([])`: delete all levels. - `Some([...])`: desired final set + order. - `id?: string | null` If `None` (omitted), a new level will be created. Otherwise, an existing level will be updated. - `description?: string | null` - `name?: string | null` - `name?: string | null` Body param ### Returns - `SensitivityGroupUpdateResponse` - `id: string` - `created_at: string` - `levels: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `name: string` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const sensitivityGroup = await client.zeroTrust.dlp.sensitivityGroups.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(sensitivityGroup.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", "levels": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ], "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "template_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Delete a single sensitivity group. `client.zeroTrust.dlp.sensitivityGroups.delete(stringsensitivityGroupID, SensitivityGroupDeleteParamsparams, RequestOptionsoptions?): SensitivityGroupDeleteResponse | null` **delete** `/accounts/{account_id}/dlp/sensitivity_groups/{sensitivity_group_id}` Deletes a sensitivity group and its levels. ### Parameters - `sensitivityGroupID: string` - `params: SensitivityGroupDeleteParams` - `account_id: string` ### Returns - `SensitivityGroupDeleteResponse = unknown` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const sensitivityGroup = await client.zeroTrust.dlp.sensitivityGroups.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(sensitivityGroup); ``` #### 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 ### Sensitivity Group List Response - `SensitivityGroupListResponse` - `id: string` - `created_at: string` - `levels: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `name: string` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Sensitivity Group Get Response - `SensitivityGroupGetResponse` - `id: string` - `created_at: string` - `levels: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `name: string` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Sensitivity Group Create Response - `SensitivityGroupCreateResponse` - `id: string` - `created_at: string` - `levels: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `name: string` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Sensitivity Group Update Response - `SensitivityGroupUpdateResponse` - `id: string` - `created_at: string` - `levels: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `name: string` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Sensitivity Group Delete Response - `SensitivityGroupDeleteResponse = unknown` # Levels ## Retrieve all sensitivity levels in a sensitivity group `client.zeroTrust.dlp.sensitivityGroups.levels.list(stringsensitivityGroupID, LevelListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/sensitivity_groups/{sensitivity_group_id}/levels` Lists sensitivity levels in a sensitivity group. ### Parameters - `sensitivityGroupID: string` - `params: LevelListParams` - `account_id: string` ### Returns - `LevelListResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Example ```typescript 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 levelListResponse of client.zeroTrust.dlp.sensitivityGroups.levels.list( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, )) { console.log(levelListResponse.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", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ] } ``` ## Retrieve a specific sensitivity level. `client.zeroTrust.dlp.sensitivityGroups.levels.get(stringsensitivityLevelID, LevelGetParamsparams, RequestOptionsoptions?): LevelGetResponse` **get** `/accounts/{account_id}/dlp/sensitivity_groups/{sensitivity_group_id}/levels/{sensitivity_level_id}` Gets a sensitivity level from a group. ### Parameters - `sensitivityLevelID: string` - `params: LevelGetParams` - `account_id: string` - `sensitivity_group_id: string` ### Returns - `LevelGetResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const level = await client.zeroTrust.dlp.sensitivityGroups.levels.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', sensitivity_group_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }, ); console.log(level.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", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Creates a new sensitivity level. `client.zeroTrust.dlp.sensitivityGroups.levels.create(stringsensitivityGroupID, LevelCreateParamsparams, RequestOptionsoptions?): LevelCreateResponse` **post** `/accounts/{account_id}/dlp/sensitivity_groups/{sensitivity_group_id}/levels` Creates a sensitivity level in a group. ### Parameters - `sensitivityGroupID: string` - `params: LevelCreateParams` - `account_id: string` Path param - `name: string` Body param - `description?: string | null` Body param ### Returns - `LevelCreateResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const level = await client.zeroTrust.dlp.sensitivityGroups.levels.create( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', name: 'name' }, ); console.log(level.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", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Update the attributes of a single sensitivity level. `client.zeroTrust.dlp.sensitivityGroups.levels.update(stringsensitivityLevelID, LevelUpdateParamsparams, RequestOptionsoptions?): LevelUpdateResponse` **put** `/accounts/{account_id}/dlp/sensitivity_groups/{sensitivity_group_id}/levels/{sensitivity_level_id}` Updates a sensitivity level in a group. ### Parameters - `sensitivityLevelID: string` - `params: LevelUpdateParams` - `account_id: string` Path param - `sensitivity_group_id: string` Path param - `description?: string | null` Body param - `name?: string | null` Body param ### Returns - `LevelUpdateResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const level = await client.zeroTrust.dlp.sensitivityGroups.levels.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', sensitivity_group_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }, ); console.log(level.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", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Delete a single sensitivity level. `client.zeroTrust.dlp.sensitivityGroups.levels.delete(stringsensitivityLevelID, LevelDeleteParamsparams, RequestOptionsoptions?): LevelDeleteResponse | null` **delete** `/accounts/{account_id}/dlp/sensitivity_groups/{sensitivity_group_id}/levels/{sensitivity_level_id}` Deletes a sensitivity level from a group. ### Parameters - `sensitivityLevelID: string` - `params: LevelDeleteParams` - `account_id: string` - `sensitivity_group_id: string` ### Returns - `LevelDeleteResponse = unknown` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const level = await client.zeroTrust.dlp.sensitivityGroups.levels.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', sensitivity_group_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }, ); console.log(level); ``` #### 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 ### Level List Response - `LevelListResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Level Get Response - `LevelGetResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Level Create Response - `LevelCreateResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Level Update Response - `LevelUpdateResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Level Delete Response - `LevelDeleteResponse = unknown` # Order ## Retrieve the ordered list of level IDs for a sensitivity group. `client.zeroTrust.dlp.sensitivityGroups.levels.order.get(stringsensitivityGroupID, OrderGetParamsparams, RequestOptionsoptions?): OrderGetResponse` **get** `/accounts/{account_id}/dlp/sensitivity_groups/{sensitivity_group_id}/level_order` Gets the current order of sensitivity levels in a group. ### Parameters - `sensitivityGroupID: string` - `params: OrderGetParams` - `account_id: string` ### Returns - `OrderGetResponse` The ordered list of level IDs for a sensitivity group. Used to get and set the ordering of levels independently of level attributes. - `level_ids: Array` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const order = await client.zeroTrust.dlp.sensitivityGroups.levels.order.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(order.level_ids); ``` #### 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": { "level_ids": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ] } } ``` ## Set the ordering of levels within a sensitivity group. `client.zeroTrust.dlp.sensitivityGroups.levels.order.update(stringsensitivityGroupID, OrderUpdateParamsparams, RequestOptionsoptions?): OrderUpdateResponse` **put** `/accounts/{account_id}/dlp/sensitivity_groups/{sensitivity_group_id}/level_order` Updates the order of sensitivity levels in a group. ### Parameters - `sensitivityGroupID: string` - `params: OrderUpdateParams` - `account_id: string` Path param - `level_ids: Array` Body param ### Returns - `OrderUpdateResponse` The ordered list of level IDs for a sensitivity group. Used to get and set the ordering of levels independently of level attributes. - `level_ids: Array` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const order = await client.zeroTrust.dlp.sensitivityGroups.levels.order.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', level_ids: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'] }, ); console.log(order.level_ids); ``` #### 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": { "level_ids": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ] } } ``` ## Domain Types ### Order Get Response - `OrderGetResponse` The ordered list of level IDs for a sensitivity group. Used to get and set the ordering of levels independently of level attributes. - `level_ids: Array` ### Order Update Response - `OrderUpdateResponse` The ordered list of level IDs for a sensitivity group. Used to get and set the ordering of levels independently of level attributes. - `level_ids: Array` # Data Tag Categories ## Retrieve all data tag categories in an account `client.zeroTrust.dlp.dataTagCategories.list(DataTagCategoryListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/data_tag_categories` Lists data tag categories configured for the account. ### Parameters - `params: DataTagCategoryListParams` - `account_id: string` ### Returns - `DataTagCategoryListResponse` - `id: string` - `created_at: string` - `name: string` - `tags: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Example ```typescript 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 dataTagCategoryListResponse of client.zeroTrust.dlp.dataTagCategories.list({ account_id: 'account_id', })) { console.log(dataTagCategoryListResponse.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", "name": "name", "tags": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ], "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "template_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } ``` ## Retrieve a specific data tag category. `client.zeroTrust.dlp.dataTagCategories.get(stringcategoryID, DataTagCategoryGetParamsparams, RequestOptionsoptions?): DataTagCategoryGetResponse` **get** `/accounts/{account_id}/dlp/data_tag_categories/{category_id}` Gets a data tag category and its tags. ### Parameters - `categoryID: string` - `params: DataTagCategoryGetParams` - `account_id: string` ### Returns - `DataTagCategoryGetResponse` - `id: string` - `created_at: string` - `name: string` - `tags: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataTagCategory = await client.zeroTrust.dlp.dataTagCategories.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(dataTagCategory.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", "name": "name", "tags": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ], "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "template_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Creates a new data tag category. `client.zeroTrust.dlp.dataTagCategories.create(DataTagCategoryCreateParamsparams, RequestOptionsoptions?): DataTagCategoryCreateResponse` **post** `/accounts/{account_id}/dlp/data_tag_categories` Creates a data tag category, optionally from a template. ### Parameters - `params: DataTagCategoryCreateParams` - `account_id: string` Path param - `name: string` Body param - `description?: string | null` Body param - `tags?: Array` Body param: Tags to create with the category. Mutually exclusive with `template_id`. - `name: string` - `description?: string | null` - `template_id?: string | null` Body param ### Returns - `DataTagCategoryCreateResponse` - `id: string` - `created_at: string` - `name: string` - `tags: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataTagCategory = await client.zeroTrust.dlp.dataTagCategories.create({ account_id: 'account_id', name: 'name', }); console.log(dataTagCategory.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", "name": "name", "tags": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ], "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "template_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Update the attributes of a single data tag category. `client.zeroTrust.dlp.dataTagCategories.update(stringcategoryID, DataTagCategoryUpdateParamsparams, RequestOptionsoptions?): DataTagCategoryUpdateResponse` **put** `/accounts/{account_id}/dlp/data_tag_categories/{category_id}` Updates a data tag category and its tags. ### Parameters - `categoryID: string` - `params: DataTagCategoryUpdateParams` - `account_id: string` Path param - `description?: string | null` Body param - `name?: string | null` Body param - `tags?: Array | null` Body param: The desired final state of tags. - `None` (omitted): no tag changes. - `Some([])`: delete all tags. - `Some([...])`: desired final set + order. - `id?: string | null` If `None` (omitted), a new tag will be created. Otherwise, an existing tag will be updated. - `description?: string | null` - `name?: string | null` ### Returns - `DataTagCategoryUpdateResponse` - `id: string` - `created_at: string` - `name: string` - `tags: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataTagCategory = await client.zeroTrust.dlp.dataTagCategories.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(dataTagCategory.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", "name": "name", "tags": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ], "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "template_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Delete a single data tag category. `client.zeroTrust.dlp.dataTagCategories.delete(stringcategoryID, DataTagCategoryDeleteParamsparams, RequestOptionsoptions?): DataTagCategoryDeleteResponse | null` **delete** `/accounts/{account_id}/dlp/data_tag_categories/{category_id}` Deletes a data tag category and its tags. ### Parameters - `categoryID: string` - `params: DataTagCategoryDeleteParams` - `account_id: string` ### Returns - `DataTagCategoryDeleteResponse = unknown` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataTagCategory = await client.zeroTrust.dlp.dataTagCategories.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(dataTagCategory); ``` #### 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 ### Data Tag Category List Response - `DataTagCategoryListResponse` - `id: string` - `created_at: string` - `name: string` - `tags: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Data Tag Category Get Response - `DataTagCategoryGetResponse` - `id: string` - `created_at: string` - `name: string` - `tags: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Data Tag Category Create Response - `DataTagCategoryCreateResponse` - `id: string` - `created_at: string` - `name: string` - `tags: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Data Tag Category Update Response - `DataTagCategoryUpdateResponse` - `id: string` - `created_at: string` - `name: string` - `tags: Array` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` - `updated_at: string` - `description?: string | null` - `template_id?: string | null` ### Data Tag Category Delete Response - `DataTagCategoryDeleteResponse = unknown` # Data Tags ## Retrieve all data tags in a data tag category `client.zeroTrust.dlp.dataTagCategories.dataTags.list(stringcategoryID, DataTagListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/data_tag_categories/{category_id}/data_tags` Lists data tags in a category. ### Parameters - `categoryID: string` - `params: DataTagListParams` - `account_id: string` ### Returns - `DataTagListResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Example ```typescript 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 dataTagListResponse of client.zeroTrust.dlp.dataTagCategories.dataTags.list( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, )) { console.log(dataTagListResponse.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", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ] } ``` ## Retrieve a specific data tag. `client.zeroTrust.dlp.dataTagCategories.dataTags.get(stringtagID, DataTagGetParamsparams, RequestOptionsoptions?): DataTagGetResponse` **get** `/accounts/{account_id}/dlp/data_tag_categories/{category_id}/data_tags/{tag_id}` Gets a data tag from a category. ### Parameters - `tagID: string` - `params: DataTagGetParams` - `account_id: string` - `category_id: string` ### Returns - `DataTagGetResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataTag = await client.zeroTrust.dlp.dataTagCategories.dataTags.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }, ); console.log(dataTag.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", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Creates a new data tag. `client.zeroTrust.dlp.dataTagCategories.dataTags.create(stringcategoryID, DataTagCreateParamsparams, RequestOptionsoptions?): DataTagCreateResponse` **post** `/accounts/{account_id}/dlp/data_tag_categories/{category_id}/data_tags` Creates a data tag in a category. ### Parameters - `categoryID: string` - `params: DataTagCreateParams` - `account_id: string` Path param - `name: string` Body param - `description?: string | null` Body param ### Returns - `DataTagCreateResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataTag = await client.zeroTrust.dlp.dataTagCategories.dataTags.create( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', name: 'name' }, ); console.log(dataTag.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", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Update the attributes of a single data tag. `client.zeroTrust.dlp.dataTagCategories.dataTags.update(stringtagID, DataTagUpdateParamsparams, RequestOptionsoptions?): DataTagUpdateResponse` **put** `/accounts/{account_id}/dlp/data_tag_categories/{category_id}/data_tags/{tag_id}` Updates a data tag in a category. ### Parameters - `tagID: string` - `params: DataTagUpdateParams` - `account_id: string` Path param - `category_id: string` Path param - `description?: string | null` Body param - `name?: string | null` Body param ### Returns - `DataTagUpdateResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataTag = await client.zeroTrust.dlp.dataTagCategories.dataTags.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }, ); console.log(dataTag.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", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Delete a single data tag. `client.zeroTrust.dlp.dataTagCategories.dataTags.delete(stringtagID, DataTagDeleteParamsparams, RequestOptionsoptions?): DataTagDeleteResponse | null` **delete** `/accounts/{account_id}/dlp/data_tag_categories/{category_id}/data_tags/{tag_id}` Deletes a data tag from a category. ### Parameters - `tagID: string` - `params: DataTagDeleteParams` - `account_id: string` - `category_id: string` ### Returns - `DataTagDeleteResponse = unknown` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataTag = await client.zeroTrust.dlp.dataTagCategories.dataTags.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }, ); console.log(dataTag); ``` #### 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 ### Data Tag List Response - `DataTagListResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Data Tag Get Response - `DataTagGetResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Data Tag Create Response - `DataTagCreateResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Data Tag Update Response - `DataTagUpdateResponse` - `id: string` - `created_at: string` - `name: string` - `updated_at: string` - `description?: string | null` ### Data Tag Delete Response - `DataTagDeleteResponse = unknown` # Data Classes ## Retrieve all data classes in an account `client.zeroTrust.dlp.dataClasses.list(DataClassListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/dlp/data_classes` Lists data classes configured for the account. ### Parameters - `params: DataClassListParams` - `account_id: string` ### Returns - `DataClassListResponse` - `id: string` - `created_at: string` - `data_tags: Array` - `expression: string` - `name: string` - `sensitivity_levels: Array` - `group_id: string` - `level_id: string` - `updated_at: string` - `description?: string | null` ### Example ```typescript 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 dataClassListResponse of client.zeroTrust.dlp.dataClasses.list({ account_id: 'account_id', })) { console.log(dataClassListResponse.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", "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "expression": "expression", "name": "name", "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ] } ``` ## Retrieve a specific data class `client.zeroTrust.dlp.dataClasses.get(stringdataClassID, DataClassGetParamsparams, RequestOptionsoptions?): DataClassGetResponse` **get** `/accounts/{account_id}/dlp/data_classes/{data_class_id}` Gets the configuration for a data class. ### Parameters - `dataClassID: string` - `params: DataClassGetParams` - `account_id: string` ### Returns - `DataClassGetResponse` - `id: string` - `created_at: string` - `data_tags: Array` - `expression: string` - `name: string` - `sensitivity_levels: Array` - `group_id: string` - `level_id: string` - `updated_at: string` - `description?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataClass = await client.zeroTrust.dlp.dataClasses.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(dataClass.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", "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "expression": "expression", "name": "name", "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Creates a new data class `client.zeroTrust.dlp.dataClasses.create(DataClassCreateParamsparams, RequestOptionsoptions?): DataClassCreateResponse` **post** `/accounts/{account_id}/dlp/data_classes` Creates a data class for use in DLP profiles. ### Parameters - `params: DataClassCreateParams` - `account_id: string` Path param - `data_tags: Array` Body param - `expression: string` Body param - `name: string` Body param - `sensitivity_levels: Array` Body param - `group_id: string` - `level_id: string` - `description?: string | null` Body param ### Returns - `DataClassCreateResponse` - `id: string` - `created_at: string` - `data_tags: Array` - `expression: string` - `name: string` - `sensitivity_levels: Array` - `group_id: string` - `level_id: string` - `updated_at: string` - `description?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataClass = await client.zeroTrust.dlp.dataClasses.create({ account_id: 'account_id', data_tags: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], expression: 'expression', name: 'name', sensitivity_levels: [ { group_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', level_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', }, ], }); console.log(dataClass.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", "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "expression": "expression", "name": "name", "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Update the attributes of a single data class `client.zeroTrust.dlp.dataClasses.update(stringdataClassID, DataClassUpdateParamsparams, RequestOptionsoptions?): DataClassUpdateResponse` **put** `/accounts/{account_id}/dlp/data_classes/{data_class_id}` Updates the configuration for a data class. ### Parameters - `dataClassID: string` - `params: DataClassUpdateParams` - `account_id: string` Path param - `data_tags?: Array | null` Body param - `description?: string | null` Body param - `expression?: string | null` Body param - `name?: string | null` Body param - `sensitivity_levels?: Array | null` Body param - `group_id: string` - `level_id: string` ### Returns - `DataClassUpdateResponse` - `id: string` - `created_at: string` - `data_tags: Array` - `expression: string` - `name: string` - `sensitivity_levels: Array` - `group_id: string` - `level_id: string` - `updated_at: string` - `description?: string | null` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataClass = await client.zeroTrust.dlp.dataClasses.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(dataClass.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", "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "expression": "expression", "name": "name", "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Delete a single data class `client.zeroTrust.dlp.dataClasses.delete(stringdataClassID, DataClassDeleteParamsparams, RequestOptionsoptions?): DataClassDeleteResponse | null` **delete** `/accounts/{account_id}/dlp/data_classes/{data_class_id}` Deletes a data class from the account. ### Parameters - `dataClassID: string` - `params: DataClassDeleteParams` - `account_id: string` ### Returns - `DataClassDeleteResponse = unknown` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const dataClass = await client.zeroTrust.dlp.dataClasses.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(dataClass); ``` #### 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 ### Data Class List Response - `DataClassListResponse` - `id: string` - `created_at: string` - `data_tags: Array` - `expression: string` - `name: string` - `sensitivity_levels: Array` - `group_id: string` - `level_id: string` - `updated_at: string` - `description?: string | null` ### Data Class Get Response - `DataClassGetResponse` - `id: string` - `created_at: string` - `data_tags: Array` - `expression: string` - `name: string` - `sensitivity_levels: Array` - `group_id: string` - `level_id: string` - `updated_at: string` - `description?: string | null` ### Data Class Create Response - `DataClassCreateResponse` - `id: string` - `created_at: string` - `data_tags: Array` - `expression: string` - `name: string` - `sensitivity_levels: Array` - `group_id: string` - `level_id: string` - `updated_at: string` - `description?: string | null` ### Data Class Update Response - `DataClassUpdateResponse` - `id: string` - `created_at: string` - `data_tags: Array` - `expression: string` - `name: string` - `sensitivity_levels: Array` - `group_id: string` - `level_id: string` - `updated_at: string` - `description?: string | null` ### Data Class Delete Response - `DataClassDeleteResponse = unknown`