Web application configuration API - PUT data privacy of a web application
Updates data privacy parameters of the specified web application.
This API only supports web applications (including agentless applications and browser extensions). For mobile apps and custom applications, see Mobile and custom app API.
The request consumes and produces an application/json
payload.
PUT | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/applications/web/{id}/dataPrivacy |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/applications/web/{id}/dataPrivacy | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/applications/web/{id}/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 |
---|---|---|---|---|
id | string | The ID of the web application, where you want to update data privacy settings. | path | required |
body | Application | JSON body of the request, containing new data privacy settings. | body | optional |
Request body objects
The ApplicationDataPrivacy
object
Data privacy settings of the application.
Element | Type | Description | Required |
---|---|---|---|
metadata | Configuration | Metadata useful for debugging | optional |
identifier | string | Dynatrace entity ID of the web application. | optional |
dataCaptureOptInEnabled | boolean | Set to | required |
persistentCookieForUserTracking | boolean | Set to | required |
doNotTrackBehaviour | string | How to handle the "Do Not Track" header:
| required |
sessionReplayDataPrivacy | Session | Data privacy settings for Session Replay. | optional |
The ConfigurationMetadata
object
Metadata useful for debugging
Element | Type | Description | Required |
---|---|---|---|
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 |
clusterVersion | string | Dynatrace version. | optional |
The SessionReplayDataPrivacySettings
object
Data privacy settings for Session Replay.
Element | Type | Description | Required |
---|---|---|---|
optInModeEnabled | boolean | If | optional |
urlExclusionRules | string[] | A list of URLs to be excluded from recording. | optional |
contentMaskingSettings | Session | Content masking settings for Session Replay. For more details, see Configure Session Replay in Dynatrace Documentation. | optional |
The SessionReplayContentMaskingSettings
object
Content masking settings for Session Replay.
For more details, see Configure Session Replay in Dynatrace Documentation.
Element | Type | Description | Required |
---|---|---|---|
recordingMaskingSettingsVersion | integer | The version of the content masking. You can use this API only with the version 2. If you're using version 1, set this field to | required |
recordingMaskingSettings | Session | Configuration of the Session Replay masking. | optional |
playbackMaskingSettings | Session | Configuration of the Session Replay masking. | optional |
The SessionReplayMaskingSetting
object
Configuration of the Session Replay masking.
Element | Type | Description | Required |
---|---|---|---|
maskingPreset | string | The type of the masking:
| required |
maskingRules | Masking | A list of masking rules. | optional |
The MaskingRule
object
The masking rule defining how data is hidden.
Element | Type | Description | Required |
---|---|---|---|
maskingRuleType | string | The type of the masking rule. | required |
selector | string | The selector for the element or the attribute to be masked. Specify a CSS expression for an element or a regular expression for an attribute. | required |
userInteractionHidden | boolean | Interactions with the element are ( | required |
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.
{
"metadata": {
"configurationVersions": [
4,
2
],
"currentConfigurationVersions": [
"1.0.4",
"1.23"
],
"clusterVersion": "1.192.1"
},
"identifier": "string",
"dataCaptureOptInEnabled": true,
"persistentCookieForUserTracking": true,
"doNotTrackBehaviour": "CAPTURE_ANONYMIZED",
"sessionReplayDataPrivacy": {
"optInModeEnabled": true,
"urlExclusionRules": [
"string"
],
"contentMaskingSettings": {
"recordingMaskingSettingsVersion": 2,
"recordingMaskingSettings": {
"maskingPreset": "ALLOW_LIST",
"maskingRules": [
{
"maskingRuleType": "ATTRIBUTE",
"selector": "string",
"userInteractionHidden": false
}
]
},
"playbackMaskingSettings": {}
}
}
}
Response
Response codes
Code | Type | Description |
---|---|---|
204 | Success. Data privacy settings have 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/applications/web/{id}/dataPrivacy/validator |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/applications/web/{id}/dataPrivacy/validator | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/applications/web/{id}/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 | Validated. The submitted configuration is valid. Response does not have a body. | |
400 | ErrorEnvelope | Failed. The input is invalid. |