Create a new dataset
client.zeroTrust.dlp.datasets.create(DatasetCreateParams { account_id, name, case_sensitive, 3 more } params, RequestOptionsoptions?): DatasetCreation { dataset, encoding_version, max_cells, 2 more }
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.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Create a new dataset
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);{
"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"
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"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"
}
}