POST   checks/tags?mode={mode}

Associates checks with tag values.

URL Parameters

NameDescription
mode

(Optional) Determines how to combine existing tag value associations with the new ones. Accepted values are "merge" and "replace". If the mode is "replace" then all existing check - tag value associations will be replaced by the ones sent in the request. If the mode is "merge" then new check - tag value associations will be added to the existing ones. If the mode parameter is not specified then the "merge" mode will be used.

Request example and description

curl --request POST "https://api-asm1.apica.io/v3/checks/tags?mode=merge&auth_ticket=C471ADC4-19B4-4219-BBF4-671A97EC653E" --header "Content-Type: application/json" --data-raw "{
  "check_ids": [
    12345,
    6789,
    34524
  ],
  "tags": {
    "Environment": [
      "Prod",
      "Dev"
    ],
    "Region": [
      "USA",
      "SWE"
    ]
  }
}"
NameType Required Description
check_idsArrayYes

Identifiers of the checks to associate with the tag values.

tagsObjectYes

Tag values to be associated with the checks.

Response body model example and description

{
  "deleted_associations": [
    {
      "check_id": 345665,
      "tag_key": "Environment",
      "tag_value": "Prod"
    },
    {
      "check_id": 6789,
      "tag_key": "Region",
      "tag_value": "Prod"
    },
    {
      "check_id": 6789,
      "tag_key": "Environment",
      "tag_value": "Prod"
    }
  ],
  "added_associations": [
    {
      "check_id": 345665,
      "tag_key": "Environment",
      "tag_value": "Prod"
    },
    {
      "check_id": 345665,
      "tag_key": "Environment",
      "tag_value": "Prod"
    },
    {
      "check_id": 6789,
      "tag_key": "Environment",
      "tag_value": "Prod"
    }
  ]
}
NameType Description
deleted_associationsArray

The list of deleted check - tag value associations.

check_idInteger

The numeric identifier of the check.

tag_keyString

Tag key.

tag_valueString

Tag value.

added_associationsArray

The list of added check - tag value associations.

check_idInteger

The numeric identifier of the check.

tag_keyString

Tag key.

tag_valueString

Tag value.