JFrog · Schema

JFrog Worker

Represents a serverless worker in the JFrog Platform that extends platform functionality through synchronized hooks and automation. Workers are TypeScript-based functions that react to JFrog Platform events in a secure, isolated execution environment.

ArtifactoryCI/CDContainer RegistryDevOpsMLOpsPackage ManagementSecuritySoftware Supply Chain

Properties

Name Type Description
key string Unique worker key identifier
description string Human-readable description of the worker's purpose
enabled boolean Whether the worker is currently active
source_code string TypeScript source code for the worker
action string The JFrog Platform event that triggers this worker
filter_criteria object Criteria for filtering which events trigger the worker
secrets array Encrypted secrets accessible to the worker at runtime
created string Worker creation timestamp
modified string Last modification timestamp
View JSON Schema on GitHub

JSON Schema

jfrog-worker-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://jfrog.com/schemas/worker",
  "title": "JFrog Worker",
  "description": "Represents a serverless worker in the JFrog Platform that extends platform functionality through synchronized hooks and automation. Workers are TypeScript-based functions that react to JFrog Platform events in a secure, isolated execution environment.",
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "description": "Unique worker key identifier",
      "examples": [
        "my-download-validator",
        "artifact-scanner"
      ]
    },
    "description": {
      "type": "string",
      "description": "Human-readable description of the worker's purpose"
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether the worker is currently active",
      "default": true
    },
    "source_code": {
      "type": "string",
      "description": "TypeScript source code for the worker"
    },
    "action": {
      "type": "string",
      "description": "The JFrog Platform event that triggers this worker",
      "enum": [
        "BEFORE_DOWNLOAD",
        "AFTER_DOWNLOAD",
        "BEFORE_UPLOAD",
        "AFTER_CREATE",
        "AFTER_BUILD_INFO_SAVE",
        "AFTER_MOVE",
        "AFTER_COPY",
        "BEFORE_DELETE",
        "BEFORE_CREATE_TOKEN",
        "GENERIC_EVENT"
      ]
    },
    "filter_criteria": {
      "type": "object",
      "description": "Criteria for filtering which events trigger the worker",
      "properties": {
        "artifact_filter_criteria": {
          "type": "object",
          "properties": {
            "repo_keys": {
              "type": "array",
              "description": "Repository keys to scope the worker to",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "secrets": {
      "type": "array",
      "description": "Encrypted secrets accessible to the worker at runtime",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Secret key name"
          },
          "value": {
            "type": "string",
            "description": "Secret value (write-only, not returned in GET)"
          }
        },
        "required": [
          "key"
        ]
      }
    },
    "created": {
      "type": "string",
      "format": "date-time",
      "description": "Worker creation timestamp"
    },
    "modified": {
      "type": "string",
      "format": "date-time",
      "description": "Last modification timestamp"
    }
  },
  "required": [
    "key",
    "source_code",
    "action"
  ]
}