{
  "openapi": "3.0.1",
  "info": {
    "title": "Vatis Stream Configuration Service",
    "description": "Vatis Stream Configuration Service API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://stream-configuration-service.vatis.tech",
      "description": "Default server"
    }
  ],
  "paths": {
    "/stream-configuration-service/api/v1/stream-configuration-templates": {
      "get": {
        "tags": [
          "stream-configuration-template-resource-impl"
        ],
        "summary": "Find all",
        "description": "Retrieves all the stream configuration templates the user can access in a paginated manner",
        "operationId": "getAll",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "integer",
              "example": 0,
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "integer",
              "example": 10,
              "default": 10
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Default error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Exception on client authorization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Full authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Exception on Pulsar operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageStreamConfigurationTemplateDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerToken": []
          }
        ]
      },
      "put": {
        "tags": [
          "stream-configuration-template-resource-impl"
        ],
        "summary": "Create or update",
        "description": "Create or update a stream configuration template",
        "operationId": "createOrUpdate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStreamConfigurationTemplateDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "default": {
            "description": "Default error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Exception on client authorization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error in stream configuration template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The current user does not have sufficient permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Exception on Pulsar operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "Stream configuration template  created or existed and it was successfully overwritten",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreamConfigurationTemplateDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerToken": []
          }
        ]
      }
    },
    "/stream-configuration-service/api/v1/stream-configuration-templates/{streamConfigurationTemplateId}": {
      "get": {
        "tags": [
          "stream-configuration-template-resource-impl"
        ],
        "summary": "Find by id",
        "description": "Retrieves the stream configuration template with patches applied.",
        "operationId": "getById",
        "parameters": [
          {
            "name": "streamConfigurationTemplateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Vat-Meta-Template-Patch",
            "in": "header",
            "description": "Deprecated: Use PATCH endpoint instead. Patch object or array of patch objects as described in RFC-6902",
            "deprecated": true,
            "schema": {
              "type": "string"
            },
            "example": [
              {
                "op": "replace",
                "path": "/json/path",
                "value": "some_value"
              }
            ]
          }
        ],
        "responses": {
          "default": {
            "description": "Default error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Exception on client authorization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Full authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Exception on Pulsar operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreamConfigurationTemplateDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerToken": []
          }
        ]
      },
      "patch": {
        "tags": [
          "stream-configuration-template-resource-impl"
        ],
        "summary": "Patch by id",
        "description": "Retrieves the stream configuration template with patches applied.",
        "operationId": "patchById",
        "parameters": [
          {
            "name": "streamConfigurationTemplateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StreamConfigurationPatchDto"
              },
              "examples": {
                "Example": {
                  "summary": "Example of a patch object",
                  "description": "Example of a patch object",
                  "value": {
                    "jsonPatches": [
                      {
                        "op": "replace",
                        "path": "/json/path",
                        "value": "some_value"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "Default error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Exception on client authorization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Full authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Exception on Pulsar operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreamConfigurationTemplateDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerToken": []
          }
        ]
      }
    },
    "/stream-configuration-service/api/v1/processor-declarations": {
      "get": {
        "tags": [
          "processor-declaration-resource-impl"
        ],
        "summary": "Find all",
        "description": "Retrieves all the processor declarations the user can access in a paginated manner",
        "operationId": "getAll_1",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "integer",
              "example": 0,
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "integer",
              "example": 10,
              "default": 10
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Default error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Exception on client authorization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Full authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Exception on Pulsar operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageProcessorDeclarationDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerToken": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "integer",
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "internalErrorName": {
            "type": "string"
          },
          "nestedErrors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "CreateProcessorConfigurationTemplateDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "processorDeclarationId": {
            "type": "string"
          },
          "previousProcessorId": {
            "type": "string"
          },
          "propertiesSchema": {
            "type": "string"
          },
          "properties": {
            "type": "object"
          },
          "destinationTopicMessageHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "destinationTopicHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "sourceSubscriptionHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "patchAliases": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "egress": {
            "$ref": "#/components/schemas/ProcessorEgressConfigurationDto"
          }
        }
      },
      "CreateStreamConfigurationTemplateDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "dataSourceSchema": {
            "type": "string"
          },
          "processors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateProcessorConfigurationTemplateDto"
            }
          },
          "patchAliases": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ProcessorEgressConfigurationDto": {
        "type": "object",
        "properties": {
          "persist": {
            "type": "boolean"
          },
          "sink": {
            "type": "boolean"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ProcessorConfigurationTemplateDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "processorDeclaration": {
            "$ref": "#/components/schemas/ProcessorDeclarationDto"
          },
          "previousProcessorId": {
            "type": "string"
          },
          "propertiesSchema": {
            "type": "string"
          },
          "properties": {
            "type": "object"
          },
          "destinationTopicMessageHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "destinationTopicHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "sourceSubscriptionHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "patchAliases": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "egress": {
            "$ref": "#/components/schemas/ProcessorEgressConfigurationDto"
          }
        }
      },
      "ProcessorDeclarationDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "clusterDomainNameTemplate": {
            "type": "string"
          },
          "podsDiscoveryClusterDomainName": {
            "type": "string"
          },
          "revision": {
            "type": "string"
          },
          "propertiesSchema": {
            "type": "string"
          },
          "inputSchemas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "outputSchema": {
            "type": "string"
          },
          "features": {
            "$ref": "#/components/schemas/ProcessorFeaturesDto"
          },
          "operationType": {
            "type": "string",
            "enum": [
              "BATCH_TRANSCRIPTION",
              "REAL_TIME_TRANSCRIPTION",
              "SPEAKERS_DIARIZATION",
              "VOICE_ACTIVITY_DETECTION",
              "TRANSCODE",
              "TRANSLATION",
              "SUMMARIZATION",
              "SENTIMENT_ANALYSIS",
              "NO_OPERATION",
              "LLM_PROCESSING"
            ]
          }
        }
      },
      "ProcessorFeaturesDto": {
        "type": "object",
        "properties": {
          "support": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "require": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "implement": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "requireSupport": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "StreamConfigurationTemplateDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "dataSourceSchema": {
            "type": "string"
          },
          "processors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessorConfigurationTemplateDto"
            }
          },
          "patchAliases": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "StreamConfigurationPatchDto": {
        "type": "object",
        "properties": {
          "jsonPatches": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PageStreamConfigurationTemplateDto": {
        "type": "object",
        "properties": {
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalElements": {
            "type": "integer",
            "format": "int64"
          },
          "pageable": {
            "$ref": "#/components/schemas/PageableObject"
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int32"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StreamConfigurationTemplateDto"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "first": {
            "type": "boolean"
          },
          "last": {
            "type": "boolean"
          },
          "empty": {
            "type": "boolean"
          }
        }
      },
      "PageableObject": {
        "type": "object",
        "properties": {
          "paged": {
            "type": "boolean"
          },
          "unpaged": {
            "type": "boolean"
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "offset": {
            "type": "integer",
            "format": "int64"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          }
        }
      },
      "SortObject": {
        "type": "object",
        "properties": {
          "unsorted": {
            "type": "boolean"
          },
          "sorted": {
            "type": "boolean"
          },
          "empty": {
            "type": "boolean"
          }
        }
      },
      "PageProcessorDeclarationDto": {
        "type": "object",
        "properties": {
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "totalElements": {
            "type": "integer",
            "format": "int64"
          },
          "pageable": {
            "$ref": "#/components/schemas/PageableObject"
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "type": "integer",
            "format": "int32"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessorDeclarationDto"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "sort": {
            "$ref": "#/components/schemas/SortObject"
          },
          "first": {
            "type": "boolean"
          },
          "last": {
            "type": "boolean"
          },
          "empty": {
            "type": "boolean"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}
