Data privacy API - PUT configuration

Updates the global configuration of data privacy, affecting all your applications.

The request consumes an application/json payload.

PUT
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/dataPrivacy
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/dataPrivacy

Authentication

To execute this request, you need the Change data privacy settings (DataPrivacy) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Parameters

Parameter Type Description In Required
body DataPrivacyAndSecurity body optional

Body format

The DataPrivacyAndSecurity object

Global configuration for data privacy and security.

Element Type Description Required
maskIpAddressesAndGpsCoordinates boolean

Masking of IP addresses and GPS coordinates is enabled (true) or disabled (false).

required
maskUserActionNames boolean

Masking of user action names is enabled (true) or disabled (false).

This masking is available only for web applications.

required
maskPersonalDataInUris boolean

Masking of personal data in URIs is enabled (true) or disabled (false).

required
logAuditEvents boolean

The audit logging is enabled (true) or disabled (false).

optional

Response

Response codes

Code Description
204

Success. The configuration has been updated. Response doesn't have a body.

400

Failed. The input is invalid.

Response body

A successful request doesn't return any content.

Validate payload

We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.

The request consumes an application/json payload.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/dataPrivacy/validator
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/dataPrivacy/validator

Authentication

To execute this request, you need the Change data privacy settings (DataPrivacy) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Response

Response codes

Code Description
204

Success. The submitted configuration is valid. Response doesn't have a body.

400

Failed. The input is invalid.

Response body

A successful request doesn't return any content.

Example

In this example, the request updates the data privacy configuration from the GET request example. It activates the Mask user actions and Mask personal data in URLs features.

The API token is passed in the Authorization header.

You can download or copy the example request body to try it out on your own. First, be sure to create a backup copy of your current configuration with the GET data privacy configuration call.

Curl

curl -X PUT \
  https://mySampleEnv.live.dynatrace.com/api/config/v1/dataPrivacy \
  -H 'Authorization: Api-token abcdefjhij1234567890' \  
  -H 'Content-Type: application/json' \  
  -d '{<truncated - see the Request body section below>}'

Request URL

https://mySampleEnv.live.dynatrace.com/api/config/v1/dataPrivacy

Request body

api-examples/config/data-privacy/put.json
Download
{
    "maskIpAddressesAndGpsCoordinates": true,
    "maskUserActionNames": true,
    "maskPersonalDataInUris": true,
    "logAuditEvents": true
}

Response code

204