{
  "asyncapi": "3.0.0",
  "info": {
    "title": "talend-management-consoles",
    "version": ""
  },
  "channels": {
    "systemEventsTalendManagementConsole": {
      "address": "system-events.talend-management-console",
      "messages": {
        "talendManagementConsoleCbpExecutionMetricsAggregated": {
          "$ref": "#/components/messages/talend-management-console.talendManagementConsoleCbpExecutionMetricsAggregated"
        }
      }
    }
  },
  "operations": {
    "talendManagementConsoleCbpExecutionMetricsAggregated": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/systemEventsTalendManagementConsole"
      },
      "messages": [
        {
          "$ref": "#/channels/systemEventsTalendManagementConsole/messages/talendManagementConsoleCbpExecutionMetricsAggregated"
        }
      ]
    }
  },
  "components": {
    "messages": {
      "talend-management-console.talendManagementConsoleCbpExecutionMetricsAggregated": {
        "name": "com.qlik.talend-management-console.cbp-execution-metrics.aggregated",
        "tags": [
          {
            "name": "talend-management-console"
          }
        ],
        "title": "Talend Management Console CBP metrics aggregated",
        "payload": {
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/cloudEventsContextAttributes"
            },
            {
              "$ref": "#/components/schemas/cloudEventsQlikExtensionsAttributes"
            },
            {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "required": [
                    "executionId",
                    "batchNumber",
                    "jobId"
                  ],
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Optional list of tag IDs associated with the task execution"
                    },
                    "jobId": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Job execution identifier on the engine (e.g. \"0349641b-066d-3876-a8ec-d8dfd37b8b3f\")"
                    },
                    "eventId": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "description": "Unique Identifier for this event, generated by the job"
                    },
                    "authorId": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "description": "UUID of the author who triggered or created the job (e.g. \"e5e1f88c-70e1-475c-8702-d604dea6fea1\")"
                    },
                    "cbpStatus": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Status of the Capacity-Based Pricing execution (for example: EXECUTION_SUCCESS, EXECUTION_FAILED, EXECUTION_TERMINATED)."
                    },
                    "customTag": {
                      "type": "string",
                      "maxLength": 128,
                      "description": "Custom tag for the execution"
                    },
                    "artifactId": {
                      "type": "string",
                      "description": "The identifier of the job artifact (e.g. \"6a74320d73e1fa31b2621665\")."
                    },
                    "cbpEndTime": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "The end timestamp of a job"
                    },
                    "cbpJobType": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Job type for the execution, for example \"DI\" (Data Integration) or \"ROUTE\"."
                    },
                    "datacenter": {
                      "type": "string",
                      "description": "Identifier of the datacenter where the execution occurred, if applicable (e.g. \"aws_qcs_us\")"
                    },
                    "javaVendor": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Java vendor/flavour used for the execution (e.g. \"Red Hat, Inc.\")"
                    },
                    "operatorId": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "description": "UUID of the operator who executed or ran the job (e.g. \"e5e1f88c-70e1-475c-8702-d604dea6fea1\")"
                    },
                    "batchNumber": {
                      "type": "integer",
                      "description": "Batch number must be at least 1"
                    },
                    "executionId": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "description": "UUID of the TMC execution (e.g. \"db51bc77-ab75-4240-9e17-d71bc9f4ab83\")"
                    },
                    "javaVersion": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Java version used for the execution (e.g. \"21.0.12\")"
                    },
                    "workspaceId": {
                      "type": "string",
                      "description": "Workspace id associated with the execution (e.g. \"6a6369911945d6abbcbca892\")."
                    },
                    "cbpInputSize": {
                      "type": "integer",
                      "description": "Deprecated. Input size, replaced with cbpInputBytes"
                    },
                    "cbpIsRootJob": {
                      "type": "boolean",
                      "description": "Flag identifier if the job is root or a child, true for the main job, false for sub-jobs"
                    },
                    "cbpStartTime": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "The start timestamp of a job"
                    },
                    "cbpDurationMs": {
                      "type": "integer",
                      "description": "The duration of the execution of a job, unit is milliseconds"
                    },
                    "cbpEventCount": {
                      "type": "integer",
                      "description": "For DATA_SERVICE, ROUTE, and BIG_DATA_STREAMING jobs, the volume of API calls."
                    },
                    "cbpInputBytes": {
                      "type": "integer",
                      "description": "Volume of bytes, for DI jobs."
                    },
                    "environmentId": {
                      "type": "string",
                      "description": "Environment id where the execution ran (e.g. \"66c879fb644716127f16d783\")."
                    },
                    "studioBuildId": {
                      "type": "string",
                      "maxLength": 128,
                      "description": "UUID of the Studio build"
                    },
                    "cbpDurationSec": {
                      "type": "integer",
                      "description": "Deprecated. The duration of the execution of a job. Replaced with cbpDurationMs."
                    },
                    "remoteEngineId": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "description": "UUID of the Remote Engine running the execution (e.g. \"69a6a510-34fd-4167-81fc-faa36f551539\")"
                    },
                    "runtimeVersion": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Runtime version used for the execution (e.g. \"8.0.2.R2026-06-RT_R2026-07-v2\")"
                    },
                    "cbpScheduleSource": {
                      "type": "string",
                      "maxLength": 64,
                      "description": "Schedule type/source (e.g. \"managed\", \"unmanaged\")"
                    },
                    "cbpDeltaDurationMs": {
                      "type": "integer",
                      "description": "The duration of the execution of a job since last received metric for the same execution, unit is milliseconds"
                    },
                    "cbpDeltaEventCount": {
                      "type": "integer",
                      "description": "for DATA_SERVICE, ROUTE, and BIG_DATA_STREAMING jobs the volume of API calls since last received metric for the same execution"
                    },
                    "cbpDeltaInputBytes": {
                      "type": "integer",
                      "description": "for DI jobs the volume of bytes since last received metric for the same execution"
                    },
                    "remoteEngineVersion": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Remote Engine version used for the execution (e.g. \"2.13.11\")"
                    },
                    "studioBuildDateTime": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Date and time of the Studio build"
                    },
                    "executionMetricOrigin": {
                      "type": "string",
                      "description": "Version of architecture (e.g. \"V1\",\"V2\") used by the Remote Engine to generate the metrics."
                    },
                    "remoteEngineClusterId": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "description": "UUID of the Remote Engine Cluster running the execution"
                    },
                    "marketingStudioVersion": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Marketing version of the Studio used for the execution"
                    },
                    "technicalStudioVersion": {
                      "type": "string",
                      "maxLength": 255,
                      "description": "Technical version of the Studio used for the execution"
                    }
                  }
                },
                "type": {
                  "type": "string",
                  "default": "com.qlik.talend-management-console.cbp-execution-metrics.aggregated",
                  "description": "The type of the event."
                },
                "source": {
                  "type": "string",
                  "default": "com.qlik/tmc-metrics-collector-job",
                  "description": "The source of the event."
                }
              }
            }
          ]
        },
        "description": "Talend Management Console Capacity-Based Pricing (CBP) metrics have been aggregated",
        "x-qlik-stability": "stable",
        "x-qlik-categories": [],
        "x-qlik-visibility": "public",
        "x-qlik-deprecated": false
      }
    },
    "schemas": {
      "cloudEventsContextAttributes": {
        "type": "object",
        "required": [
          "id",
          "source",
          "specversion",
          "type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "8b84e4d2-b7a7-42d5-b628-d23089794c71",
            "description": "Unique identifier for the event."
          },
          "time": {
            "type": "string",
            "format": "date-time",
            "example": "2018-10-30T07:06:22Z",
            "description": "Timestamp of when the event happened."
          },
          "type": {
            "type": "string",
            "examples": [
              "com.qlik.app.created"
            ],
            "minLength": 1,
            "description": "Describes the type of event related to the originating occurrence."
          },
          "source": {
            "type": "string",
            "format": "uri-reference",
            "examples": [
              "com.qlik/my-service"
            ],
            "minLength": 1,
            "description": "Identifies the context in which an event happened."
          },
          "specversion": {
            "enum": [
              "1.0"
            ],
            "type": "string",
            "description": "The event is compatible with the CloudEvents specification v1.0.2."
          },
          "datacontenttype": {
            "type": "string",
            "minLength": 1,
            "description": "Content type of the data value. Must adhere to RFC 2046 format."
          }
        },
        "description": "CloudEvents Specification JSON Schema"
      },
      "cloudEventsQlikExtensionsAttributes": {
        "type": "object",
        "required": [
          "tenantid"
        ],
        "properties": {
          "tenantid": {
            "type": "string",
            "example": "8fe34c17-6a4f-42ca-a8a1-b49ea11c83d2",
            "description": "Unique identifier for the tenant related to the event."
          }
        }
      }
    }
  }
}