Web application configuration API - PUT error rules
Updates the configuration of error rules in the specified application.
The request consumes an application/json
payload.
PUT | ManagedDynatrace for Government | 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 WriteConfig
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 required web application. | path | required |
body | Application | The JSON body of the request. Contains the updated configuration of error rules. | body | optional |
Request body objects
The ApplicationErrorRules
object
Configuration of error rules in the web application.
Element | Type | Description | Required |
---|---|---|---|
customErrorRules | Custom | An ordered list of custom errors. Rules are evaluated from top to bottom; the first matching rule applies. | required |
httpErrorRules | Http | An ordered list of HTTP errors. Rules are evaluated from top to bottom; the first matching rule applies. | required |
ignoreCustomErrorsInApdexCalculation | boolean | Exclude ( | required |
ignoreHttpErrorsInApdexCalculation | boolean | Exclude ( | required |
ignoreJavaScriptErrorsInApdexCalculation | boolean | Exclude ( | required |
The CustomErrorRule
object
Configuration of the custom error in the web application.
Element | Type | Description | Required |
---|---|---|---|
capture | boolean | Capture ( | required |
customAlerting | boolean | Include ( | required |
impactApdex | boolean | Include ( | required |
keyMatcher | string | The matching operation for the keyPattern. | optional |
keyPattern | string | The key of the error to look for. | optional |
valueMatcher | string | The matching operation for the valuePattern. | optional |
valuePattern | string | The value of the error to look for. | optional |
The HttpErrorRule
object
Configuration of the HTTP error in the web application.
Element | Type | Description | Required |
---|---|---|---|
capture | boolean | Capture ( | required |
considerBlockedRequests | boolean | If | optional |
considerForAi | boolean | Include ( | required |
considerUnknownErrorCode | boolean | If | required |
errorCodes | string | The HTTP status code or status code range to match by. This field is required if considerUnknownErrorCode AND considerBlockedRequests are both set to | optional |
filter | string | The matching rule for the URL. | optional |
filterByUrl | boolean | If | required |
impactApdex | boolean | Include ( | required |
url | string | The URL to look for. | optional |
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.
{
"customErrorRules": [
{
"capture": true,
"customAlerting": true,
"impactApdex": true,
"keyMatcher": "BEGINS_WITH",
"keyPattern": "string",
"valueMatcher": "BEGINS_WITH",
"valuePattern": "string"
}
],
"httpErrorRules": [
{
"capture": true,
"considerBlockedRequests": true,
"considerForAi": true,
"considerUnknownErrorCode": true,
"errorCodes": "400",
"filter": "BEGINS_WITH",
"filterByUrl": true,
"impactApdex": true,
"url": "string"
}
],
"ignoreCustomErrorsInApdexCalculation": true,
"ignoreHttpErrorsInApdexCalculation": true,
"ignoreJavaScriptErrorsInApdexCalculation": true
}
Response
Response codes
Code | Type | Description |
---|---|---|
204 | Success. The configuration has been updated. Response doesn't have a body. | |
400 | ErrorEnvelope | Failed. The input is invalid. |