Skip to content
Start here

List all profiles

zero_trust.dlp.profiles.list(ProfileListParams**kwargs) -> SyncSinglePage[Profile]
GET/accounts/{account_id}/dlp/profiles

Lists all DLP profiles in an account.

Security
API Token

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

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

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

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

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

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Zero Trust ReadZero Trust Write
ParametersExpand Collapse
account_id: str
all: Optional[bool]

Return all profiles, including those that current account does not have access to.

ReturnsExpand Collapse
One of the following:
class CustomProfile:
id: str

The id of the profile (uuid).

formatuuid
allowed_match_count: int

Related DLP policies will trigger when the match count exceeds the number set.

formatint32
maximum1000
minimum0
created_at: datetime

When the profile was created.

formatdate-time
name: str

The name of the profile.

ocr_enabled: bool
type: Literal["custom"]
updated_at: datetime

When the profile was lasted updated.

formatdate-time
ai_context_enabled: Optional[bool]
confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]
One of the following:
"low"
"medium"
"high"
"very_high"
Deprecatedcontext_awareness: Optional[ContextAwareness]

Scan the context of predefined entries to only return matches surrounded by keywords.

enabled: bool

If true, scan the context of predefined entries to only return matches surrounded by keywords.

data_classes: Optional[List[str]]

Data classes associated with this profile.

data_tags: Optional[List[str]]

Data tags associated with this profile.

description: Optional[str]

The description of the profile.

Deprecatedentries: Optional[List[CustomProfileEntry]]
One of the following:
class CustomProfileEntryCustomEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
Deprecatedenabled: bool
name: str
pattern: Pattern
regex: str
Deprecatedvalidation: Optional[Literal["luhn"]]
type: Literal["custom"]
updated_at: datetime
formatdate-time
description: Optional[str]
Deprecatedprofile_id: Optional[str]
formatuuid
class CustomProfileEntryPredefinedEntry:
id: str
formatuuid
confidence: CustomProfileEntryPredefinedEntryConfidence
ai_context_available: bool

Indicates whether this entry has AI remote service validation.

available: bool

Indicates whether this entry has any form of validation that is not an AI remote service.

enabled: bool
name: str
type: Literal["predefined"]
Deprecatedprofile_id: Optional[str]
formatuuid
variant: Optional[CustomProfileEntryPredefinedEntryVariant]
topic_type: Literal["Intent", "Content"]
One of the following:
"Intent"
"Content"
type: Literal["PromptTopic"]
description: Optional[str]
class CustomProfileEntryIntegrationEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["integration"]
updated_at: datetime
formatdate-time
profile_id: Optional[str]
formatuuid
class CustomProfileEntryExactDataEntry:
id: str
formatuuid
case_sensitive: bool

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: datetime
formatdate-time
enabled: bool
name: str
secret: bool
type: Literal["exact_data"]
updated_at: datetime
formatdate-time
class CustomProfileEntryDocumentFingerprintEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["document_fingerprint"]
updated_at: datetime
formatdate-time
class CustomProfileEntryWordListEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["word_list"]
updated_at: datetime
formatdate-time
word_list: object
profile_id: Optional[str]
formatuuid
sensitivity_levels: Optional[List[List[str]]]

Sensitivity levels associated with this profile as (group_id, level_id) tuples.

shared_entries: Optional[List[CustomProfileSharedEntry]]
One of the following:
class CustomProfileSharedEntryCustomEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
Deprecatedenabled: bool
name: str
pattern: Pattern
regex: str
Deprecatedvalidation: Optional[Literal["luhn"]]
type: Literal["custom"]
updated_at: datetime
formatdate-time
description: Optional[str]
Deprecatedprofile_id: Optional[str]
formatuuid
class CustomProfileSharedEntryPredefinedEntry:
id: str
formatuuid
confidence: CustomProfileSharedEntryPredefinedEntryConfidence
ai_context_available: bool

Indicates whether this entry has AI remote service validation.

available: bool

Indicates whether this entry has any form of validation that is not an AI remote service.

enabled: bool
name: str
type: Literal["predefined"]
Deprecatedprofile_id: Optional[str]
formatuuid
variant: Optional[CustomProfileSharedEntryPredefinedEntryVariant]
topic_type: Literal["Intent", "Content"]
One of the following:
"Intent"
"Content"
type: Literal["PromptTopic"]
description: Optional[str]
class CustomProfileSharedEntryIntegrationEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["integration"]
updated_at: datetime
formatdate-time
profile_id: Optional[str]
formatuuid
class CustomProfileSharedEntryExactDataEntry:
id: str
formatuuid
case_sensitive: bool

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: datetime
formatdate-time
enabled: bool
name: str
secret: bool
type: Literal["exact_data"]
updated_at: datetime
formatdate-time
class CustomProfileSharedEntryDocumentFingerprintEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["document_fingerprint"]
updated_at: datetime
formatdate-time
class CustomProfileSharedEntryWordListEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["word_list"]
updated_at: datetime
formatdate-time
word_list: object
profile_id: Optional[str]
formatuuid
class PredefinedProfile:
id: str

The id of the predefined profile (uuid).

formatuuid
allowed_match_count: int
formatint32
Deprecatedentries: List[PredefinedProfileEntry]
One of the following:
class PredefinedProfileEntryCustomEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
Deprecatedenabled: bool
name: str
pattern: Pattern
regex: str
Deprecatedvalidation: Optional[Literal["luhn"]]
type: Literal["custom"]
updated_at: datetime
formatdate-time
description: Optional[str]
Deprecatedprofile_id: Optional[str]
formatuuid
class PredefinedProfileEntryPredefinedEntry:
id: str
formatuuid
confidence: PredefinedProfileEntryPredefinedEntryConfidence
ai_context_available: bool

