Data privacy API - PUT configuration
Updates the global configuration of data privacy, affecting all your applications.
The request consumes an application/json
payload.
PUT | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/dataPrivacy |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/dataPrivacy | |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/dataPrivacy |
Authentication
To execute this request, you need an access token with DataPrivacy
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | DataPrivacyAndSecurity | Global configuration for data privacy and security. | body | required |
Request body objects
The DataPrivacyAndSecurity
object
Global configuration for data privacy and security.
Element | Type | Description | Required |
---|---|---|---|
logAuditEvents | boolean | The audit logging is enabled ( | optional |
maskIpAddressesAndGpsCoordinates | boolean | Masking of IP addresses and GPS coordinates is enabled ( | required |
maskPersonalDataInUris | boolean | Masking of personal data in URIs is enabled ( | required |
maskUserActionNames | boolean | Masking of user action names is enabled ( This masking is available only for web applications. | required |
metadata | ConfigurationMetadata | Metadata useful for debugging | optional |
The ConfigurationMetadata
object
Metadata useful for debugging
Element | Type | Description | Required |
---|---|---|---|
clusterVersion | string | Dynatrace version. | optional |
configurationVersions | integer[] | A sorted list of the version numbers of the configuration. | optional |
currentConfigurationVersions | string[] | A sorted list of version numbers of the configuration. | optional |
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
1{2 "logAuditEvents": true,3 "maskIpAddressesAndGpsCoordinates": true,4 "maskPersonalDataInUris": true,5 "maskUserActionNames": true,6 "metadata": {7 "clusterVersion": "1.192.1",8 "configurationVersions": [9 4,10 211 ],12 "currentConfigurationVersions": [13 "1.0.4",14 "1.23"15 ]16 }17}
Response
Response codes
Code | Type | Description |
---|---|---|
204 | - | Success. The configuration has been updated. Response doesn't have a body. |
400 | ErrorEnvelope | Failed. The input is invalid. |
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 | ManagedDynatrace for Government | 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 | |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/dataPrivacy/validator |
Authentication
To execute this request, you need an access token with DataPrivacy
scope.
To learn how to obtain and use it, see Tokens and authentication.
Response
Response codes
Code | Type | Description |
---|---|---|
204 | - | Success. The submitted configuration is valid. Response doesn't have a body. |
400 | ErrorEnvelope | Failed. The input is invalid. |
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
1curl -X PUT \2 https://mySampleEnv.live.dynatrace.com/api/config/v1/dataPrivacy \3 -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \4 -H 'Content-Type: application/json' \5 -d '{<truncated - see the Request body section below>}'
Request URL
1https://mySampleEnv.live.dynatrace.com/api/config/v1/dataPrivacy
Request body
1{2 "maskIpAddressesAndGpsCoordinates": true,3 "maskUserActionNames": true,4 "maskPersonalDataInUris": true,5 "logAuditEvents": true6}
Response code
204