{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-action-schema.json",
  "title": "Action",
  "description": "Automation action definition. When this is used in policy creation request, only `id` should be specified.",
  "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/Action",
  "type": "object",
  "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"
  ],
  "$defs": {
    "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"
      ]
    }
  }
}