Web application configuration API - POST a web application

Creates a new 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.

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

Authentication

To execute this request, you need the Write configuration (WriteConfig) 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 WebApplicationConfig

JSON body of the request, containing parameters of the new web application configuraiton.

body optional

Body format

The WebApplicationConfig object

Configuration of a web application.

Element Type Description Required
name string

The name of the web application, displayed in the UI.

required
type string

The type of the web application.

optional
realUserMonitoringEnabled boolean

Real user monitoring enabled/disabled.

required
costControlUserSessionPercentage number

Analize X% of user sessions.

required
loadActionKeyPerformanceMetric string

The key performance metric of load actions.

required
sessionReplayConfig SessionReplaySetting optional
xhrActionKeyPerformanceMetric string

The key performance metric of XHR actions.

required
loadActionApdexSettings Apdex required
xhrActionApdexSettings Apdex required
customActionApdexSettings Apdex required
waterfallSettings WaterfallSettings required
monitoringSettings MonitoringSettings required
userTags UserTag[]

User tags settings.

optional
userActionAndSessionProperties UserActionAndSessionProperties[]

User action and session properties settings. Empty List means no change

optional
userActionNamingSettings UserActionNamingSettings optional
metaDataCaptureSettings MetaDataCapturing[]

Java script agent meta data capture settings.

optional
conversionGoals ConversionGoal[]

A list of conversion goals of the application.

optional
urlInjectionPattern string

Url injection pattern for manual web application.

optional

The ConversionGoal object

A conversion goal of the application.

Element Type Description Required
name string

The name of the conversion goal.

required
id string

The ID of conversion goal.

Omit it while creating a new conversion goal.

optional
type string

The type of the conversion goal.

optional
destinationDetails DestinationDetails optional
userActionDetails UserActionDetails optional
visitDurationDetails VisitDurationDetails optional
visitNumActionDetails VisitNumActionDetails optional

The VisitNumActionDetails object

Configuration of a number of user actions-based conversion goal.

Element Type Description Required
numUserActions integer

The number of user actions to hit the conversion goal.

optional

The VisitDurationDetails object

Configuration of a visit duration-based conversion goal.

Element Type Description Required
durationInMillis integer

The duration of session to hit the conversion goal, in milliseconds.

required

The UserActionDetails object

Configuration of a user action-based conversion goal.

Element Type Description Required
value string

The value to be matched to hit the conversion goal.

optional
caseSensitive boolean

The match is case-sensitive (true) or (false).

optional
matchType string

The operator of the match.

optional
matchEntity string

The type of the entity to which the rule applies.

optional
actionType string

Type of the action to which the rule applies.

optional

The DestinationDetails object

Configuration of a destination-based conversion goal.

Element Type Description Required
urlOrPath string

The path to be reached to hit the conversion goal.

required
matchType string

The operator of the match.

optional
caseSensitive boolean

The match is case-sensitive (true) or (false).

optional

The MetaDataCapturing object

Configuration to capture meta data with the JavaScript agent.

Element Type Description Required
type string

The type of the meta data to capture.

required
capturingName string

The name of the meta data to capture.

required
name string

Name for displaying the captured values in Dynatrace.

required
uniqueId integer

The unique id of the meta data to capture.

optional
publicMetadata boolean

True if this metadata should be captured regardless of the privacy settings

optional
useLastValue boolean

True if the last captured value should be used for this metadata. By default the first value will be used.

optional

The UserActionNamingSettings object

The settings of user action naming.

Element Type Description Required
placeholders UserActionNamingPlaceholder[]

User action placeholders.

optional
loadActionNamingRules UserActionNamingRule[]

User action naming rules for loading actions.

optional
xhrActionNamingRules UserActionNamingRule[]

User action naming rules for xhr actions.

optional
customActionNamingRules UserActionNamingRule[]

User action naming rules for custom actions.

optional
ignoreCase boolean

Case insensitive naming.

optional
useFirstDetectedLoadAction boolean

First load action found under an XHR action should be used when true. Else the deepest one under the xhr action is used

optional
splitUserActionsByDomain boolean

Deactivate this setting if different domains should not result in separate user actions.