Indicates whether this entry has AI remote service validation.

available: bool

Indicates whether this entry has any form of validation that is not an AI remote service.

enabled: bool
name: str
type: Literal["predefined"]
Deprecatedprofile_id: Optional[str]
formatuuid
variant: Optional[PredefinedProfileEntryPredefinedEntryVariant]
topic_type: Literal["Intent", "Content"]
One of the following:
"Intent"
"Content"
type: Literal["PromptTopic"]
description: Optional[str]
class PredefinedProfileEntryIntegrationEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["integration"]
updated_at: datetime
formatdate-time
profile_id: Optional[str]
formatuuid
class PredefinedProfileEntryExactDataEntry:
id: str
formatuuid
case_sensitive: bool

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: datetime
formatdate-time
enabled: bool
name: str
secret: bool
type: Literal["exact_data"]
updated_at: datetime
formatdate-time
class PredefinedProfileEntryDocumentFingerprintEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["document_fingerprint"]
updated_at: datetime
formatdate-time
class PredefinedProfileEntryWordListEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["word_list"]
updated_at: datetime
formatdate-time
word_list: object
profile_id: Optional[str]
formatuuid
name: str

The name of the predefined profile.

type: Literal["predefined"]
ai_context_enabled: Optional[bool]
confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]
One of the following:
"low"
"medium"
"high"
"very_high"
Deprecatedcontext_awareness: Optional[ContextAwareness]

Scan the context of predefined entries to only return matches surrounded by keywords.

enabled: bool

If true, scan the context of predefined entries to only return matches surrounded by keywords.

ocr_enabled: Optional[bool]
open_access: Optional[bool]

Whether this profile can be accessed by anyone.

class IntegrationProfile:
id: str
formatuuid
created_at: datetime
formatdate-time
Deprecatedentries: List[IntegrationProfileEntry]
One of the following:
class IntegrationProfileEntryCustomEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
Deprecatedenabled: bool
name: str
pattern: Pattern
regex: str
Deprecatedvalidation: Optional[Literal["luhn"]]
type: Literal["custom"]
updated_at: datetime
formatdate-time
description: Optional[str]
Deprecatedprofile_id: Optional[str]
formatuuid
class IntegrationProfileEntryPredefinedEntry:
id: str
formatuuid
confidence: IntegrationProfileEntryPredefinedEntryConfidence
ai_context_available: bool

Indicates whether this entry has AI remote service validation.

available: bool

Indicates whether this entry has any form of validation that is not an AI remote service.

enabled: bool
name: str
type: Literal["predefined"]
Deprecatedprofile_id: Optional[str]
formatuuid
variant: Optional[IntegrationProfileEntryPredefinedEntryVariant]
topic_type: Literal["Intent", "Content"]
One of the following:
"Intent"
"Content"
type: Literal["PromptTopic"]
description: Optional[str]
class IntegrationProfileEntryIntegrationEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["integration"]
updated_at: datetime
formatdate-time
profile_id: Optional[str]
formatuuid
class IntegrationProfileEntryExactDataEntry:
id: str
formatuuid
case_sensitive: bool

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: datetime
formatdate-time
enabled: bool
name: str
secret: bool
type: Literal["exact_data"]
updated_at: datetime
formatdate-time
class IntegrationProfileEntryDocumentFingerprintEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["document_fingerprint"]
updated_at: datetime
formatdate-time
class IntegrationProfileEntryWordListEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["word_list"]
updated_at: datetime
formatdate-time
word_list: object
profile_id: Optional[str]
formatuuid
name: str
shared_entries: List[IntegrationProfileSharedEntry]
One of the following:
class IntegrationProfileSharedEntryCustomEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
Deprecatedenabled: bool
name: str
pattern: Pattern
regex: str
Deprecatedvalidation: Optional[Literal["luhn"]]
type: Literal["custom"]
updated_at: datetime
formatdate-time
description: Optional[str]
Deprecatedprofile_id: Optional[str]
formatuuid
class IntegrationProfileSharedEntryPredefinedEntry:
id: str
formatuuid
confidence: IntegrationProfileSharedEntryPredefinedEntryConfidence
ai_context_available: bool

Indicates whether this entry has AI remote service validation.

available: bool

Indicates whether this entry has any form of validation that is not an AI remote service.

enabled: bool
name: str
type: Literal["predefined"]
Deprecatedprofile_id: Optional[str]
formatuuid
variant: Optional[IntegrationProfileSharedEntryPredefinedEntryVariant]
topic_type: Literal["Intent", "Content"]
One of the following:
"Intent"
"Content"
type: Literal["PromptTopic"]
description: Optional[str]
class IntegrationProfileSharedEntryIntegrationEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["integration"]
updated_at: datetime
formatdate-time
profile_id: Optional[str]
formatuuid
class IntegrationProfileSharedEntryExactDataEntry:
id: str
formatuuid
case_sensitive: bool

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: datetime
formatdate-time
enabled: bool
name: str
secret: bool
type: Literal["exact_data"]
updated_at: datetime
formatdate-time
class IntegrationProfileSharedEntryDocumentFingerprintEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["document_fingerprint"]
updated_at: datetime
formatdate-time
class IntegrationProfileSharedEntryWordListEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["word_list"]
updated_at: datetime
formatdate-time
word_list: object
profile_id: Optional[str]
formatuuid
type: Literal["integration"]
updated_at: datetime
formatdate-time
description: Optional[str]

The description of the profile.

List all profiles

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
page = client.zero_trust.dlp.profiles.list(
    account_id="account_id",
)
page = page.result[0]
print(page)
{
  "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": [
        [
          "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"
        }
      ]
    }
  ]
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "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": [
        [
          "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"
        }
      ]
    }
  ]
}