{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-action-match-schema.json",
  "title": "ActionMatch",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instana-action-catalog-api-openapi.yml#/components/schemas/ActionMatch",
  "type": "object",
  "properties": {
    "action": {
      "$ref": "#/$defs/Action"
    },
    "aiEngine": {
      "type": "string",
      "enum": [
        "POLICY",
        "EVENT_SIMILARITY",
        "NLP",
        "SUCCESS_RATE",
        "TURBONOMIC",
        "WATSONX"
      ]
    },
    "confidence": {
      "type": "string"
    },
    "policy": {
      "$ref": "#/$defs/Policy"
    },
    "score": {
      "type": "number",
      "format": "double"
    }
  },
  "required": [
    "aiEngine",
    "confidence",
    "score"
  ],
  "$defs": {
    "Action": {
      "type": "object",
      "description": "Automation action definition. When this is used in policy creation request, only `id` should be specified.",
      "properties": {
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "Action created time."
        },
        "description": {
          "type": "string",
          "description": "Action description.",
          "maxLength": 512,
          "minLength": 0
        },
        "fields": {
          "type": "array",
          "description": "List of fields that describe an action.",
          "items": {
            "$ref": "#/$defs/Field"
          }
        },
        "id": {
          "type": "string",
          "description": "Action identifier.",
          "maxLength": 128,
          "minLength": 1
        },
        "inputParameters": {
          "type": "array",
          "description": "List of inputs to the action.",
          "items": {
            "$ref": "#/$defs/Parameter"
          }
        },
        "metadata": {
          "$ref": "#/$defs/MetaData"
        },
        "modifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "Action modified time."
        },
        "name": {
          "type": "string",
          "description": "Action name.",
          "maxLength": 128,
          "minLength": 1
        },
        "tags": {
          "type": "array",
          "description": "List of tags added to the action.",
          "items": {
            "type": "string",
            "description": "List of tags added to the action."
          }
        },
        "type": {
          "type": "string",
          "description": "Action type can be one of the following values:  SCRIPT, HTTP, ANSIBLE, EXTERNAL, GITHUB, GITLAB, JIRA, MANUAL, DOC_LINK",
          "enum": [
            "SCRIPT",
            "HTTP",
            "ANSIBLE",
            "EXTERNAL",
            "GITHUB",
            "GITLAB",
            "JIRA",
            "MANUAL",
            "DOC_LINK"
          ],
          "maxLength": 128,
          "minLength": 0
        }
      },
      "required": [
        "createdAt",
        "id",
        "modifiedAt",
        "name",
        "type"
      ]
    },
    "ActionConfiguration": {
      "type": "object",
      "description": "List of action configurations.",
      "properties": {
        "action": {
          "$ref": "#/$defs/Action"
        },
        "agentId": {
          "type": "string",
          "description": "Identifier of the agent host on which to run the action."
        },
        "inputParameterValues": {
          "type": "array",
          "description": "List of action input parameters.",
          "items": {
            "$ref": "#/$defs/ParameterValue"
          }
        }
      },
      "required": [
        "action"
      ]
    },
    "Condition": {
      "type": "object",
      "description": "This applies to only `automatic` policy type. A Dynamic Focus Query that selects a list of entities on which the policy is run.",
      "properties": {
        "query": {
          "type": "string",
          "description": "Dynamic Focus Query string that selects a list of entities on which the policy is run."
        }
      }
    },
    "Field": {
      "type": "object",
      "description": "List of fields that describe an action.",
      "properties": {
        "description": {
          "type": "string"
        },
        "encoding": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "secured": {
          "type": "boolean"
        },
        "value": {
          "type": "string"
        }
      },
      "required": [
        "encoding",
        "name",
        "value"
      ]
    },
    "MetaData": {
      "type": "object",
      "description": "Action metadata.",
      "properties": {
        "ai": {
          "type": "array",
          "description": "List of metadata for AI originated actions.",
          "items": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "description": "List of metadata for AI originated actions."
            },
            "description": "List of metadata for AI originated actions."
          }
        },
        "aiOriginated": {
          "type": "boolean",
          "description": "AI originated action flag. Value is `true` if action is AI generated `false` otherwise."
        },
        "builtIn": {
          "type": "boolean",
          "description": "Built-in out of the box action flag. Value is `true` if built-in action `false` otherwise."
        },
        "readOnly": {
          "type": "boolean",
          "description": "Read only action flag. Value is `true` if read only `false` otherwise."
        },
        "sensorImported": {
          "type": "boolean",
          "description": "Sensor imported action flag. Value is `true` if action is imported from sensor `false` otherwise."
        }
      }
    },
    "Parameter": {
      "type": "object",
      "description": "List of inputs to the action.",
      "properties": {
        "description": {
          "type": "string",
          "description": "Parameter description."
        },
        "hidden": {
          "type": "boolean",
          "description": "Is parameter hidden or not."
        },
        "label": {
          "type": "string",
          "description": "Parameter label."
        },
        "name": {
          "type": "string",
          "description": "Parameter name."
        },
        "required": {
          "type": "boolean",
          "description": "Is parameter required or not."
        },
        "secured": {
          "type": "boolean",
          "description": "Is parameter secured or not."
        },
        "type": {
          "type": "string",
          "description": "Parameter type. Valid values are `static`, `dynamic`, or `vault`. Default value is `static`"
        },
        "value": {
          "type": "string",
          "description": "Parameter value."
        }
      },
      "required": [
        "label",
        "name",
        "type"
      ]
    },
    "ParameterValue": {
      "type": "object",
      "description": "List of action input parameters.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Parameter name."
        },
        "value": {
          "type": "string",
          "description": "Parameter value."
        }
      },
      "required": [
        "name",
        "value"
      ]
    },
    "Policy": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "Policy description.",
          "maxLength": 512,
          "minLength": 0
        },
        "id": {
          "type": "string",
          "description": "Policy identifier.",
          "maxLength": 128,
          "minLength": 1,
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Policy name.",
          "maxLength": 128,
          "minLength": 1
        },
        "tags": {
          "type": "array",
          "description": "A list of policy tags.",
          "items": {
            "type": "string",
            "description": "A list of policy tags."
          }
        },
        "trigger": {
          "$ref": "#/$defs/Trigger"
        },
        "typeConfigurations": {
          "type": "array",
          "description": "List of configurations that contains the list of actions to run and the mode (automatic or manual) in which the policy is run.",
          "items": {
            "$ref": "#/$defs/TypeConfiguration"
          }
        }
      },
      "required": [
        "id",
        "name",
        "trigger",
        "typeConfigurations"
      ]
    },
    "PolicyRunnable": {
      "type": "object",
      "description": "Runnable associated with the policy. It can be a `workflow` or `action`. Currently only supports `action`.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Action identifier."
        },
        "runConfiguration": {
          "$ref": "#/$defs/RunConfiguration"
        },
        "type": {
          "type": "string",
          "description": "Type of runnable. Supported value is `action`.",
          "enum": [
            "action",
            "workflow"
          ]
        }
      },
      "required": [
        "id",
        "runConfiguration",
        "type"
      ]
    },
    "PolicyScheduling": {
      "type": "object",
      "description": "Scheduling information for a scheduled policy.",
      "properties": {
        "recurrentRule": {
          "type": "string",
          "description": "Recurrent Rule defines how the policy recurs, using iCalendar RRULE format (e.g., `FREQ=DAILY;INTERVAL=1`).It supports fields like FREQ, INTERVAL, BYDAY. Refer to RFC 5545: https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10"
        },
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "The time to run the policy action in milliseconds since epoch (UTC) (e.g., `1706713140000`)."
        }
      },
      "required": [
        "startTime"
      ]
    },
    "RunConfiguration": {
      "type": "object",
      "description": "Action run configuration.",
      "properties": {
        "actions": {
          "type": "array",
          "description": "List of action configurations.",
          "items": {
            "$ref": "#/$defs/ActionConfiguration"
          }
        }
      },
      "required": [
        "actions"
      ]
    },
    "Trigger": {
      "type": "object",
      "description": "The trigger is the Instana event or Smart Alert that defines the initial conditions that must be met for the policy to apply on the actions in `typeConfiguration`.",
      "properties": {
        "description": {
          "type": "string",
          "description": "A description for the trigger."
        },
        "id": {
          "type": "string",
          "description": "Trigger (Instana event or Smart Alert) identifier."
        },
        "name": {
          "type": "string",
          "description": "A name of the trigger (name of Instana event or Smart Alert)."
        },
        "scheduling": {
          "$ref": "#/$defs/PolicyScheduling"
        },
        "type": {
          "type": "string",
          "description": "Instana event type, Smart Alert type, or 'schedule'. The type must be one of the enum values.",
          "enum": [
            "customEvent",
            "builtinEvent",
            "applicationSmartAlert",
            "globalApplicationSmartAlert",
            "websiteSmartAlert",
            "infraSmartAlert",
            "mobileAppSmartAlert",
            "syntheticsSmartAlert",
            "logSmartAlert",
            "sloSmartAlert",
            "schedule"
          ]
        }
      },
      "required": [
        "type"
      ]
    },
    "TypeConfiguration": {
      "type": "object",
      "description": "List of configurations that contains the list of actions to run and the mode (automatic or manual) in which the policy is run.",
      "properties": {
        "condition": {
          "$ref": "#/$defs/Condition"
        },
        "name": {
          "type": "string",
          "description": "The policy type determines how a policy is run. Value must be one of the enum values. Value `manual` means the policy is run manually when an event is raised. Value `automatic` means policy is run automatically when an event is raised.",
          "enum": [
            "automatic",
            "manual"
          ]
        },
        "runnable": {
          "$ref": "#/$defs/PolicyRunnable"
        }
      },
      "required": [
        "name",
        "runnable"
      ]
    }
  }
}