optional
queryParameterCleanups string[]

List of parameters that should be removed from the query before using the query in the user action name.

optional

The UserActionNamingRule object

The settings of naming rule.

Element Type Description Required
template string

Naming pattern. Use Curly brackets {} to select placeholders.

required
conditions UserActionNamingRuleCondition[]

Defines the conditions when the naming rule should apply.

optional

The UserActionNamingRuleCondition object

The settings of conditions for user action naming.

Element Type Description Required
operand1 string

Must be a defined placeholder wrapped in curly braces

required
operand2 string

Must be null if operator is "IS_EMPTY", a regex if operator is "MATCHES_REGULAR_ERPRESSION". In all other cases the value can be a freetext or a placeholder wrapped in curly braces

optional
operator string

The operator of the condition

required

The UserActionNamingPlaceholder object

The placeholder settings.

Element Type Description Required
name string

Placeholder name.

required
input string

Input.

required
processingPart string

Part.

required
processingSteps UserActionNamingPlaceholderProcessingStep[]

Processing actions.

optional
metadataId integer

Id of the metadata.

optional
useGuessedElementIdentifier boolean

Use the element identifier that was selected by Dynatrace.

required

The UserActionNamingPlaceholderProcessingStep object

The processing step settings.

Element Type Description Required
type string

An action to be taken by the processing:

  • SUBSTRING: Extracts the string between patternBefore and patternAfter.
  • REPLACEMENT: Replaces the string between patternBefore and patternAfter with the specified replacement.
  • REPLACE_WITH_PATTERN: Replaces the patternToReplace with the specified replacement.
  • EXTRACT_BY_REGULAR_EXPRESSION: Extracts the part of the string that matches the regularExpression.
  • REPLACE_WITH_REGULAR_EXPRESSION: Replaces all occurrences that match regularExpression with the specified replacement.
  • REPLACE_IDS: Replaces all IDs and UUIDs with the specified replacement.
required
patternBefore string

The pattern before the required value. It will be removed.

optional
patternBeforeSearchType string

The required occurrence of patternBefore.

optional
patternAfter string

The pattern after the required value. It will be removed.

optional
patternAfterSearchType string

The required occurrence of patternAfter.

optional
replacement string

Replacement for the original value.

optional
patternToReplace string

The pattern to be replaced.

Only applicable if the type is REPLACE_WITH_PATTERN.

optional
regularExpression string

A regular expression for the string to be extracted or replaced.

Only applicable if the type is EXTRACT_BY_REGULAR_EXPRESSION or REPLACE_WITH_REGULAR_EXPRESSION.

optional
fallbackToInput boolean

If set to true: Returns the input if patternBefore or patternAfter cannot be found and the type is SUBSTRING.

Returns the input if regularExpression doesn't match and type is EXTRACT_BY_REGULAR_EXPRESSION.

Otherwise null is returned.

optional

The UserActionAndSessionProperties object

Defines userAction and session custom defined properties settings of an application.

Element Type Description Required
displayName string

The display name of the property.

optional
type string

The data type of the property.

required
origin string

The origin of the property

required
aggregation string

The aggregation type of the property.

It defines how multiple values of the property are aggregated.

optional
storeAsUserActionProperty boolean

If true, the property is stored as a user action property

optional
storeAsSessionProperty boolean

If true, the property is stored as a session property

optional
cleanupRule string

The cleanup rule of the property.

Defines how to extract the data you need from a string value. Specify the regular expression for the data you need there.

optional
serverSideRequestAttribute string

The ID of the request attribute.

Only applicable when the origin is set to SERVER_SIDE_REQUEST_ATTRIBUTE.

optional
uniqueId integer

Unique id among all userTags and properties of this application

required
key string

Key of the property

required
metadataId integer

If the origin is META_DATA, metaData id of the property

optional
ignoreCase boolean

If true, the value of this property will always be stored in lower case. Defaults to false.

optional

The UserTag object

Defines UserTags settings of an application.

Element Type Description Required
uniqueId integer

uniqueId, unique among all userTags and properties of this application

required
metadataId integer

If it's of type metaData, metaData id of the userTag

