Failure detection API - PUT a detection rule
Updates the specified failure detection rule.
If a rule with the specified ID doesn't exist, a new one is created and appended to the end of the rule list. Rules are evaluated from top to bottom; the first matching rule applies. To enforce a particular order, use the reorder request.
The failure detection parameter set used by the rule must exist at the time of rule creation.
The request consumes an application/json
payload.
This request is an Early Adopter release and may be changed in non-compatible way.
PUT |
|
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
To find all model variations that depend on the type of the model, see JSON models.
Parameter | Type | Description | In | Required |
---|---|---|---|---|
id | string |
The ID of the required failure detection rule. |
path | required |
body | FailureDetectionRule |
The JSON body of the request. Contains the updated configuration of the failure detection rule. You can't update the ID with this request. Use the change ID request instead. |
body | optional |
Body format
The FailureDetectionRule object
Configuration of the failure detection rule.
Element | Type | Description | Required |
---|---|---|---|
id | string |
The ID of the rule. The allowed characters are lowercase and uppercase letters, numbers, hyphens ( |
required |
name | string |
The display name of the rule. |
optional |
description | string |
A short description of the rule. |
optional |
enabled | boolean |
The rule is enabled ( |
required |
fdpId | string |
The failure detection parameter (FDP) set of the rule. Specify the ID of the set here. The FDP set must exist at the time of rule creation. |
required |
conditions | FailureDetectionCondition[] |
A list of conditions of the rule. The rule applies when all conditions are fulfilled. |
required |
The FailureDetectionCondition object
The condition of the failure detection rule.
Element | Type | Description | Required |
---|---|---|---|
attribute | string |
The attribute to be checked. |
optional |
predicate | FdcPredicate | optional |
The FdcPredicate object
The predicate that tests the value of the attribute.
The actual set of fields depends on the type of the predicate. Find the list of actual models in the description of the type field and check the description of the model you need.
Element | Type | Description | Required |
---|---|---|---|
type | string |
Defines the actual set of fields depending on the value. See one of the following objects:
|
required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request. See the Example expandable section for working sample request.
{
"id": "R_5",
"name": "shipping",
"description": "for requests from shipping module\n",
"enabled": true,
"fdpId": "FDP_9",
"conditions": [
{
"attribute": "SERVICE_NAME",
"predicate": {
"type": "STRING_STARTS_WITH",
"ignoreCase": false,
"values": [
"shp",
"stg_shp"
]
}
}
]
}
Response
Response codes
Code | Description |
---|---|
201 | Success. The new failure detection rule has been created. The response contains the ID of the new rule. |
204 | Success. The failure detection rule has been updated. Response doesn't have a body. |
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. |
{
"id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a",
"name": "Dynatrace entity",
"description": "Dynatrace entity for the REST API example\n"
}
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.
This request is an Early Adopter release and may be changed in non-compatible way.
POST |
|
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 | Success. The submitted configuration is valid. Response doesn't have a body. |
400 | Failed. The input is invalid. |
Response body
A successful request doesn't return any content.