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

Updates data privacy parameters of the specified web application.

This API only supports rule-based web applications. Mobile apps, agentless applications, browser extensions, etc. are not supported.

The request consumes and produces an application/json payload.

PUT
  • Managed 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

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 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 ApplicationDataPrivacy

JSON body of the request, containing new data privacy settings.

body optional

The ApplicationDataPrivacy object

Data privacy settings of the application.

Element Type Description Required
metadata ConfigurationMetadata optional
identifier string

Dynatrace entity ID of the web application.

optional
dataCaptureOptInEnabled boolean

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

required
persistentCookieForUserTracking boolean

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

required
doNotTrackBehaviour string

How to handle browsers' "Do Not Track": IGNORE_DO_NOT_TRACK, or CAPTURE_ANONYMIZED, or DO_NOT_CAPTURE.

The doNotTrackBehaviour element can hold these values.
required
sessionReplayConfig SessionReplaySetting optional

The SessionReplaySetting object

Session replay settings

Element Type Description Required
enabled boolean

SessionReplay Enabled.

required
costControlPercentage integer

Session replay sampling rating in percentage.

required

The ConfigurationMetadata object

Metadata useful for debugging

Element Type Description Required
configurationVersions integer[]

A Sorted list of the version numbers of the configuration.

optional
clusterVersion string

Dynatrace server version.

optional

Possible values

Possible values for the doNotTrackBehaviour element in the ApplicationDataPrivacy object:

  • CAPTURE_ANONYMIZED
  • DO_NOT_CAPTURE
  • IGNORE_DO_NOT_TRACK

Response format

A successful request doesn't return any content.

Response codes

Code Description
204 Success. Data privacy settings have been updated. Response doesn't have a body.
400 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.

The request consumes and produces an application/json payload.

POST
  • Managed 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

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 Authentication.

Response codes

Code Description
204 Validated. The submitted configuration is valid. Response does not have a body.
400 Failed. The input is invalid.