optional
cleanupRule string

Cleanup rule expression of the userTag

optional
serverSideRequestAttribute string

requestAttribute Id of the userTag

optional
ignoreCase boolean

If true, the value of this tag will always be stored in lower case. Defaults to false.

optional

The MonitoringSettings object

Real user monitoring settings.

Element Type Description Required
fetchRequests boolean

fetch() request capture enabled/disabled.

required
xmlHttpRequest boolean

XmlHttpRequest support enabled/disabled.

required
javaScriptFrameworkSupport JavaScriptFrameworkSupport required
contentCapture ContentCapture required
excludeXhrRegex string

You can exclude some actions from becoming XHR actions.

Put a regular expression, matching all the required URLs, here.

If noting specified the feature is disabled.

required
correlationHeaderInclusionRegex string

To enable RUM for XHR calls to AWS Lambda, define a regular expression matching these calls, Dynatrace can then automatically add a custom header (x-dtc) to each such request to the respective endpoints in AWS.

Important: These endpoints must accept the x-dtc header, or the requests will fail.

optional
injectionMode string

JavaScript injection mode.

required
addCrossOriginAnonymousAttribute boolean

Add the cross origin = anonymous attribute to capture JavaScript error messages and W3C resource timings.

optional
scriptTagCacheDurationInHours integer

Time duration for the cache settings.

optional
libraryFileLocation string

The location of your application’s custom JavaScript library file.

If nothing specified the root directory of your web server is used.

Required for auto-injected applications, not supported by agentless applications.

optional
monitoringDataPath string

The location to send monitoring data from the JavaScript tag.

Specify either a relative or an absolute URL. If you use an absolute URL, data will be sent using CORS.

Required for auto-injected applications, optional for agentless applications.

optional
customConfigurationProperties string

Additional JavaScript tag properties that are specific to your application. To do this, type key=value pairs separated using a (|) symbol.

required
serverRequestPathId string

Path to identify the server’s request ID.

required
secureCookieAttribute boolean

Secure attribute usage for Dynatrace cookies enabled/disabled.

required
cookiePlacementDomain string

Domain for cookie placement.

required
cacheControlHeaderOptimizations boolean

Optimize the value of cache control headers for use with Dynatrace real user monitoring enabled/disabled.

required
advancedJavaScriptTagSettings AdvancedJavaScriptTagSettings required
browserRestrictionSettings WebApplicationConfigBrowserRestrictionSettings optional
ipAddressRestrictionSettings WebApplicationConfigIpAddressRestrictionSettings optional
javaScriptInjectionRules JavaScriptInjectionRules[]

Java script injection rules.

optional

The JavaScriptInjectionRules object

Rules for javascript injection

Element Type Description Required
enabled boolean

The enable or disable rule of the java script injection.

required
urlOperator string

The url operator of the java script injection.

required
urlPattern string

The url pattern of the java script injection.

optional
rule string

The url rule of the java script injection.

required
htmlPattern string

The html pattern of the java script injection.

optional

The WebApplicationConfigIpAddressRestrictionSettings object

Settings for restricting certain ip addresses and for introducing subnet mask. It also restricts the mode.

Element Type Description Required
mode string

The mode of the list of ip address restrictions.

required
ipAddressRestrictions IpAddressRange[] optional

The IpAddressRange object

The IP address or the IP address range to be mapped to the location.

Element Type Description Required
subnetMask integer

The subnet mask of the IP address range.

optional
address string

The IP address to be mapped.

For an IP address range, this is the from address.

required
addressTo string

The to address of the IP address range.

optional

The WebApplicationConfigBrowserRestrictionSettings object

Settings for restricting certain browser type, version, platform and, comparator. It also restricts the mode.

Element Type Description Required
mode string

The mode of the list of browser restrictions.

required
browserRestrictions WebApplicationConfigBrowserRestriction[]

A list of browser restrictions.

optional

The WebApplicationConfigBrowserRestriction object

Browser exclusion rules for the browsers that are to be excluded.

Element Type Description Required
browserVersion string

The version of the browser that is used.

optional
browserType string

The type of the browser that is used.

required
platform string

The platform on which the browser is being used.

