PUT   alerts/target_group/{group_id}

Add/remove targets to/from the target group.

URL Parameters

NameDescription
group_id

Target group Id. Type: numeric.

Remarks

Use GET alerts/targets route to get the list of values applicable for target_ids.

Request example and description

curl --request PUT "https://api-asm1.apica.io/v3/alerts/target_group/567?auth_ticket=C471ADC4-19B4-4219-BBF4-671A97EC653E" --header "Content-Type: application/json" --data-raw "{
  \"enabled\": true,
  \"targets\": [
    {
      \"id\": 12,
      \"type\": \"email\",
      \"operation_type\": \"add\"
    },
    {
      \"id\": 12,
      \"type\": \"webhook\",
      \"operation_type\": \"remove\"
    },
    {
      \"id\": 12,
      \"type\": \"sms\",
      \"operation_type\": \"add\"
    }
  ]
}"
NameType Required Description
enabled Boolean No

The group is enable.

targets Array Yes

Targets for adding/removing to/from group. Supported targets: 'sms', 'email' and 'webhook'.

id Integer Yes

The target ID.

type String Yes

The target type.

operation_type String Yes

The operation type ('add' or 'remove').