{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/talend/json-schema/talend-execution-component-metrics-schema.json",
  "title": "ExecutionComponentMetrics",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/talend-monitoring-api-openapi.yml#/components/schemas/ExecutionComponentMetrics",
  "type": "object",
  "required": [
    "artifact_id",
    "artifact_version",
    "engine_id",
    "metrics",
    "processes",
    "start_time",
    "task_execution_id",
    "task_id",
    "workspace_id"
  ],
  "properties": {
    "engine_id": {
      "type": "string",
      "description": "Engine ID"
    },
    "workspace_id": {
      "type": "string",
      "description": "Workspace ID"
    },
    "task_id": {
      "type": "string",
      "description": "Task ID"
    },
    "task_execution_id": {
      "type": "string",
      "description": "Task execution ID"
    },
    "artifact_id": {
      "type": "string",
      "description": "Artifact ID"
    },
    "artifact_name": {
      "type": "string",
      "description": "Artifact name"
    },
    "artifact_version": {
      "type": "string",
      "description": "Artifact version"
    },
    "start_time": {
      "type": "string",
      "description": "Jon run start time"
    },
    "finish_time": {
      "type": "string",
      "description": "Job run finish time"
    },
    "rows_rejected": {
      "type": "number",
      "description": "Number of rows rejected"
    },
    "operator": {
      "type": "string",
      "description": "Operator"
    },
    "operator_type": {
      "type": "string",
      "description": "Operator type",
      "enum": [
        "HUMAN",
        "SERVICE"
      ]
    },
    "processes": {
      "type": "array",
      "description": "Job processes",
      "items": {
        "$ref": "#/$defs/ProcessMetric"
      }
    },
    "metrics": {
      "$ref": "#/$defs/ComponentMetricPage"
    }
  },
  "$defs": {
    "ComponentMetric": {
      "type": "object",
      "required": [
        "component_start_time_seconds",
        "connector_id",
        "connector_label",
        "connector_type",
        "pid"
      ],
      "properties": {
        "pid": {
          "type": "string",
          "description": "Unique Job identifier for the current run"
        },
        "connector_type": {
          "type": "string",
          "description": "Connector type"
        },
        "connector_label": {
          "type": "string",
          "description": "Connector label"
        },
        "connector_id": {
          "type": "string",
          "description": "Connector ID"
        },
        "target_connector_type": {
          "type": "string",
          "description": "Target connector type"
        },
        "target_label": {
          "type": "string",
          "description": "Target connector label"
        },
        "target_id": {
          "type": "string",
          "description": "Target connector ID"
        },
        "component_start_time_seconds": {
          "type": "number",
          "description": "Time stamp indicating the component start time (any component in the Job)"
        },
        "component_connection_rows_total": {
          "type": "number",
          "description": "Total number of rows treated by a component in the Job"
        },
        "component_execution_duration_milliseconds": {
          "type": "number",
          "description": "Amount of time it takes to execute a Job component (generated for components that are managing rows)"
        },
        "stacktrace": {
          "type": "string",
          "description": "Contains the component stacktrace  (only if an error occurs while executing the component)"
        }
      }
    },
    "ComponentMetricPage": {
      "type": "object",
      "required": [
        "items",
        "limit",
        "offset",
        "total"
      ],
      "properties": {
        "items": {
          "type": "array",
          "description": "Array of metrics entries about the components in a Job",
          "items": {
            "$ref": "#/$defs/ComponentMetric"
          }
        },
        "limit": {
          "type": "number",
          "description": "Maximum number of entries to be returned on a page in the response"
        },
        "offset": {
          "type": "number",
          "description": "The start position of the pagination of the entries, greater or equal to 0"
        },
        "total": {
          "type": "number",
          "description": "Total number of entries in the response"
        }
      }
    },
    "ProcessMetric": {
      "type": "object",
      "required": [
        "father_pid",
        "job_name",
        "pid",
        "process_id",
        "root_pid"
      ],
      "properties": {
        "process_id": {
          "type": "string",
          "description": "Process ID. This is JVM's UUID"
        },
        "job_name": {
          "type": "string",
          "description": "Job Name"
        },
        "pid": {
          "type": "string",
          "description": "PID. This is the unique Job identifier for the current run"
        },
        "father_pid": {
          "type": "string",
          "description": "ID of the first direct parent Job"
        },
        "root_pid": {
          "type": "string",
          "description": "ID of the first root Job if there are several Subjobs"
        }
      }
    }
  }
}