optional
comparator string

Compares different browsers together.

optional

The AdvancedJavaScriptTagSettings object

Advanced JavaScript tag settings.

Element Type Description Required
syncBeaconFirefox boolean

Send the beacon signal as a synchronous XMLHttpRequest using Firefox enabled/disabled.

optional
syncBeaconInternetExplorer boolean

Send the beacon signal as a synchronous XMLHttpRequest using Internet Explorer enabled/disabled.

optional
instrumentUnsupportedAjaxFrameworks boolean

Instrumentation of unsupported Ajax frameworks enabled/disabled.

required
specialCharactersToEscape string

Additional special characters that are to be escaped using non-alphanumeric characters in HTML escape format.

required
maxActionNameLength integer

Maximum character length for action names. Valid values range from 5 to 10000.

required
maxErrorsToCapture integer

Maximum number of errors to be captured per page. Valid values range from 0 to 50.

required
additionalEventHandlers AdditionalEventHandlers required
eventWrapperSettings EventWrapperSettings required
globalEventCaptureSettings GlobalEventCaptureSettings required

The GlobalEventCaptureSettings object

Global event capture settings.

Element Type Description Required
mouseUp boolean

MouseUp enabled/disabled.

required
mouseDown boolean

MouseDown enabled/disabled.

required
click boolean

Click enabled/disabled.

required
doubleClick boolean

DoubleClick enabled/disabled.

required
keyUp boolean

KeyUp enabled/disabled.

required
keyDown boolean

KeyDown enabled/disabled.

required
scroll boolean

Scroll enabled/disabled.

required
additionalEventCapturedAsUserInput string

Additional events to be captured globally as user input.

For example, DragStart or DragEnd.

required

The EventWrapperSettings object

In addition to the event handlers, events called using addEventListener or attachEvent can be captured. Be careful with this option! Event wrappers can conflict with the JavaScript code on a web page.

Element Type Description Required
click boolean

Click enabled/disabled.

required
mouseUp boolean

MouseUp enabled/disabled.

required
change boolean

Change enabled/disabled.

required
blur boolean

Blur enabled/disabled.

required
touchStart boolean

TouchStart enabled/disabled.

required
touchEnd boolean

TouchEnd enabled/disabled.

required

The AdditionalEventHandlers object

Additional event handlers and wrappers.

Element Type Description Required
userMouseupEventForClicks boolean

Use mouseup event for clicks enabled/disabled.

required
clickEventHandler boolean

Click event handler enabled/disabled.

required
mouseupEventHandler boolean

Mouseup event handler enabled/disabled.

required
blurEventHandler boolean

Blur event handler enabled/disabled.

required
changeEventHandler boolean

Change event handler enabled/disabled.

required
toStringMethod boolean

toString method enabled/disabled.

required
maxDomNodesToInstrument integer

Max. number of DOM nodes to instrument. Valid values range from 0 to 100000.

required

The ContentCapture object

Settings for content capture.

Element Type Description Required
resourceTimingSettings ResourceTimingSettings required
javaScriptErrors boolean

JavaScript errors monitoring enabled/disabled.

required
timeoutSettings TimeoutSettings required
visuallyCompleteAndSpeedIndex boolean

Visually complete and Speed index support enabled/disabled.

required
visuallyComplete2Settings VisuallyComplete2Settings optional

The VisuallyComplete2Settings object

Settings for VisuallyComplete2

Element Type Description Required
imageUrlBlacklist string

A RegularExpression used to exclude images and iframes from being detected by the VC module.

optional
mutationBlacklist string

Query selector for mutation nodes to ignore in VC and SI calculation

optional
mutationTimeout integer

Determines the time in ms VC waits after an action closes to start calculation. Defaults to 50.

optional
inactivityTimeout integer

The time in ms the VC module waits for no mutations happening on the page after the load action. Defaults to 1000.

optional
threshold integer

Minimum visible area in pixels of elements to be counted towards VC and SI. Defaults to 50.

optional

The TimeoutSettings object

Settings for timed action capture.

Element Type Description Required
timedActionSupport boolean

Timed action support enabled/disabled.

