Set payload log settings
PUT/accounts/{account_id}/dlp/payload_log
Enables or disables payload logging for DLP matches. When enabled, matched content is stored for review.
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)
Body ParametersJSON
public_key: optional string
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.
Set payload log settings
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dlp/payload_log \
-X PUT \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"updated_at": "2019-12-27T18:11:19.117Z",
"masking_level": "full",
"public_key": "public_key"
}
}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": {
"updated_at": "2019-12-27T18:11:19.117Z",
"masking_level": "full",
"public_key": "public_key"
}
}