From 7fcf22f3058c2baf203ae5db4649300560dedacf Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Fri, 2 Jan 2026 17:07:33 +0000 Subject: [PATCH] Add definitions for initial webhooks --- .../EnvironmentMonitoringConfig.yml | 10 +++++-- platform/api.yml | 27 +++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/components/schemas/environments/EnvironmentMonitoringConfig.yml b/components/schemas/environments/EnvironmentMonitoringConfig.yml index d05fb831..8457335b 100644 --- a/components/schemas/environments/EnvironmentMonitoringConfig.yml +++ b/components/schemas/environments/EnvironmentMonitoringConfig.yml @@ -32,7 +32,10 @@ properties: - type: object properties: endpoint: - description: Configuration options for pushing metrics externally. + description: > + Configuration options for pushing metrics externally. + + For payload see webhook `environmentMetricsPush` oneOf: - type: object required: @@ -49,7 +52,10 @@ properties: - type: object properties: endpoint: - description: Configuration options for pushing events externally. + description: > + Configuration options for pushing events externally. + + For payload see webhook `environmentEventsPush` oneOf: - type: object required: diff --git a/platform/api.yml b/platform/api.yml index f1c4a421..a88fffe7 100644 --- a/platform/api.yml +++ b/platform/api.yml @@ -768,6 +768,7 @@ paths: $ref: paths/utils/resource/lookup.yml "/v1/utils/components/lookup": $ref: paths/utils/components/lookup.yml + components: securitySchemes: bearerAuth: @@ -779,3 +780,29 @@ components: in: header type: apiKey description: Defines the scope of the request to a specific Hub. + +webhooks: + environmentMetricsPush: + post: + operationId: environmentMetricsPush + summary: Environment Metrics Push + description: Regularly sends metrics from an environment to an endpoint. + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: ../components/schemas/monitoring/Metric.yml + environmentEventsPush: + post: + operationId: environmentEventsPush + summary: Environment Events Push + description: Regularly sends events from an environment to an endpoint. + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: ../components/schemas/monitoring/events/Event.yml \ No newline at end of file