{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coralogix/json-schema/coralogix-action-execution-request-schema.json",
  "title": "ActionExecutionRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coralogix-actions-service-api-openapi.yml#/components/schemas/ActionExecutionRequest",
  "type": "object",
  "oneOf": [
    {
      "required": [
        "create"
      ],
      "type": "object"
    },
    {
      "required": [
        "replace"
      ],
      "type": "object"
    },
    {
      "required": [
        "delete"
      ],
      "type": "object"
    },
    {
      "type": "object",
      "not": {
        "anyOf": [
          {
            "required": [
              "create"
            ],
            "type": "object"
          },
          {
            "required": [
              "replace"
            ],
            "type": "object"
          },
          {
            "required": [
              "delete"
            ],
            "type": "object"
          }
        ]
      }
    }
  ],
  "properties": {
    "create": {
      "$ref": "#/$defs/CreateActionRequest"
    },
    "delete": {
      "$ref": "#/$defs/DeleteActionRequest"
    },
    "replace": {
      "$ref": "#/$defs/ReplaceActionRequest"
    }
  },
  "$defs": {
    "CreateActionRequest": {
      "type": "object",
      "properties": {
        "applicationNames": {
          "maxItems": 1000,
          "minItems": 0,
          "type": "array",
          "items": {
            "maxLength": 1024,
            "minLength": 0,
            "pattern": "^[\\s\\S]*$",
            "type": "string",
            "description": "The application names."
          },
          "description": "The application names."
        },
        "description": {
          "description": "Human-readable description.",
          "maxLength": 65535,
          "minLength": 0,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "dpxlFilter": {
          "description": "The dpxl filter.",
          "maxLength": 65535,
          "minLength": 0,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "isPrivate": {
          "description": "The is private.",
          "type": "boolean",
          "x-coralogix-presence": true
        },
        "name": {
          "description": "Display name.",
          "maxLength": 50,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "sourceType": {
          "$ref": "#/$defs/v2.SourceType"
        },
        "subsystemNames": {
          "maxItems": 1000,
          "minItems": 0,
          "type": "array",
          "items": {
            "maxLength": 1024,
            "minLength": 0,
            "pattern": "^[\\s\\S]*$",
            "type": "string",
            "description": "The subsystem names."
          },
          "description": "The subsystem names."
        },
        "url": {
          "description": "URL. Must start with http:// or https://.",
          "maxLength": 32768,
          "minLength": 1,
          "pattern": "^https?://.*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "urlFields": {
          "maxItems": 1000,
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/UrlField"
          },
          "description": "The url fields. Each field requires both name and required, and names must be unique within the list."
        }
      }
    },
    "DeleteActionRequest": {
      "type": "object",
      "properties": {
        "id": {
          "description": "Unique identifier.",
          "maxLength": 36,
          "minLength": 36,
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
          "type": "string",
          "x-coralogix-presence": true
        }
      }
    },
    "ReplaceActionRequest": {
      "type": "object",
      "properties": {
        "action": {
          "$ref": "#/$defs/v2.Action"
        }
      }
    },
    "UrlField": {
      "required": [
        "name",
        "required"
      ],
      "type": "object",
      "properties": {
        "name": {
          "description": "Display name.",
          "maxLength": 1024,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "required": {
          "description": "The required.",
          "type": "boolean",
          "x-coralogix-presence": true
        }
      },
      "description": "Declares a URL field that may be required for the Action to be invokable on a log."
    },
    "v2.Action": {
      "type": "object",
      "properties": {
        "applicationNames": {
          "maxItems": 1000,
          "minItems": 0,
          "type": "array",
          "items": {
            "maxLength": 1024,
            "minLength": 0,
            "pattern": "^[\\s\\S]*$",
            "type": "string",
            "description": "The application names."
          },
          "description": "The application names."
        },
        "createdBy": {
          "description": "The creating user's username. Set by the server; ignored on requests.",
          "maxLength": 255,
          "minLength": 0,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "description": {
          "description": "Human-readable description.",
          "maxLength": 65535,
          "minLength": 0,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "dpxlFilter": {
          "description": "The dpxl filter.",
          "maxLength": 65535,
          "minLength": 0,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "id": {
          "description": "Unique identifier.",
          "maxLength": 36,
          "minLength": 36,
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "isHidden": {
          "description": "The is hidden.",
          "type": "boolean",
          "x-coralogix-presence": true
        },
        "isPrivate": {
          "description": "The is private.",
          "type": "boolean",
          "x-coralogix-presence": true
        },
        "name": {
          "description": "Display name.",
          "maxLength": 50,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "sourceType": {
          "$ref": "#/$defs/v2.SourceType"
        },
        "subsystemNames": {
          "maxItems": 1000,
          "minItems": 0,
          "type": "array",
          "items": {
            "maxLength": 1024,
            "minLength": 0,
            "pattern": "^[\\s\\S]*$",
            "type": "string",
            "description": "The subsystem names."
          },
          "description": "The subsystem names."
        },
        "url": {
          "description": "URL. Must start with http:// or https://.",
          "maxLength": 32768,
          "minLength": 1,
          "pattern": "^https?://.*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "urlFields": {
          "maxItems": 1000,
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/UrlField"
          },
          "description": "The url fields. Each field requires both name and required, and names must be unique within the list."
        }
      }
    },
    "v2.SourceType": {
      "enum": [
        "SOURCE_TYPE_UNSPECIFIED",
        "SOURCE_TYPE_LOG",
        "SOURCE_TYPE_DATA_MAP"
      ],
      "type": "string",
      "description": "Source type."
    }
  }
}