• Home
  • Dynatrace API
  • Configuration
  • RUM
  • Web application configuration
  • Error rules
  • PUT error rules

Web application configuration API - PUT error rules

Updates the configuration of error rules in the specified application.

The request consumes an application/json payload.

PUTManaged https://{your-domain}/e/{your-environment-id}/api/config/v1/applications/web/{id}/errorRules
SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/applications/web/{id}/errorRules
Environment ActiveGate https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/applications/web/{id}/errorRules

Authentication

To execute this request, you need an access token with Write configuration (WriteConfig) scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
idstring

The ID of the required web application.

pathrequired
bodyApplicationErrorRules

The JSON body of the request. Contains the updated configuration of error rules.

bodyoptional

Request body objects

The ApplicationErrorRules object

Configuration of error rules in the web application.

ElementTypeDescription
ignoreJavaScriptErrorsInApdexCalculationboolean

Exclude (true) or include (false) JavaScript errors in Apdex calculation.

ignoreHttpErrorsInApdexCalculationboolean

Exclude (true) or include (false) HTTP errors listed in httpErrorRules in Apdex calculation.

ignoreCustomErrorsInApdexCalculationboolean

Exclude (true) or include (false) custom errors listed in customErrorRules in Apdex calculation.

httpErrorRulesHttpErrorRule[]

An ordered list of HTTP errors.

Rules are evaluated from top to bottom; the first matching rule applies.

customErrorRulesCustomErrorRule[]

An ordered list of custom errors.

Rules are evaluated from top to bottom; the first matching rule applies.

The HttpErrorRule object

Configuration of the HTTP error in the web application.

ElementTypeDescription
considerUnknownErrorCodeboolean

If true, match by errors that have unknown HTTP status code.

considerBlockedRequestsboolean

If true, match by errors that have CSP Rule violations.

Can be null.

errorCodesstring

The HTTP status code or status code range to match by.

This field is required if considerUnknownErrorCode AND considerBlockedRequests are both set to false.

Can be null.

filterByUrlboolean

If true, filter errors by URL.

filterstring

The matching rule for the URL.

The element can hold these values
  • BEGINS_WITH
  • CONTAINS
  • ENDS_WITH
  • EQUALS

Can be null.

urlstring

The URL to look for.

Can be null.

captureboolean

Capture (true) or ignore (false) the error.

impactApdexboolean

Include (true) or exclude (false) the error in Apdex calculation.

considerForAiboolean

Include (true) or exclude (false) the error in Davis AI problem detection and analysis.

The CustomErrorRule object

Configuration of the custom error in the web application.

ElementTypeDescription
keyPatternstring

The key of the error to look for.

Can be null.

keyMatcherstring

The matching operation for the keyPattern.

The element can hold these values
  • BEGINS_WITH
  • CONTAINS
  • ENDS_WITH
  • EQUALS

Can be null.

valuePatternstring

The value of the error to look for.

Can be null.

valueMatcherstring

The matching operation for the valuePattern.

The element can hold these values
  • BEGINS_WITH
  • CONTAINS
  • ENDS_WITH
  • EQUALS

Can be null.

captureboolean

Capture (true) or ignore (false) the error.

impactApdexboolean

Include (true) or exclude (false) the error in Apdex calculation.

customAlertingboolean

Include (true) or exclude (false) the error in Davis AI problem detection and analysis.

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.

json
{ "ignoreJavaScriptErrorsInApdexCalculation": true, "ignoreHttpErrorsInApdexCalculation": true, "ignoreCustomErrorsInApdexCalculation": true, "httpErrorRules": [ { "considerUnknownErrorCode": true, "considerBlockedRequests": true, "errorCodes": "400", "filterByUrl": true, "filter": "BEGINS_WITH", "url": "string", "capture": true, "impactApdex": true, "considerForAi": true } ], "customErrorRules": [ { "keyPattern": "string", "keyMatcher": "BEGINS_WITH", "valuePattern": "string", "valueMatcher": "BEGINS_WITH", "capture": true, "impactApdex": true, "customAlerting": true } ] }

Response

Response codes

CodeTypeDescription
204-

Success. The configuration has been updated. Response doesn't have a body.

400ErrorEnvelope

Failed. The input is invalid.

Related topics
  • Configure web application errors

    Learn how to configure your application to ignore errors.