Enable to detect actions that trigger sending of XHRs via setTimout methods.

required
temporaryActionLimit integer

Defines how deep temporary actions may cascade. 0 disables temporary actions completely. Recommended value if enabled is 3.

required
temporaryActionTotalTimeout integer

The total timeout of all cascaded timeouts that should still be able to create a temporary action

required

The ResourceTimingSettings object

Settings for resource timings capture.

Element Type Description Required
w3cResourceTimings boolean

W3C resource timings for third party/CDN enabled/disabled.

required
nonW3cResourceTimings boolean

Timing for JavaScript files and images on non-W3C supported browsers enabled/disabled.

required
nonW3cResourceTimingsInstrumentationDelay integer

Instrumentation delay for monitoring resource and image resource impact in browsers that don't offer W3C resource timings.

Valid values range from 0 to 9999.

Only effective if nonW3cResourceTimings is enabled.

required
resourceTimingCaptureType string

Defines how detailed resource timings are captured.

Only effective if w3cResourceTimings or nonW3cResourceTimings is enabled.

required
resourceTimingsDomainLimit integer

Limits the number of domains for which W3C resource timings are captured.

Only effective if resourceTimingCaptureType is CAPTURE_LIMITED_SUMMARIES.

required

The JavaScriptFrameworkSupport object

Support of various JavaScript frameworks.

Element Type Description Required
angular boolean

AngularJS and Angular support enabled/disabled.

required
dojo boolean

Dojo support enabled/disabled.

required
extJS boolean

ExtJS, Sencha Touch support enabled/disabled.

required
icefaces boolean

ICEfaces support enabled/disabled.

required
jQuery boolean

jQuery, Backbone.js support enabled/disabled.

required
mooTools boolean

MooTools support enabled/disabled.

required
prototype boolean

Prototype support enabled/disabled.

required
activeXObject boolean

ActiveXObject detection support enabled/disabled.

required

The WaterfallSettings object

These settings influence the monitoring data you receive for 3rd party, CDN, and 1st party resources.

Element Type Description Required
uncompressedResourcesThreshold integer

Warn about uncompressed resources larger than X bytes.

required
resourcesThreshold integer

Warn about resources larger than X bytes.

required
resourceBrowserCachingThreshold integer

Warn about resources with a lower browser cache rate above X%.

required
slowFirstPartyResourcesThreshold integer

Warn about slow 1st party resources with a response time above X ms.

required
slowThirdPartyResourcesThreshold integer

Warn about slow 3rd party resources with a response time above X ms.

required
slowCdnResourcesThreshold integer

Warn about slow CDN resources with a response time above X ms.

required
speedIndexVisuallyCompleteRatioThreshold integer

Warn if Speed index exceeds X % of Visually complete.

required

The Apdex object

Defines the Apdex settings of an application.

Element Type Description Required
threshold number optional
toleratedThreshold number

Maximal value of apdex, which is considered as satisfied user experience.

optional
frustratingThreshold number

Maximal value of apdex, which is considered as tolerable user experience.

optional
toleratedFallbackThreshold number

Fallback threshold of an XHR action, defining a satisfied user experience, when the configured KPM is not available.

optional
frustratingFallbackThreshold number

Fallback threshold of an XHR action, defining a tolerable user experience, when the configured KPM is not available.

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
enableCssResourceCapturing boolean

Capture (true) or don't capture (false) CSS resources from the session.

optional
cssResourceCapturingExclusionRules string[]

A list of URLs to be excluded from CSS resource capturing.

optional

Response

Response codes

Code Description
201

Success. The response body contains the ID and name of the new web application.

400

Failed. The input is invalid.

Response body

The EntityShortRepresentation object

The short representation of a Dynatrace entity.

Element Type Description
id string

The ID of the Dynatrace entity.

name string

The name of the Dynatrace entity.

description string

A short description of the Dynatrace entity.

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/applications/web/validator
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/applications/web/validator

Authentication

To execute this request, you need the Write configuration (WriteConfig) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.

Response

Response codes

Code Description
204

Validated. The submitted configuration is valid. Response does not have a body.

400

Failed. The input is invalid.

Response body

A successful request doesn't return any content.