v3

latestOpenAPI 3.0.12026-07-31240345599.7 KB
Policies

Put global alert policy

Put global alert policy

put/api/{cloudId}/v1/alerts/policies/{policyId}

Path parameters

policyIdstring required

Identifier of the policy.

Request body

typestring required

this can be only alert for global policies

namestring required

Name of the policy

descriptionstring

Description of the policy

enabledboolean required

Initial status of the integration.

aliasstring

Alias of the alert. You can use {{alias}} to refer to the original alias. Default value is {{alias}}

messagestring required

Message of the alert

alertDescriptionstring

Description of the alert. You can use {{description}} to refer to the original alert description. Default value is {{description}}

sourcestring

Source field of the alert. You can use {{source}} to refer to the original source. Default value is {{source}}

entitystring

Entity field of the alert. You can use {{entity}} to refer to the original entity. Default value is {{entity}}

actionsstring[]

Actions as a list of strings to add to the alerts original actions value. If ignoreOriginalActions field is set to true, this will replace the original actions.

tagsstring[]

Tags to add to the alerts original tags value as a list of strings. If ignoreOriginalResponders field is set to true, this will replace the original responders.

detailsobject

Map of key-value pairs to use as custom properties of the alert details. If ignoreOriginalDetails field is set to true, this will replace the original details.

continueboolean

Will trigger other modify policies if set to true. Default value is false

updatePriorityboolean

If set to true, priority of the alert will be updated based on priorityValue. Default value is false

priorityValue'P1' | 'P2' | 'P3' | 'P4' | 'P5'

Priority value of the alert. Should be one of P1, P2, P3, P4, or P5. This field is used when updatePriority is set to true.

keepOriginalRespondersboolean

If set to false, policy will ignore the original responders of the alert. Default value is true

keepOriginalDetailsboolean

If set to false, policy will ignore the original details of the alert. Default value is true

keepOriginalActionsboolean

If set to false, policy will ignore the original actions of the alert. Default value is true

keepOriginalTagsboolean

If set to false, policy will ignore the original tags of the alert. Default value is true

Example request

{
  "type": "alert",
  "name": "policy for dynamoDB",
  "description": "policy desc",
  "enabled": true,
  "filter": {
    "type": "match-any-condition",
    "conditions": [
      {
        "field": "message",
        "operation": "contains",
        "expectedValue": "asd"
      }
    ]
  },
  "timeRestriction": {
    "enabled": true,
    "timeRestrictions": [
      {
        "endHour": 1
      }
    ],
    "appliedTimeZone": "(GMT+03:00) Europe/Istanbul TRT"
  },
  "alias": "{{alias}}",
  "message": "{{message}} addional message",
  "alertDescription": "{{description}}",
  "source": "{{source}}",
  "entity": "{{entity}}",
  "responders": [
    {
      "type": "team",
      "id": "0f5f6b40-7dca-44fc-8036-6d6d550e853f"
    }
  ],
  "actions": [
    "action1, action2"
  ],
  "tags": [
    "tag1",
    "tag2"
  ],
  "priorityValue": "P3",
  "keepOriginalResponders": true,
  "keepOriginalDetails": true,
  "keepOriginalActions": true,
  "keepOriginalTags": true
}

Response

Returned if the request is successful.

typestring
idstring
namestring
descriptionstring
teamIdstring
enabledboolean
ordernumber
aliasstring
messagestring
alertDescriptionstring
sourcestring
entitystring
respondersstring[]
actionsstring[]
tagsstring[]
detailsobject
continueboolean
updatePriorityboolean

If set to true, priority of the alert will be updated based on priorityValue. Default value is false

priorityValue'P1' | 'P2' | 'P3' | 'P4' | 'P5'

Priority value of the alert. Should be one of P1, P2, P3, P4, or P5. This field is used when updatePriority is set to true.

keepOriginalRespondersboolean
keepOriginalDetailsboolean
keepOriginalActionsboolean
keepOriginalTagsboolean

Example response

{
  "type": "ALERT",
  "id": "5422f159-0ca5-4fd9-9f73-770b2778baa3",
  "name": "test 2",
  "description": "asdasd",
  "enabled": true,
  "filter": {
    "type": "match-any-condition",
    "conditions": [
      {
        "field": "message",
        "operation": "contains",
        "expectedValue": "asd"
      }
    ]
  },
  "timeRestriction": {
    "enabled": true,
    "timeRestrictions": [
      {
        "endHour": 1
      }
    ],
    "appliedTimeZone": "(GMT+03:00) Europe/Istanbul TRT"
  },
  "alias": "{{alias}}",
  "message": "{{message}} asd",
  "alertDescription": "{{description}}",
  "source": "{{source}}",
  "entity": "{{entity}}",
  "responders": [],
  "actions": [],
  "tags": [],
  "priorityValue": "P3",
  "keepOriginalResponders": true,
  "keepOriginalDetails": true,
  "keepOriginalActions": true,
  "keepOriginalTags": true
}