Web application configuration API - GET data privacy of a web application

Gets data privacy parameters of the specified web application.

This API only supports web applications. For mobile and custom applications, see Mobile and custom app API.

The request produces an application/json payload.

GETSaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/applications/web/{id}/dataPrivacy
Environment ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/applications/web/{id}/dataPrivacy

Authentication

To execute this request, you need an access token with ReadConfig 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 check data privacy settings.

path
required

Response

Response codes

Code
Type
Description

Response body objects

The ApplicationDataPrivacy object

Data privacy settings of the application.

Element
Type
Description
dataCaptureOptInEnabled
boolean

Set to true to disable data capture and cookies until JavaScriptAPI dtrum.enable() is called.

doNotTrackBehaviour
string

How to handle the "Do Not Track" header:

  • IGNORE_DO_NOT_TRACK: ignore the header and capture the data.
  • CAPTURE_ANONYMIZED: capture the data but do not tie it to the user.
  • DO_NOT_CAPTURE: respect the header and do not capture.
  • CAPTURE_ANONYMIZED
  • DO_NOT_CAPTURE
  • IGNORE_DO_NOT_TRACK
identifier
string

Dynatrace entity ID of the web application.

metadata

Metadata useful for debugging

persistentCookieForUserTracking
boolean

Set to true to set persistent cookie in order to recognize returning devices.

sessionReplayDataPrivacy

Data privacy settings for Session Replay.

The ConfigurationMetadata object

Metadata useful for debugging

Element
Type
Description
clusterVersion
string

Dynatrace version.

configurationVersions
integer[]

A sorted list of the version numbers of the configuration.

currentConfigurationVersions
string[]

A sorted list of version numbers of the configuration.

The SessionReplayDataPrivacySettings object

Data privacy settings for Session Replay.

Element
Type
Description
contentMaskingSettings

Content masking settings for Session Replay.

For more details, see Configure Session Replay in Dynatrace Documentation.

optInModeEnabled
boolean

If true, session recording is disabled until JavaScriptAPI dtrum.enableSessionReplay() is called.

urlExclusionRules
string[]

A list of URLs to be excluded from recording.

The SessionReplayContentMaskingSettings object

Content masking settings for Session Replay.

For more details, see Configure Session Replay in Dynatrace Documentation.

Element
Type
Description
playbackMaskingSettings

Configuration of the Session Replay masking.

recordingMaskingSettings

Configuration of the Session Replay masking.

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 2 in the PUT request to switch to version 2.

The SessionReplayMaskingSetting object

Configuration of the Session Replay masking.

Element
Type
Description
maskingPreset
string

The type of the masking:

  • MASK_ALL: Mask all texts, user input, and images.
  • MASK_USER_INPUT: Mask all data that is provided through user input
  • ALLOW_LIST: Only elements, specified in maskingRules are shown, everything else is masked.
  • BLOCK_LIST: Elements, specified in maskingRules are masked, everything else is shown.
  • ALLOW_LIST
  • BLOCK_LIST
  • MASK_ALL
  • MASK_USER_INPUT
maskingRules

A list of masking rules.

The MaskingRule object

The masking rule defining how data is hidden.

Element
Type
Description
maskingRuleType
string

The type of the masking rule.

  • ATTRIBUTE
  • ELEMENT
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.

userInteractionHidden
boolean

Interactions with the element are (true) or are not (`false) masked.

Response body JSON model

{
"dataCaptureOptInEnabled": true,
"doNotTrackBehaviour": "CAPTURE_ANONYMIZED",
"identifier": "string",
"metadata": {
"clusterVersion": "1.192.1",
"configurationVersions": [
4,
2
],
"currentConfigurationVersions": [
"1.0.4",
"1.23"
]
},
"persistentCookieForUserTracking": true,
"sessionReplayDataPrivacy": {
"contentMaskingSettings": {
"playbackMaskingSettings": {
"maskingPreset": "ALLOW_LIST",
"maskingRules": [
{
"maskingRuleType": "ATTRIBUTE",
"selector": "string",
"userInteractionHidden": false
}
]
},
"recordingMaskingSettings": {},
"recordingMaskingSettingsVersion": 2
},
"optInModeEnabled": true,
"urlExclusionRules": [
"string"
]
}
}