From 9c6afe85826b7f9bc13a01a26ffbde6434baeb7b Mon Sep 17 00:00:00 2001 From: Leah Tacke genannt Unterberg <leah.tgu@pads.rwth-aachen.de> Date: Wed, 7 May 2025 17:15:40 +0200 Subject: [PATCH] improved export to make use of streaming export and started support for pulling from mapped dbs --- app/db/models/mapped_sources.py | 34 + app/db/models/tracked_mitm_dataset.py | 5 +- app/routes/definitions/generate.py | 2 + app/routes/mitm_dataset/append.py | 38 + app/routes/mitm_dataset/export.py | 2 +- app/routes/mitm_dataset/mapped_db.py | 23 + app/routes/mitm_dataset/register.py | 10 +- app/routes/mitm_dataset/register_external.py | 28 +- app/routes/mitm_dataset/requests.py | 7 + app/routes/mitm_dataset/router.py | 48 +- app/routes/mitm_dataset/upload.py | 81 +- pyproject.toml | 2 +- schema/openapi.json | 2 +- schema/openapi.yaml | 1160 +++++++++++++++--- test/export.http | 8 +- test/http-client.env.json | 4 +- test/superset-passthrough.http | 2 +- test/upload.http | 2 +- 18 files changed, 1184 insertions(+), 274 deletions(-) create mode 100644 app/db/models/mapped_sources.py create mode 100644 app/routes/mitm_dataset/append.py create mode 100644 app/routes/mitm_dataset/mapped_db.py diff --git a/app/db/models/mapped_sources.py b/app/db/models/mapped_sources.py new file mode 100644 index 0000000..b39ce69 --- /dev/null +++ b/app/db/models/mapped_sources.py @@ -0,0 +1,34 @@ +import uuid +from uuid import UUID + +import pydantic +from mitm_tooling.definition import MITM +from mitm_tooling.extraction.sql.data_models import CompiledVirtualView +from mitm_tooling.extraction.sql.mapping import ConceptMapping +from pydantic import BaseModel +from sqlalchemy.orm import relationship +from sqlmodel import Field, SQLModel + +from .common import APPLICATION_DB_SCHEMA +from ..adapters import PydanticType + + +class MappedDB(BaseModel): + mitm: MITM + cvvs: list[CompiledVirtualView] + mappings: list[ConceptMapping] + + @property + def relevant_mappings(self) -> list[ConceptMapping]: + return [cm for cm in self.mappings if cm.mitm == self.mitm] + + +class MappedMitMDatasetSources(SQLModel, table=True): + model_config = pydantic.ConfigDict(arbitrary_types_allowed=True) + __tablename__ = 'mapped_mitmdataset_sources' + __table_args__ = {'schema': APPLICATION_DB_SCHEMA} + + id: int = Field(primary_key=True, sa_column_kwargs={'autoincrement': True}) + uuid: UUID = Field(default_factory=uuid.uuid4, index=True, unique=True, nullable=False) + mitm_mapping: MappedDB = Field(sa_type=PydanticType.wrap(MappedDB), repr=False) + diff --git a/app/db/models/tracked_mitm_dataset.py b/app/db/models/tracked_mitm_dataset.py index 4c64090..c79c59d 100644 --- a/app/db/models/tracked_mitm_dataset.py +++ b/app/db/models/tracked_mitm_dataset.py @@ -31,14 +31,13 @@ class AddTrackedMitMDataset(BaseModel): sql_alchemy_uri: AnyUrl mitm_header: Header - class TrackedMitMDataset(FromPydanticModelsMixin, AddTrackedMitMDataset, BaseTrackedMitMDataset, SQLModel, table=True): model_config = pydantic.ConfigDict(arbitrary_types_allowed=True) __tablename__ = 'tracked_mitm_datasets' __table_args__ = {'schema': APPLICATION_DB_SCHEMA} - # id: int = Field(primary_key=True, sa_column_kwargs={'autoincrement': True}) - uuid: UUID = Field(primary_key=True, default_factory=uuid.uuid4) + id: int = Field(primary_key=True, sa_column_kwargs={'autoincrement': True}) + uuid: UUID = Field(default_factory=uuid.uuid4, index=True, unique=True, nullable=False) dataset_name: str = Field() schema_name: str = Field() sql_alchemy_uri: AnyUrl = Field(sa_type=StrType.wrap(AnyUrl)) diff --git a/app/routes/definitions/generate.py b/app/routes/definitions/generate.py index 063c863..1533ddd 100644 --- a/app/routes/definitions/generate.py +++ b/app/routes/definitions/generate.py @@ -1,3 +1,4 @@ +from datetime import datetime from collections.abc import Sequence from mitm_tooling.definition import MITM @@ -111,6 +112,7 @@ def track_visualizations(orm_session: ORMSession, visualization_bundle: SupersetVisualizationBundle) -> TrackedMitMDataset: viz_id_map = visualization_bundle.viz_identifier_map tracked_dataset.identifier_bundle = tracked_dataset.identifier_bundle.with_visualizations(viz_id_map) + tracked_dataset.last_edited = datetime.now() orm_session.commit() orm_session.refresh(tracked_dataset) return tracked_dataset diff --git a/app/routes/mitm_dataset/append.py b/app/routes/mitm_dataset/append.py new file mode 100644 index 0000000..9869f34 --- /dev/null +++ b/app/routes/mitm_dataset/append.py @@ -0,0 +1,38 @@ +import logging +from typing import Callable + +import sqlalchemy as sa +from mitm_tooling.extraction.sql.mapping import Exportable +from mitm_tooling.representation import SQLRepresentationSchema +from mitm_tooling.transformation.sql.from_exportable import insert_exportable_instances +from mitm_tooling.utilities.sql_utils import create_sa_engine +from pydantic import AnyUrl + +from app.db.models import TrackedMitMDataset + +logger = logging.getLogger(__name__) + + +def append_exportable(source: AnyUrl, exportable: Exportable, tracked_mitm_dataset: TrackedMitMDataset) -> tuple[ + int, int]: + source_engine = create_sa_engine(source) + + def instances_inserter(conn, sql_rep_schema): + return insert_exportable_instances(source_engine, exportable, conn, sql_rep_schema, stream_data=False) + + return append_instances(instances_inserter, tracked_mitm_dataset) + + +def append_instances( + instances_inserter: Callable[[sa.Connection, SQLRepresentationSchema], tuple[int, int]], + tracked_mitm_dataset: TrackedMitMDataset, +) -> tuple[int, int]: + sql_rep_schema = tracked_mitm_dataset.sql_rep_schema + target_engine = create_sa_engine(tracked_mitm_dataset.sql_alchemy_uri) + + with target_engine.begin() as conn: + ii, ir = instances_inserter(conn, sql_rep_schema) + logger.info(f'Appended MitM Data into schema: {tracked_mitm_dataset.schema_name}') + conn.commit() + + return ii, ir diff --git a/app/routes/mitm_dataset/export.py b/app/routes/mitm_dataset/export.py index 7888f0d..c687117 100644 --- a/app/routes/mitm_dataset/export.py +++ b/app/routes/mitm_dataset/export.py @@ -21,7 +21,7 @@ def export_via_mapping(tracked_dataset: TrackedMitMDataset) -> tuple[sa.Engine, cms = sql_rep_into_mappings(header, sql_rep_schema) - logger.info('Preparing to export CMs:\n', '\n'.join((str(cm) for cm in cms))) + logger.info('Preparing to export CMs:\n' + '\n'.join((str(cm) for cm in cms))) db_meta_info = DBMetaInfo.from_sa_meta(sql_rep_schema.meta, default_schema=schema_name) db_metas = {SourceDBType.OriginalDB: db_meta_info} diff --git a/app/routes/mitm_dataset/mapped_db.py b/app/routes/mitm_dataset/mapped_db.py new file mode 100644 index 0000000..131f80f --- /dev/null +++ b/app/routes/mitm_dataset/mapped_db.py @@ -0,0 +1,23 @@ +import sqlalchemy as sa +from mitm_tooling.definition import MITM +from mitm_tooling.extraction.sql.data_models import VirtualDB, SourceDBType, CompiledVirtualView +from mitm_tooling.extraction.sql.mapping import ConceptMapping, MappingExport, Exportable +from mitm_tooling.transformation.sql.from_sql import db_engine_into_db_meta +from pydantic import BaseModel +from app.db.models.mapped_sources import MappedDB + + +def mk_db_metas(remote_engine: sa.Engine, cvvs: list[CompiledVirtualView]): + vdb = VirtualDB() + for cvv in cvvs: + vdb.put_view(cvv.to_virtual_view(vdb.sa_meta)) + + virtual_db_meta = vdb.to_db_meta_info() + original_db_meta = db_engine_into_db_meta(remote_engine) + return {SourceDBType.OriginalDB: original_db_meta, SourceDBType.VirtualDB: virtual_db_meta} + + +def mk_exportable(remote_engine: sa.Engine, mapped_db: MappedDB) -> Exportable: + db_metas = mk_db_metas(remote_engine, mapped_db.cvvs) + me = MappingExport(mitm=mapped_db.mitm, mapped_concepts=mapped_db.relevant_mappings) + return me.apply(db_metas) diff --git a/app/routes/mitm_dataset/register.py b/app/routes/mitm_dataset/register.py index fccc6b8..811cbd6 100644 --- a/app/routes/mitm_dataset/register.py +++ b/app/routes/mitm_dataset/register.py @@ -7,13 +7,13 @@ from app.dependencies.db import ORMSessionDependency from app.routes.definitions.generate import mk_mitm_dataset_bundle -def register_mitm_dataset(session: ORMSessionDependency, request: AddTrackedMitMDataset) -> TrackedMitMDataset: - db_conn_info= DBConnectionInfo(sql_alchemy_uri=request.sql_alchemy_uri, schema_name=request.schema_name) - identifiers = MitMDatasetIdentifierBundle(mitm_dataset=MitMDatasetIdentifier(dataset_name=request.dataset_name, uuid=request.uuid)) - definition = mk_mitm_dataset_bundle(request.mitm_header, db_conn_info, request.dataset_name, identifiers=identifiers) +def register_mitm_dataset(session: ORMSessionDependency, add_model: AddTrackedMitMDataset) -> TrackedMitMDataset: + db_conn_info= DBConnectionInfo(sql_alchemy_uri=add_model.sql_alchemy_uri, schema_name=add_model.schema_name) + identifiers = MitMDatasetIdentifierBundle(mitm_dataset=MitMDatasetIdentifier(dataset_name=add_model.dataset_name, uuid=add_model.uuid)) + definition = mk_mitm_dataset_bundle(add_model.mitm_header, db_conn_info, add_model.dataset_name, identifiers=identifiers) identifier_bundle = definition.identifiers - model = TrackedMitMDataset.from_models(request, identifier_bundle=identifier_bundle) + model = TrackedMitMDataset.from_models(add_model, identifier_bundle=identifier_bundle) session.add(model) session.commit() diff --git a/app/routes/mitm_dataset/register_external.py b/app/routes/mitm_dataset/register_external.py index 57dfd49..a50e08a 100644 --- a/app/routes/mitm_dataset/register_external.py +++ b/app/routes/mitm_dataset/register_external.py @@ -1,9 +1,15 @@ import sqlalchemy as sa -from mitm_tooling.extraction.sql.data_models import VirtualDB, DBMetaInfo, SourceDBType, VirtualView +from mitm_tooling.definition import MITM +from mitm_tooling.extraction.sql.data_models import VirtualDB, DBMetaInfo, SourceDBType, VirtualView, \ + CompiledVirtualView from mitm_tooling.extraction.sql.db import connect_and_reflect +from mitm_tooling.extraction.sql.mapping import ConceptMapping, MappingExport, Exportable from mitm_tooling.representation import Header, mk_sql_rep_schema from mitm_tooling.representation.sql_representation import mk_concept_table_name +from mitm_tooling.transformation.sql.from_sql import db_engine_into_db_meta +from mitm_tooling.utilities.python_utils import take_first from mitm_tooling.utilities.sql_utils import create_sa_engine +from pydantic import AnyUrl, BaseModel from sqlalchemy.orm import Session from app.dependencies.db import ORMSessionDependency @@ -11,30 +17,12 @@ from app.routes.mitm_dataset.requests import RegisterExternalMitMDatasetRequest from app.routes.mitm_dataset.responses import RegisterMitMResponse + def register_external_mitm_dataset( session: ORMSessionDependency, request: RegisterExternalMitMDatasetRequest, ) -> RegisterMitMResponse: - vdb = VirtualDB() - for cvv in request.cvvs: - vdb.put_view(cvv.to_virtual_view(vdb.sa_meta)) - - virtual_db_meta = vdb.to_db_meta_info() - remote_engine = create_sa_engine(request.sql_alchemy_uri) - sa_meta, _ = connect_and_reflect(remote_engine) - original_db_meta = DBMetaInfo.from_sa_meta(sa_meta, 'main') - db_metas = {SourceDBType.OriginalDB: original_db_meta, SourceDBType.VirtualDB: virtual_db_meta} - header_entries = [] - mapped_vvs = [] - result_meta = sa.MetaData() - with Session(remote_engine) as session: - for mapping in request.mappings: - hep, from_clause = mapping.apply(db_metas) - header_entries.extend(hep.apply_session(session)) - concept_table_name = mk_concept_table_name(mapping.mitm, mapping.concept) - mapped_vvs.append(VirtualView.from_from_clause(concept_table_name, from_clause, result_meta)) - header = Header(mitm=request.mitm, header_entries=tuple(header_entries)) sql_rep_schema = mk_sql_rep_schema(header, view_generators=None) # TODO connect mapped_vvs to sql_rep_schema diff --git a/app/routes/mitm_dataset/requests.py b/app/routes/mitm_dataset/requests.py index af866de..877dfa7 100644 --- a/app/routes/mitm_dataset/requests.py +++ b/app/routes/mitm_dataset/requests.py @@ -2,6 +2,7 @@ import pydantic from mitm_tooling.definition import MITM from mitm_tooling.extraction.sql.data_models import CompiledVirtualView from mitm_tooling.extraction.sql.mapping import ConceptMapping +from mitm_tooling.representation import Header from pydantic import AnyUrl from app.db.models import AddTrackedMitMDataset @@ -10,6 +11,12 @@ from app.db.models import AddTrackedMitMDataset class AddTrackedMitMDatasetRequest(AddTrackedMitMDataset): pass +class EditTrackedMitMDatasetRequest(pydantic.BaseModel): + dataset_name: str + schema_name: str + sql_alchemy_uri: AnyUrl + mitm_header: Header + is_managed_locally: bool class RegisterExternalMitMDatasetRequest(pydantic.BaseModel): dataset_name: str diff --git a/app/routes/mitm_dataset/router.py b/app/routes/mitm_dataset/router.py index 0c807d9..6b17a20 100644 --- a/app/routes/mitm_dataset/router.py +++ b/app/routes/mitm_dataset/router.py @@ -1,4 +1,5 @@ import logging +from datetime import datetime from typing import Sequence import sqlmodel @@ -13,8 +14,8 @@ from app.db.models import TrackedMitMDataset, ListTrackedMitMDataset from app.dependencies.db import DBEngineDependency, ORMSessionDependency from app.dependencies.orm import TrackedMitMDatasetDependency from .export import export_via_mapping -from .requests import AddTrackedMitMDatasetRequest, RegisterExternalMitMDatasetRequest -from .responses import UploadMitMResponse, RegisterMitMResponse, MitMsListResponse +from .requests import AddTrackedMitMDatasetRequest, RegisterExternalMitMDatasetRequest, EditTrackedMitMDatasetRequest +from .responses import UploadMitMResponse, RegisterMitMResponse from .upload import upload_mitm_file from ...db.utils import mk_session @@ -24,12 +25,15 @@ logger = logging.getLogger(__name__) @router.post('/upload') def upload_mitm_dataset( + session: ORMSessionDependency, engine: DBEngineDependency, dataset_name: str, mitm: MITM = MITM.MAED, mitm_zip: UploadFile = File(media_type='application/zip')) -> UploadMitMResponse: try: - model = upload_mitm_file(mitm, mitm_zip.file, dataset_name=dataset_name, uuid=mk_uuid(), engine=engine) + add_model = upload_mitm_file(mitm, mitm_zip.file, dataset_name=dataset_name, uuid=mk_uuid(), engine=engine) + from .register import register_mitm_dataset + model = register_mitm_dataset(session, add_model) return UploadMitMResponse(status='success', tracked_mitm_dataset=model) except Exception as e: @@ -39,8 +43,8 @@ def upload_mitm_dataset( @router.post('/register') -def register_mitm_dataset(session: ORMSessionDependency, - request: RegisterExternalMitMDatasetRequest) -> RegisterMitMResponse: +def register_external_mitm_dataset(session: ORMSessionDependency, + request: RegisterExternalMitMDatasetRequest) -> RegisterMitMResponse: from .register_external import register_external_mitm_dataset return register_external_mitm_dataset(session, request) @@ -49,7 +53,7 @@ def register_mitm_dataset(session: ORMSessionDependency, def post_mitm_dataset(session: ORMSessionDependency, new_mitm_dataset: AddTrackedMitMDatasetRequest) -> TrackedMitMDataset: try: - new = TrackedMitMDataset.model_validate(**new_mitm_dataset.model_dump()) + new = TrackedMitMDataset.model_validate(**new_mitm_dataset.model_dump(mode='python', round_trip=True)) session.add(new) session.commit() session.refresh(new) @@ -58,6 +62,17 @@ def post_mitm_dataset(session: ORMSessionDependency, raise HTTPException(400, f'TrackedMitMDataset creation failed: {str(exc)}') from exc +@router.post('/{uuid}') +def put_mitm_dataset(session: ORMSessionDependency, + tracked_dataset: TrackedMitMDatasetDependency, + edited_mitm_dataset: EditTrackedMitMDatasetRequest) -> TrackedMitMDataset: + tracked_dataset.sqlmodel_update(edited_mitm_dataset) + tracked_dataset.last_edited = datetime.now() + session.commit() + session.refresh(tracked_dataset) + return tracked_dataset + + @router.get('/{uuid}') def get_mitm_dataset(tracked_dataset: TrackedMitMDatasetDependency) -> TrackedMitMDataset: return tracked_dataset @@ -75,11 +90,24 @@ def delete_mitm_dataset(session: ORMSessionDependency, tracked_dataset: TrackedM session.commit() +@router.post('/refresh/{uuid}') +def refresh_mitm_dataset(session: ORMSessionDependency, + tracked_dataset: TrackedMitMDatasetDependency) -> TrackedMitMDataset: + ... + # refresh_mitm_dataset(session, tracked_dataset) + + @router.post('/export/{uuid}', response_class=StreamingResponse, responses={200: {'content': {'application/zip': {}}}}) -def export_mitm_dataset(engine: DBEngineDependency, tracked_dataset: TrackedMitMDatasetDependency) -> StreamingResponse: +def export_mitm_dataset(engine: DBEngineDependency, + tracked_dataset: TrackedMitMDatasetDependency, + use_streaming: bool = False) -> StreamingResponse: remote_engine, exportable = export_via_mapping(tracked_dataset) with mk_session(remote_engine) as session: - ze = exportable.export_to_memory(session) - buf = ze.to_buffer() - return StreamingResponse(buf, media_type='application/zip') + if use_streaming: + ze = exportable.export_as_stream(session) + data = ze.iter_bytes() + else: + ze = exportable.export_to_memory(session) + data = ze.to_buffer() + return StreamingResponse(data, media_type='application/zip', headers={'Content-Disposition': 'attachment; filename=export.zip'}) diff --git a/app/routes/mitm_dataset/upload.py b/app/routes/mitm_dataset/upload.py index 70824be..5ae32c7 100644 --- a/app/routes/mitm_dataset/upload.py +++ b/app/routes/mitm_dataset/upload.py @@ -1,28 +1,32 @@ +import logging +from typing import Callable from uuid import UUID -import sqlmodel +import sqlalchemy as sa from mitm_tooling.definition import MITM +from mitm_tooling.extraction.sql.mapping import Exportable from mitm_tooling.io import read_zip -from mitm_tooling.representation import mk_sql_rep_schema, MITMData, insert_mitm_data -from mitm_tooling.transformation.superset.common import DBConnectionInfo +from mitm_tooling.representation import mk_sql_rep_schema, MITMData, insert_mitm_data, Header, SQLRepresentationSchema +from mitm_tooling.representation.sql_representation import insert_db_schema, insert_mitm_data_instances +from mitm_tooling.transformation.sql.from_exportable import insert_exportable, insert_exportable_instances from mitm_tooling.utilities.identifiers import name_plus_uuid, mk_uuid from mitm_tooling.utilities.io_utils import DataSource -from mitm_tooling.utilities.sql_utils import sa_url_into_any_url +from mitm_tooling.utilities.sql_utils import sa_url_into_any_url, create_sa_engine +from pydantic import AnyUrl from sqlalchemy import Engine -from app.db.models import TrackedMitMDataset +from app.db.models import AddTrackedMitMDataset from app.db.utils import create_schema from app.dependencies.db import get_engine -from app.routes.definitions.generate import mk_mitm_dataset_bundle -import logging logger = logging.getLogger(__name__) + def upload_mitm_file(mitm: MITM, mitm_zip: DataSource, dataset_name: str, uuid: UUID | None = None, - engine: Engine = None) -> TrackedMitMDataset: + engine: Engine = None) -> AddTrackedMitMDataset: mitm_data = read_zip(mitm_zip, mitm) return upload_mitm_data(mitm_data, dataset_name, uuid=uuid, engine=engine) @@ -30,37 +34,54 @@ def upload_mitm_file(mitm: MITM, def upload_mitm_data(mitm_data: MITMData, dataset_name: str, uuid: UUID | None = None, - engine: Engine = None) -> TrackedMitMDataset: + engine: Engine = None) -> AddTrackedMitMDataset: + header_creator = lambda : mitm_data.header + instances_inserter = lambda conn, sql_rep_schema: insert_mitm_data_instances(conn, sql_rep_schema, mitm_data) + + return upload_data(header_creator, instances_inserter, dataset_name, uuid, engine) + + +def upload_exportable(source: AnyUrl, + exportable: Exportable, + dataset_name: str, + uuid: UUID | None = None, + engine: Engine = None) -> AddTrackedMitMDataset: + source_engine = create_sa_engine(source) + + header_creator = lambda: exportable.generate_header(source_engine) + + def instances_inserter(conn, sql_rep_schema): + return insert_exportable_instances(source_engine, exportable, conn, sql_rep_schema, stream_data=False) + + return upload_data(header_creator, instances_inserter, dataset_name, uuid, engine) + + +def upload_data(header_creator: Callable[[], Header], + instances_inserter: Callable[[sa.Connection, SQLRepresentationSchema], tuple[int, int]], + dataset_name: str, + uuid: UUID | None = None, + engine: Engine = None) -> AddTrackedMitMDataset: engine = engine if engine is not None else get_engine() + sql_alchemy_uri = sa_url_into_any_url(engine.url) uuid = uuid or mk_uuid() unique_schema_name = name_plus_uuid(dataset_name, uuid, sep='_') logger.info(f'Uploading MitM Data with uuid {uuid} into target schema {unique_schema_name} on connected DB {engine.url}.') - sql_alchemy_uri = sa_url_into_any_url(engine.url) - sql_rep_schema = mk_sql_rep_schema(mitm_data.header, override_schema=unique_schema_name, skip_fk_constraints=True) + header = header_creator() + sql_rep_schema = mk_sql_rep_schema(header, override_schema=unique_schema_name, skip_fk_constraints=True) - with engine.connect() as connection: + with engine.begin() as connection: create_schema(connection, unique_schema_name) logger.info(f'Created schema: {unique_schema_name}') - insert_mitm_data(connection, sql_rep_schema, mitm_data) + insert_db_schema(connection, sql_rep_schema) + logger.info(f'Populated schema: {unique_schema_name}') + instances_inserter(connection, sql_rep_schema) logger.info(f'Inserted MitM Data into schema: {unique_schema_name}') connection.commit() - mds_bundle = mk_mitm_dataset_bundle(mitm_data.header, - DBConnectionInfo(sql_alchemy_uri=sql_alchemy_uri, - schema_name=unique_schema_name), - dataset_name, - include_default_visualizations=False) - - model = TrackedMitMDataset(uuid=uuid, dataset_name=dataset_name, schema_name=unique_schema_name, - sql_alchemy_uri=sql_alchemy_uri, mitm_header=mitm_data.header, identifier_bundle=mds_bundle.identifiers) - - with sqlmodel.Session(engine) as session: - session.add(model) - session.commit() - session.refresh(model) - - logger.info(f'Tracked uploaded MitM Dataset in application DB:\n{model}') - - return model + return AddTrackedMitMDataset(uuid=uuid, + dataset_name=dataset_name, + schema_name=unique_schema_name, + sql_alchemy_uri=sql_alchemy_uri, + mitm_header=header) diff --git a/pyproject.toml b/pyproject.toml index 57f210b..b385d94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "superset-mitm-service" -version = "0.1.1" +version = "0.1.2" description = "" authors = [{ name = "Leah Tacke genannt Unterberg", email = "l.tgu@pads.rwth-aachen.de" }] requires-python = ">=3.12,<3.14" diff --git a/schema/openapi.json b/schema/openapi.json index ce6eddd..af3d0d8 100644 --- a/schema/openapi.json +++ b/schema/openapi.json @@ -1 +1 @@ -{"openapi": "3.1.0", "info": {"title": "SupersetMitMService", "version": "0.1.0"}, "paths": {"/mitm_dataset/upload": {"post": {"tags": ["mitm_dataset"], "summary": "Upload Mitm Dataset", "operationId": "upload_mitm_dataset", "parameters": [{"name": "dataset_name", "in": "query", "required": true, "schema": {"type": "string", "title": "Dataset Name"}}, {"name": "mitm", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/MITM", "default": "MAED"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_upload_mitm_dataset_mitm_dataset_upload_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UploadMitMResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm_dataset/register": {"post": {"tags": ["mitm_dataset"], "summary": "Register Mitm Dataset", "operationId": "register_mitm_dataset", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RegisterExternalMitMDatasetRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RegisterMitMResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm_dataset/": {"get": {"tags": ["mitm_dataset"], "summary": "Get Mitm Datasets", "operationId": "get_mitm_datasets", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/TrackedMitMDataset"}, "type": "array", "title": "Response Get Mitm Datasets Mitm Dataset Get"}}}}}}, "post": {"tags": ["mitm_dataset"], "summary": "Post Mitm Dataset", "operationId": "post_mitm_dataset", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddTrackedMitMDatasetRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm_dataset/{uuid}": {"get": {"tags": ["mitm_dataset"], "summary": "Get Mitm Dataset", "operationId": "get_mitm_dataset", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TrackedMitMDataset"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["mitm_dataset"], "summary": "Delete Mitm Dataset", "operationId": "delete_mitm_dataset", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset": {"post": {"tags": ["definitions"], "summary": "Generate Mitm Dataset Bundle", "operationId": "generate_mitm_dataset_bundle", "parameters": [{"name": "dataset_name", "in": "query", "required": true, "schema": {"type": "string", "title": "Dataset Name"}}, {"name": "include_visualizations", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Visualizations"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_generate_mitm_dataset_bundle_definitions_mitm_dataset_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SupersetMitMDatasetBundle"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/import": {"post": {"tags": ["definitions"], "summary": "Generate Mitm Dataset Import", "operationId": "generate_mitm_dataset_import", "parameters": [{"name": "dataset_name", "in": "query", "required": true, "schema": {"type": "string", "title": "Dataset Name"}}, {"name": "include_visualizations", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Visualizations"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_generate_mitm_dataset_import_definitions_mitm_dataset_import_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SupersetMitMDatasetImport"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/import/zip": {"post": {"tags": ["definitions"], "summary": "Generate Mitm Dataset Import Zip", "operationId": "generate_mitm_dataset_import_zip", "parameters": [{"name": "dataset_name", "in": "query", "required": true, "schema": {"type": "string", "title": "Dataset Name"}}, {"name": "include_visualizations", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Visualizations"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_generate_mitm_dataset_import_zip_definitions_mitm_dataset_import_zip_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/zip": {}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/{uuid}/": {"get": {"tags": ["definitions"], "summary": "Generate Uploaded Mitm Dataset Bundle", "operationId": "generate_uploaded_mitm_dataset_bundle", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}, {"name": "include_visualizations", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Visualizations"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SupersetMitMDatasetBundle"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/{uuid}/import": {"get": {"tags": ["definitions"], "summary": "Generate Uploaded Mitm Dataset Import", "operationId": "generate_uploaded_mitm_dataset_import", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}, {"name": "include_visualizations", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Visualizations"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SupersetMitMDatasetImport"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/{uuid}/import/zip": {"get": {"tags": ["definitions"], "summary": "Generate Uploaded Mitm Dataset Import Zip", "operationId": "generate_uploaded_mitm_dataset_import_zip", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}, {"name": "include_visualizations", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Visualizations"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/zip": {}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/": {"get": {"summary": "Root", "operationId": "root__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/health": {"get": {"summary": "Health", "operationId": "health_health_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}}, "components": {"schemas": {"AddTrackedMitMDatasetRequest": {"properties": {"uuid": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}], "title": "Uuid"}, "dataset_name": {"type": "string", "title": "Dataset Name"}, "schema_name": {"type": "string", "title": "Schema Name"}, "sql_alchemy_uri": {"type": "string", "minLength": 1, "format": "uri", "title": "Sql Alchemy Uri"}, "mitm_header": {"$ref": "#/components/schemas/Header-Input"}}, "type": "object", "required": ["dataset_name", "schema_name", "sql_alchemy_uri", "mitm_header"], "title": "AddTrackedMitMDatasetRequest"}, "AnnotationLayer": {"properties": {"name": {"type": "string", "title": "Name"}, "value": {"type": "integer", "title": "Value"}, "annotationType": {"$ref": "#/components/schemas/AnnotationType"}, "sourceType": {"$ref": "#/components/schemas/AnnotationSource", "default": "table"}, "opacity": {"type": "string", "title": "Opacity", "default": ""}, "overrides": {"$ref": "#/components/schemas/AnnotationOverrides"}, "hideLine": {"type": "boolean", "title": "Hideline", "default": false}, "show": {"type": "boolean", "title": "Show", "default": false}, "showLabel": {"type": "boolean", "title": "Showlabel", "default": false}, "showMarkers": {"type": "boolean", "title": "Showmarkers", "default": false}, "style": {"type": "string", "title": "Style", "default": "solid"}, "width": {"type": "integer", "title": "Width", "default": 1}}, "type": "object", "required": ["name", "value", "annotationType", "overrides"], "title": "AnnotationLayer"}, "AnnotationOverrides": {"properties": {"time_range": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time Range"}}, "type": "object", "title": "AnnotationOverrides"}, "AnnotationSource": {"type": "string", "enum": ["line", "NATIVE", "table", ""], "title": "AnnotationSource"}, "AnnotationType": {"type": "string", "enum": ["EVENT", "FORMULA", "INTERVAL", "TIME_SERIES"], "title": "AnnotationType"}, "Body_generate_mitm_dataset_bundle_definitions_mitm_dataset_post": {"properties": {"mitm_header": {"$ref": "#/components/schemas/Header-Input"}, "db_conn_info": {"$ref": "#/components/schemas/SupersetDBConnectionInfo"}}, "type": "object", "required": ["mitm_header", "db_conn_info"], "title": "Body_generate_mitm_dataset_bundle_definitions_mitm_dataset_post"}, "Body_generate_mitm_dataset_import_definitions_mitm_dataset_import_post": {"properties": {"mitm_header": {"$ref": "#/components/schemas/Header-Input"}, "db_conn_info": {"$ref": "#/components/schemas/SupersetDBConnectionInfo"}}, "type": "object", "required": ["mitm_header", "db_conn_info"], "title": "Body_generate_mitm_dataset_import_definitions_mitm_dataset_import_post"}, "Body_generate_mitm_dataset_import_zip_definitions_mitm_dataset_import_zip_post": {"properties": {"mitm_header": {"$ref": "#/components/schemas/Header-Input"}, "db_conn_info": {"$ref": "#/components/schemas/SupersetDBConnectionInfo"}}, "type": "object", "required": ["mitm_header", "db_conn_info"], "title": "Body_generate_mitm_dataset_import_zip_definitions_mitm_dataset_import_zip_post"}, "Body_upload_mitm_dataset_mitm_dataset_upload_post": {"properties": {"mitm_zip": {"type": "string", "format": "binary", "title": "Mitm Zip"}}, "type": "object", "required": ["mitm_zip"], "title": "Body_upload_mitm_dataset_mitm_dataset_upload_post"}, "ChartDataResultFormat": {"type": "string", "enum": ["csv", "json", "xlsx"], "title": "ChartDataResultFormat"}, "ChartDataResultType": {"type": "string", "enum": ["columns", "full", "query", "results", "samples", "timegrains", "post_processed", "drill_detail"], "title": "ChartDataResultType"}, "ChartParams": {"properties": {"datasource": {"anyOf": [{"type": "string"}, {"$ref": "#/components/schemas/DatasourceIdentifier"}], "title": "Datasource"}, "viz_type": {"$ref": "#/components/schemas/SupersetVizType"}, "groupby": {"items": {"type": "string"}, "type": "array", "title": "Groupby"}, "adhoc_filters": {"items": {"$ref": "#/components/schemas/SupersetAdhocFilter"}, "type": "array", "title": "Adhoc Filters"}, "row_limit": {"type": "integer", "title": "Row Limit", "default": 10000}, "sort_by_metric": {"type": "boolean", "title": "Sort By Metric", "default": true}, "color_scheme": {"type": "string", "enum": ["blueToGreen", "supersetColors"], "title": "Color Scheme", "default": "supersetColors"}, "show_legend": {"type": "boolean", "title": "Show Legend", "default": true}, "legendType": {"type": "string", "title": "Legendtype", "default": "scroll"}, "legendOrientation": {"type": "string", "title": "Legendorientation", "default": "top"}, "extra_form_data": {"type": "object", "title": "Extra Form Data"}, "slice_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Slice Id"}, "dashboards": {"items": {"type": "integer"}, "type": "array", "title": "Dashboards"}}, "type": "object", "required": ["datasource", "viz_type"], "title": "ChartParams"}, "ColName": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "ColName"}, "ColumnOfDataset": {"properties": {"datasetUuid": {"type": "string", "format": "uuid", "title": "Datasetuuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "column": {"$ref": "#/components/schemas/ColName"}}, "type": "object", "required": ["datasetUuid", "column"], "title": "ColumnOfDataset"}, "CompiledVirtualView": {"properties": {"dialect": {"type": "string", "title": "Dialect"}, "compiled_sql": {"type": "string", "title": "Compiled Sql"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "column_dtypes": {"items": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}, "type": "array", "title": "Column Dtypes"}, "name": {"type": "string", "title": "Name"}, "schema_name": {"type": "string", "title": "Schema Name"}}, "type": "object", "required": ["dialect", "compiled_sql", "columns", "column_dtypes", "name", "schema_name"], "title": "CompiledVirtualView"}, "ComponentMeta": {"properties": {}, "type": "object", "title": "ComponentMeta"}, "ConceptMapping": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept": {"type": "string", "title": "Concept"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}, "kind_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Kind Col"}, "type_col": {"type": "string", "title": "Type Col"}, "identity_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Identity Columns"}, "inline_relations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Inline Relations"}, "foreign_relations": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelation"}, "type": "object", "title": "Foreign Relations"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["mitm", "concept", "base_table", "type_col"], "title": "ConceptMapping"}, "ControlValues": {"properties": {"enableEmptyFilter": {"type": "boolean", "title": "Enableemptyfilter", "default": false}, "defaultToFirstItem": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Defaulttofirstitem", "default": false}, "multiSelect": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Multiselect", "default": true}, "searchAllOptions": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Searchalloptions", "default": false}, "inverseSelection": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Inverseselection", "default": false}}, "type": "object", "title": "ControlValues"}, "DashboardComponent": {"properties": {"id": {"type": "string", "title": "Id"}, "type": {"$ref": "#/components/schemas/DashboardComponentType"}, "meta": {"anyOf": [{"$ref": "#/components/schemas/ComponentMeta"}, {"type": "null"}]}, "children": {"items": {"type": "string"}, "type": "array", "title": "Children"}}, "type": "object", "required": ["id", "type"], "title": "DashboardComponent"}, "DashboardComponentType": {"type": "string", "enum": ["CHART", "HEADER", "GRID", "ROW", "ROOT"], "title": "DashboardComponentType"}, "DashboardMetadata": {"properties": {"color_scheme": {"type": "string", "title": "Color Scheme", "default": "blueToGreen"}, "cross_filters_enabled": {"type": "boolean", "title": "Cross Filters Enabled", "default": true}, "native_filter_configuration": {"items": {"$ref": "#/components/schemas/NativeFilterConfig"}, "type": "array", "title": "Native Filter Configuration"}}, "type": "object", "title": "DashboardMetadata"}, "DatasetReference": {"properties": {"datasetUuid": {"type": "string", "format": "uuid", "title": "Datasetuuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}}, "type": "object", "required": ["datasetUuid"], "title": "DatasetReference"}, "DatasourceIdentifier": {"properties": {"id": {"type": "integer", "title": "Id", "default": -1}, "type": {"type": "string", "enum": ["table", "annotation"], "title": "Type", "default": "table"}}, "type": "object", "title": "DatasourceIdentifier"}, "ExpressionType": {"type": "string", "enum": ["SIMPLE", "SQL"], "title": "ExpressionType"}, "FilterOperator": {"type": "string", "enum": ["==", "!=", ">", "<", ">=", "<=", "LIKE", "NOT LIKE", "ILIKE", "IS NULL", "IS NOT NULL", "IN", "NOT IN", "IS TRUE", "IS FALSE", "TEMPORAL_RANGE"], "title": "FilterOperator"}, "FilterStringOperators": {"type": "string", "enum": ["EQUALS", "NOT_EQUALS", "LESS_THAN", "GREATER_THAN", "LESS_THAN_OR_EQUAL", "GREATER_THAN_OR_EQUAL", "IN", "NOT_IN", "ILIKE", "LIKE", "IS_NOT_NULL", "IS_NULL", "LATEST_PARTITION", "IS_TRUE", "IS_FALSE"], "title": "FilterStringOperators"}, "FilterType": {"type": "string", "enum": ["filter_select", "filter_timegrain"], "title": "FilterType"}, "ForeignRelation": {"properties": {"fk_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Fk Columns"}, "referred_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Referred Table"}}, "type": "object", "required": ["fk_columns", "referred_table"], "title": "ForeignRelation"}, "FormData": {"properties": {}, "type": "object", "title": "FormData"}, "GenericDataType": {"type": "integer", "enum": [0, 1, 2, 3], "title": "GenericDataType"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "Header-Input": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "header_entries": {"items": {"$ref": "#/components/schemas/HeaderEntry"}, "type": "array", "title": "Header Entries"}}, "type": "object", "required": ["mitm"], "title": "Header"}, "Header-Output": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "header_entries": {"items": {"$ref": "#/components/schemas/HeaderEntry"}, "type": "array", "title": "Header Entries"}}, "type": "object", "required": ["mitm"], "title": "Header"}, "HeaderEntry": {"properties": {"concept": {"type": "string", "title": "Concept"}, "kind": {"type": "string", "title": "Kind"}, "type_name": {"type": "string", "title": "Type Name"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["concept", "kind", "type_name", "attributes", "attribute_dtypes"], "title": "HeaderEntry"}, "MITM": {"type": "string", "enum": ["MAED", "OCEL2"], "title": "MITM"}, "MITMDataType": {"type": "string", "enum": ["text", "json", "integer", "numeric", "boolean", "datetime", "unknown", "infer"], "title": "MITMDataType"}, "MetadataType": {"type": "string", "enum": ["Database", "SqlaTable", "Slice", "Chart", "Dashboard", "Asset", "MitMDataset"], "title": "MetadataType"}, "NativeFilterConfig": {"properties": {"id": {"type": "string", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "targets": {"items": {"anyOf": [{"$ref": "#/components/schemas/DatasetReference"}, {"$ref": "#/components/schemas/ColumnOfDataset"}]}, "type": "array", "title": "Targets"}, "controlValues": {"$ref": "#/components/schemas/ControlValues"}, "filterType": {"$ref": "#/components/schemas/FilterType", "default": "filter_select"}, "type": {"type": "string", "title": "Type", "default": "NATIVE_FILTER"}}, "type": "object", "required": ["id", "name"], "title": "NativeFilterConfig"}, "QueryContext": {"properties": {"datasource": {"$ref": "#/components/schemas/DatasourceIdentifier"}, "queries": {"items": {"$ref": "#/components/schemas/QueryObject"}, "type": "array", "title": "Queries"}, "form_data": {"anyOf": [{"$ref": "#/components/schemas/FormData"}, {"type": "null"}]}, "result_type": {"$ref": "#/components/schemas/ChartDataResultType", "default": "full"}, "result_format": {"$ref": "#/components/schemas/ChartDataResultFormat", "default": "json"}, "force": {"type": "boolean", "title": "Force", "default": false}, "custom_cache_timeout": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Custom Cache Timeout"}}, "type": "object", "required": ["datasource"], "title": "QueryContext"}, "QueryObject": {"properties": {"annotation_layers": {"items": {"$ref": "#/components/schemas/AnnotationLayer"}, "type": "array", "title": "Annotation Layers"}, "applied_time_extras": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Applied Time Extras"}, "columns": {"items": {"anyOf": [{"type": "string"}, {"$ref": "#/components/schemas/SupersetAdhocColumn"}]}, "type": "array", "title": "Columns"}, "datasource": {"anyOf": [{"$ref": "#/components/schemas/DatasourceIdentifier"}, {"type": "null"}]}, "extras": {"$ref": "#/components/schemas/QueryObjectExtras"}, "filters": {"items": {"$ref": "#/components/schemas/QueryObjectFilterClause"}, "type": "array", "title": "Filters"}, "metrics": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetAdhocMetric"}, "type": "array"}, {"type": "null"}], "title": "Metrics"}, "granularity": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Granularity"}, "from_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "From Dttm"}, "to_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "To Dttm"}, "inner_from_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "Inner From Dttm"}, "inner_to_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "Inner To Dttm"}, "is_rowcount": {"type": "boolean", "title": "Is Rowcount", "default": false}, "is_timeseries": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Timeseries"}, "order_desc": {"type": "boolean", "title": "Order Desc", "default": true}, "orderby": {"items": {"prefixItems": [{"anyOf": [{"$ref": "#/components/schemas/SupersetAdhocMetric"}, {"type": "string"}]}, {"type": "boolean"}], "type": "array", "maxItems": 2, "minItems": 2}, "type": "array", "title": "Orderby"}, "post_processing": {"items": {"anyOf": [{"$ref": "#/components/schemas/SupersetPostProcessing"}, {"type": "object"}]}, "type": "array", "title": "Post Processing"}, "result_type": {"anyOf": [{"$ref": "#/components/schemas/ChartDataResultType"}, {"type": "null"}]}, "row_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Row Limit"}, "row_offset": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Row Offset"}, "series_columns": {"items": {"type": "string"}, "type": "array", "title": "Series Columns"}, "series_limit": {"type": "integer", "title": "Series Limit", "default": 0}, "series_limit_metric": {"anyOf": [{"$ref": "#/components/schemas/SupersetAdhocMetric"}, {"type": "null"}]}, "time_offsets": {"items": {"type": "string"}, "type": "array", "title": "Time Offsets"}, "time_shift": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time Shift"}, "time_range": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time Range"}, "url_params": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Url Params"}}, "type": "object", "title": "QueryObject"}, "QueryObjectExtras": {"properties": {"having": {"type": "string", "title": "Having", "default": ""}, "where": {"type": "string", "title": "Where", "default": ""}, "time_grain_sqla": {"anyOf": [{"$ref": "#/components/schemas/TimeGrain"}, {"type": "null"}]}}, "type": "object", "title": "QueryObjectExtras"}, "QueryObjectFilterClause": {"properties": {"col": {"type": "string", "title": "Col"}, "op": {"$ref": "#/components/schemas/FilterOperator"}, "val": {"anyOf": [{"type": "boolean"}, {"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"items": {"anyOf": [{"type": "boolean"}, {"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}, "type": "array"}, {"prefixItems": [{"anyOf": [{"type": "boolean"}, {"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}], "type": "array", "maxItems": 1, "minItems": 1}, {"type": "null"}], "title": "Val"}, "grain": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Grain"}, "isExtra": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Isextra"}}, "type": "object", "required": ["col", "op"], "title": "QueryObjectFilterClause"}, "RegisterExternalMitMDatasetRequest": {"properties": {"dataset_name": {"type": "string", "title": "Dataset Name"}, "sql_alchemy_uri": {"type": "string", "minLength": 1, "format": "uri", "title": "Sql Alchemy Uri"}, "mitm": {"$ref": "#/components/schemas/MITM"}, "cvvs": {"items": {"$ref": "#/components/schemas/CompiledVirtualView"}, "type": "array", "title": "Cvvs"}, "mappings": {"items": {"$ref": "#/components/schemas/ConceptMapping"}, "type": "array", "title": "Mappings"}}, "type": "object", "required": ["dataset_name", "sql_alchemy_uri", "mitm", "cvvs", "mappings"], "title": "RegisterExternalMitMDatasetRequest"}, "RegisterMitMResponse": {"properties": {"status": {"type": "string", "enum": ["success", "failure"], "title": "Status"}, "tracked_mitm_dataset": {"anyOf": [{"$ref": "#/components/schemas/TrackedMitMDataset"}, {"type": "null"}]}, "msg": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Msg"}}, "type": "object", "required": ["status"], "title": "RegisterMitMResponse"}, "RelatedDashboard": {"properties": {"dashboard_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Dashboard Id"}, "dashboard_uuid": {"type": "string", "format": "uuid", "title": "Dashboard Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}}, "type": "object", "required": ["dashboard_uuid"], "title": "RelatedDashboard"}, "RelatedSlice": {"properties": {"slice_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Slice Id"}, "slice_uuid": {"type": "string", "format": "uuid", "title": "Slice Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}}, "type": "object", "required": ["slice_uuid"], "title": "RelatedSlice"}, "RelatedTable": {"properties": {"table_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Table Id"}, "table_uuid": {"type": "string", "format": "uuid", "title": "Table Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}}, "type": "object", "required": ["table_uuid"], "title": "RelatedTable"}, "SourceDBType": {"type": "string", "enum": ["original", "working", "virtual"], "title": "SourceDBType"}, "SupersetAdhocColumn": {"properties": {"label": {"type": "string", "title": "Label"}, "sqlExpression": {"type": "string", "title": "Sqlexpression"}, "columnType": {"type": "string", "title": "Columntype", "default": "BASE_AXIS"}, "expressionType": {"type": "string", "title": "Expressiontype", "default": "SQL"}, "timeGrain": {"anyOf": [{"$ref": "#/components/schemas/TimeGrain"}, {"type": "null"}]}}, "type": "object", "required": ["label", "sqlExpression"], "title": "SupersetAdhocColumn"}, "SupersetAdhocFilter": {"properties": {"clause": {"type": "string", "title": "Clause", "default": "WHERE"}, "subject": {"type": "string", "title": "Subject"}, "operator": {"$ref": "#/components/schemas/FilterOperator"}, "operatorId": {"anyOf": [{"$ref": "#/components/schemas/FilterStringOperators"}, {"type": "null"}]}, "comparator": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Comparator", "default": "No filter"}, "expressionType": {"$ref": "#/components/schemas/ExpressionType", "default": "SIMPLE"}, "isExtra": {"type": "boolean", "title": "Isextra", "default": false}, "isNew": {"type": "boolean", "title": "Isnew", "default": false}, "sqlExpression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sqlexpression"}}, "type": "object", "required": ["subject", "operator"], "title": "SupersetAdhocFilter"}, "SupersetAdhocMetric": {"properties": {"label": {"type": "string", "title": "Label"}, "column": {"$ref": "#/components/schemas/SupersetColumn"}, "expressionType": {"$ref": "#/components/schemas/ExpressionType", "default": "SIMPLE"}, "aggregate": {"$ref": "#/components/schemas/SupersetAggregate", "default": "COUNT"}, "sqlExpression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sqlexpression"}, "datasourceWarning": {"type": "boolean", "title": "Datasourcewarning", "default": false}, "hasCustomLabel": {"type": "boolean", "title": "Hascustomlabel", "default": false}, "optionName": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Optionname"}}, "type": "object", "required": ["label", "column"], "title": "SupersetAdhocMetric"}, "SupersetAggregate": {"type": "string", "enum": ["COUNT", "SUM", "MIN", "MAX", "AVG"], "title": "SupersetAggregate"}, "SupersetAssetsImport": {"properties": {"databases": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDatabaseDef"}, "type": "array"}, {"type": "null"}], "title": "Databases"}, "datasets": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDatasetDef"}, "type": "array"}, {"type": "null"}], "title": "Datasets"}, "charts": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetChartDef"}, "type": "array"}, {"type": "null"}], "title": "Charts"}, "dashboards": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDashboardDef"}, "type": "array"}, {"type": "null"}], "title": "Dashboards"}, "metadata": {"$ref": "#/components/schemas/SupersetMetadataDef"}}, "type": "object", "title": "SupersetAssetsImport"}, "SupersetChartDef": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "slice_name": {"type": "string", "title": "Slice Name"}, "viz_type": {"$ref": "#/components/schemas/SupersetVizType"}, "dataset_uuid": {"type": "string", "format": "uuid", "title": "Dataset Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "certified_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certified By"}, "certification_details": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certification Details"}, "params": {"anyOf": [{"$ref": "#/components/schemas/ChartParams"}, {"type": "null"}]}, "query_context": {"anyOf": [{"$ref": "#/components/schemas/QueryContext"}, {"type": "null"}]}, "cache_timeout": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Cache Timeout"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}, "is_managed_externally": {"type": "boolean", "title": "Is Managed Externally", "default": false}, "external_url": {"anyOf": [{"type": "string", "minLength": 1, "format": "uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "External Url"}}, "type": "object", "required": ["uuid", "slice_name", "viz_type", "dataset_uuid"], "title": "SupersetChartDef"}, "SupersetColumn": {"properties": {"column_name": {"type": "string", "title": "Column Name"}, "verbose_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Verbose Name"}, "id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}, "is_dttm": {"type": "boolean", "title": "Is Dttm", "default": false}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "type": {"type": "string", "title": "Type", "default": "VARCHAR"}, "type_generic": {"$ref": "#/components/schemas/GenericDataType", "default": 1}, "advanced_data_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Advanced Data Type"}, "groupby": {"type": "boolean", "title": "Groupby", "default": true}, "filterable": {"type": "boolean", "title": "Filterable", "default": true}, "expression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expression"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "python_date_format": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Python Date Format"}, "extra": {"type": "object", "title": "Extra"}}, "type": "object", "required": ["column_name"], "title": "SupersetColumn"}, "SupersetDBConnectionInfo": {"properties": {"sql_alchemy_uri": {"type": "string", "minLength": 1, "format": "uri", "title": "Sql Alchemy Uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, "explicit_db_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Explicit Db Name"}, "schema_name": {"type": "string", "title": "Schema Name", "default": "main"}}, "type": "object", "required": ["sql_alchemy_uri"], "title": "SupersetDBConnectionInfo"}, "SupersetDashboardDef": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "dashboard_title": {"type": "string", "title": "Dashboard Title"}, "position": {"additionalProperties": {"anyOf": [{"type": "string"}, {"$ref": "#/components/schemas/DashboardComponent"}]}, "type": "object", "title": "Position"}, "metadata": {"$ref": "#/components/schemas/DashboardMetadata"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "css": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Css"}, "slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slug"}, "is_managed_externally": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Managed Externally", "default": false}, "external_url": {"anyOf": [{"type": "string", "minLength": 1, "format": "uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "External Url"}, "certified_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certified By"}, "certification_details": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certification Details"}, "published": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Published", "default": false}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}}, "type": "object", "required": ["uuid", "dashboard_title", "position", "metadata"], "title": "SupersetDashboardDef"}, "SupersetDatabaseDef": {"properties": {"database_name": {"type": "string", "title": "Database Name"}, "sqlalchemy_uri": {"type": "string", "minLength": 1, "format": "uri", "title": "Sqlalchemy Uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "cache_timeout": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cache Timeout"}, "expose_in_sqllab": {"type": "boolean", "title": "Expose In Sqllab", "default": true}, "allow_run_async": {"type": "boolean", "title": "Allow Run Async", "default": false}, "allow_ctas": {"type": "boolean", "title": "Allow Ctas", "default": false}, "allow_cvas": {"type": "boolean", "title": "Allow Cvas", "default": false}, "allow_dml": {"type": "boolean", "title": "Allow Dml", "default": false}, "allow_file_upload": {"type": "boolean", "title": "Allow File Upload", "default": false}, "extra": {"type": "object", "title": "Extra"}, "impersonate_user": {"type": "boolean", "title": "Impersonate User", "default": false}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}, "ssh_tunnel": {"type": "null", "title": "Ssh Tunnel"}}, "type": "object", "required": ["database_name", "sqlalchemy_uri", "uuid"], "title": "SupersetDatabaseDef"}, "SupersetDatasetDef": {"properties": {"table_name": {"type": "string", "title": "Table Name"}, "schema": {"type": "string", "title": "Schema"}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "database_uuid": {"type": "string", "format": "uuid", "title": "Database Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "main_dttm_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Main Dttm Col"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "default_endpoint": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Endpoint"}, "offset": {"type": "integer", "title": "Offset", "default": 0}, "cache_timeout": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cache Timeout"}, "catalog": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Catalog"}, "sql": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql"}, "params": {"title": "Params"}, "template_params": {"title": "Template Params"}, "filter_select_enabled": {"type": "boolean", "title": "Filter Select Enabled", "default": true}, "fetch_values_predicate": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fetch Values Predicate"}, "extra": {"type": "object", "title": "Extra"}, "normalize_columns": {"type": "boolean", "title": "Normalize Columns", "default": false}, "always_filter_main_dttm": {"type": "boolean", "title": "Always Filter Main Dttm", "default": false}, "metrics": {"items": {"$ref": "#/components/schemas/SupersetMetric"}, "type": "array", "title": "Metrics"}, "columns": {"items": {"$ref": "#/components/schemas/SupersetColumn"}, "type": "array", "title": "Columns"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}}, "type": "object", "required": ["table_name", "schema", "uuid", "database_uuid"], "title": "SupersetDatasetDef"}, "SupersetDatasourceBundle": {"properties": {"database": {"$ref": "#/components/schemas/SupersetDatabaseDef"}, "datasets": {"items": {"$ref": "#/components/schemas/SupersetDatasetDef"}, "type": "array", "title": "Datasets"}}, "type": "object", "required": ["database"], "title": "SupersetDatasourceBundle"}, "SupersetMetadataDef": {"properties": {"type": {"$ref": "#/components/schemas/MetadataType"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}, "timestamp": {"type": "string", "format": "date-time", "title": "Timestamp", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}}, "type": "object", "required": ["type"], "title": "SupersetMetadataDef"}, "SupersetMetric": {"properties": {"metric_name": {"type": "string", "title": "Metric Name"}, "verbose_name": {"type": "string", "title": "Verbose Name"}, "expression": {"type": "string", "title": "Expression"}, "metric_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Metric Type"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "d3format": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "D3Format"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "extra": {"type": "object", "title": "Extra"}, "warning_text": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Warning Text"}}, "type": "object", "required": ["metric_name", "verbose_name", "expression"], "title": "SupersetMetric"}, "SupersetMitMDatasetBundle": {"properties": {"mitm_dataset": {"$ref": "#/components/schemas/SupersetMitMDatasetDef"}, "datasource_bundle": {"$ref": "#/components/schemas/SupersetDatasourceBundle"}, "visualization_bundle": {"$ref": "#/components/schemas/SupersetVisualizationBundle"}}, "type": "object", "required": ["mitm_dataset", "datasource_bundle"], "title": "SupersetMitMDatasetBundle"}, "SupersetMitMDatasetDef": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "dataset_name": {"type": "string", "title": "Dataset Name"}, "mitm": {"$ref": "#/components/schemas/MITM"}, "mitm_header": {"anyOf": [{"$ref": "#/components/schemas/Header-Output"}, {"type": "null"}]}, "database_uuid": {"type": "string", "format": "uuid", "title": "Database Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "tables": {"anyOf": [{"items": {"$ref": "#/components/schemas/RelatedTable"}, "type": "array"}, {"type": "null"}], "title": "Tables"}, "slices": {"anyOf": [{"items": {"$ref": "#/components/schemas/RelatedSlice"}, "type": "array"}, {"type": "null"}], "title": "Slices"}, "dashboards": {"anyOf": [{"items": {"$ref": "#/components/schemas/RelatedDashboard"}, "type": "array"}, {"type": "null"}], "title": "Dashboards"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}}, "type": "object", "required": ["uuid", "dataset_name", "mitm", "database_uuid"], "title": "SupersetMitMDatasetDef"}, "SupersetMitMDatasetImport": {"properties": {"mitm_datasets": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetMitMDatasetDef"}, "type": "array"}, {"type": "null"}], "title": "Mitm Datasets"}, "base_assets": {"anyOf": [{"$ref": "#/components/schemas/SupersetAssetsImport"}, {"type": "null"}]}, "metadata": {"$ref": "#/components/schemas/SupersetMetadataDef"}}, "type": "object", "required": ["mitm_datasets", "base_assets"], "title": "SupersetMitMDatasetImport"}, "SupersetPostProcessing": {"properties": {"operation": {"type": "string", "title": "Operation", "readOnly": true}}, "type": "object", "required": ["operation"], "title": "SupersetPostProcessing"}, "SupersetVisualizationBundle": {"properties": {"charts": {"items": {"$ref": "#/components/schemas/SupersetChartDef"}, "type": "array", "title": "Charts"}, "dashboards": {"items": {"$ref": "#/components/schemas/SupersetDashboardDef"}, "type": "array", "title": "Dashboards"}}, "type": "object", "title": "SupersetVisualizationBundle"}, "SupersetVizType": {"type": "string", "enum": ["pie", "echarts_timeseries_bar", "echarts_timeseries_line"], "title": "SupersetVizType"}, "TableIdentifier": {"properties": {"source": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}, "schema": {"type": "string", "title": "Schema", "default": "main"}, "name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "TableIdentifier"}, "TimeGrain": {"type": "string", "enum": ["PT1S", "PT5S", "PT30S", "PT1M", "PT5M", "PT10M", "PT15M", "PT30M", "PT0.5H", "PT1H", "PT6H", "P1D", "P1W", "1969-12-28T00:00:00Z/P1W", "1969-12-29T00:00:00Z/P1W", "P1W/1970-01-03T00:00:00Z", "P1W/1970-01-04T00:00:00Z", "P1M", "P3M", "P0.25Y", "P1Y"], "title": "TimeGrain"}, "TrackedMitMDataset": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid"}, "dataset_name": {"type": "string", "title": "Dataset Name"}, "schema_name": {"type": "string", "title": "Schema Name"}, "is_local": {"type": "boolean", "title": "Is Local", "default": true}, "sql_alchemy_uri": {"type": "string", "minLength": 1, "format": "uri", "title": "Sql Alchemy Uri"}, "mitm_header": {"$ref": "#/components/schemas/Header-Output"}}, "type": "object", "required": ["dataset_name", "schema_name", "sql_alchemy_uri", "mitm_header"], "title": "TrackedMitMDataset"}, "UploadMitMResponse": {"properties": {"status": {"type": "string", "enum": ["success", "failure"], "title": "Status"}, "tracked_mitm_dataset": {"anyOf": [{"$ref": "#/components/schemas/TrackedMitMDataset"}, {"type": "null"}]}, "msg": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Msg"}}, "type": "object", "required": ["status"], "title": "UploadMitMResponse"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "WrappedMITMDataType": {"properties": {"mitm": {"$ref": "#/components/schemas/MITMDataType"}}, "type": "object", "required": ["mitm"], "title": "WrappedMITMDataType"}}}} \ No newline at end of file +{"openapi": "3.1.0", "info": {"title": "SupersetMitMService", "version": "0.1.0"}, "paths": {"/mitm_dataset/upload": {"post": {"tags": ["mitm_dataset"], "summary": "Upload Mitm Dataset", "operationId": "upload_mitm_dataset", "parameters": [{"name": "dataset_name", "in": "query", "required": true, "schema": {"type": "string", "title": "Dataset Name"}}, {"name": "mitm", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/MITM", "default": "MAED"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_upload_mitm_dataset_mitm_dataset_upload_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UploadMitMResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm_dataset/register": {"post": {"tags": ["mitm_dataset"], "summary": "Register Mitm Dataset", "operationId": "register_mitm_dataset", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RegisterExternalMitMDatasetRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RegisterMitMResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm_dataset/": {"get": {"tags": ["mitm_dataset"], "summary": "Get Mitm Datasets", "operationId": "get_mitm_datasets", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ListTrackedMitMDataset"}, "type": "array", "title": "Response Get Mitm Datasets Mitm Dataset Get"}}}}}}, "post": {"tags": ["mitm_dataset"], "summary": "Post Mitm Dataset", "operationId": "post_mitm_dataset", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddTrackedMitMDatasetRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TrackedMitMDataset"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm_dataset/{uuid}": {"get": {"tags": ["mitm_dataset"], "summary": "Get Mitm Dataset", "operationId": "get_mitm_dataset", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TrackedMitMDataset"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["mitm_dataset"], "summary": "Delete Mitm Dataset", "operationId": "delete_mitm_dataset", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm_dataset/export/{uuid}": {"post": {"tags": ["mitm_dataset"], "summary": "Export Mitm Dataset", "operationId": "export_mitm_dataset", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/zip": {}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset": {"post": {"tags": ["definitions"], "summary": "Generate Mitm Dataset Bundle", "operationId": "generate_mitm_dataset_bundle", "parameters": [{"name": "include_visualizations", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Visualizations"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GenerateIndependentMitMDatasetDefinitionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MitMDatasetBundleResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/import": {"post": {"tags": ["definitions"], "summary": "Generate Mitm Dataset Import", "operationId": "generate_mitm_dataset_import", "parameters": [{"name": "include_visualizations", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Visualizations"}}, {"name": "override_metadata_type", "in": "query", "required": false, "schema": {"anyOf": [{"$ref": "#/components/schemas/MetadataType"}, {"type": "null"}], "title": "Override Metadata Type"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GenerateIndependentMitMDatasetDefinitionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MitMDatasetImportResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/import/zip": {"post": {"tags": ["definitions"], "summary": "Generate Mitm Dataset Import Zip", "operationId": "generate_mitm_dataset_import_zip", "parameters": [{"name": "include_visualizations", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Visualizations"}}, {"name": "override_metadata_type", "in": "query", "required": false, "schema": {"anyOf": [{"$ref": "#/components/schemas/MetadataType"}, {"type": "null"}], "title": "Override Metadata Type"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GenerateIndependentMitMDatasetDefinitionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/zip": {}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/{uuid}": {"get": {"tags": ["definitions"], "summary": "Generate Tracked Mitm Dataset Bundle", "operationId": "generate_tracked_mitm_dataset_bundle", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}, {"name": "include_visualizations", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Visualizations"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MitMDatasetBundleResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/{uuid}/import": {"get": {"tags": ["definitions"], "summary": "Generate Tracked Mitm Dataset Import", "operationId": "generate_tracked_mitm_dataset_import", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}, {"name": "include_visualizations", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Visualizations"}}, {"name": "override_metadata_type", "in": "query", "required": false, "schema": {"anyOf": [{"$ref": "#/components/schemas/MetadataType"}, {"type": "null"}], "title": "Override Metadata Type"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MitMDatasetImportResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/{uuid}/import/zip": {"get": {"tags": ["definitions"], "summary": "Generate Tracked Mitm Dataset Import Zip", "operationId": "generate_tracked_mitm_dataset_import_zip", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}, {"name": "include_visualizations", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Visualizations"}}, {"name": "override_metadata_type", "in": "query", "required": false, "schema": {"anyOf": [{"$ref": "#/components/schemas/MetadataType"}, {"type": "null"}], "title": "Override Metadata Type"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/zip": {}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/viz/{uuid}": {"post": {"tags": ["definitions"], "summary": "Generate Visualizations For Tracked Dataset", "operationId": "generate_visualizations_for_tracked_dataset", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GenerateVisualizationsRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MitMDatasetBundleResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/viz/{uuid}/import": {"post": {"tags": ["definitions"], "summary": "Generate Visualizations Import For Tracked Dataset", "operationId": "generate_visualizations_import_for_tracked_dataset", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}, {"name": "as_assets", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "As Assets"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GenerateVisualizationsRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VisualizationImportResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_dataset/viz/{uuid}/import/zip": {"post": {"tags": ["definitions"], "summary": "Generate Visualizations Import Zip For Tracked Dataset", "operationId": "generate_visualizations_import_zip_for_tracked_dataset", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}, {"name": "as_assets", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "As Assets"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GenerateVisualizationsRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/zip": {}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/db-meta/{uuid}": {"get": {"tags": ["data"], "summary": "Get Db Meta", "operationId": "get_db_meta", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/db-probe/{uuid}": {"get": {"tags": ["data"], "summary": "Get Db Probe", "operationId": "get_db_probe", "parameters": [{"name": "uuid", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Uuid"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBProbeResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/admin/clear-db": {"post": {"tags": ["admin"], "summary": "Clear Db", "description": "Clear the database.", "operationId": "clear_db", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClearDBResponse"}}}}}}}, "/": {"get": {"summary": "Root", "operationId": "root__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/health": {"get": {"summary": "Health", "operationId": "health_health_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}}, "components": {"schemas": {"AddTrackedMitMDatasetRequest": {"properties": {"uuid": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}], "title": "Uuid"}, "dataset_name": {"type": "string", "title": "Dataset Name"}, "schema_name": {"type": "string", "title": "Schema Name"}, "sql_alchemy_uri": {"type": "string", "minLength": 1, "format": "uri", "title": "Sql Alchemy Uri"}, "mitm_header": {"$ref": "#/components/schemas/Header-Input"}}, "type": "object", "required": ["dataset_name", "schema_name", "sql_alchemy_uri", "mitm_header"], "title": "AddTrackedMitMDatasetRequest"}, "AnnotationLayer": {"properties": {"name": {"type": "string", "title": "Name"}, "value": {"type": "integer", "title": "Value"}, "annotationType": {"$ref": "#/components/schemas/AnnotationType"}, "sourceType": {"$ref": "#/components/schemas/AnnotationSource", "default": "table"}, "opacity": {"type": "string", "title": "Opacity", "default": ""}, "overrides": {"$ref": "#/components/schemas/AnnotationOverrides"}, "hideLine": {"type": "boolean", "title": "Hideline", "default": false}, "show": {"type": "boolean", "title": "Show", "default": false}, "showLabel": {"type": "boolean", "title": "Showlabel", "default": false}, "showMarkers": {"type": "boolean", "title": "Showmarkers", "default": false}, "style": {"type": "string", "title": "Style", "default": "solid"}, "width": {"type": "integer", "title": "Width", "default": 1}}, "type": "object", "required": ["name", "value", "annotationType", "overrides"], "title": "AnnotationLayer"}, "AnnotationOverrides": {"properties": {"time_range": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time Range"}}, "type": "object", "title": "AnnotationOverrides"}, "AnnotationSource": {"type": "string", "enum": ["line", "NATIVE", "table", ""], "title": "AnnotationSource"}, "AnnotationType": {"type": "string", "enum": ["EVENT", "FORMULA", "INTERVAL", "TIME_SERIES"], "title": "AnnotationType"}, "Body_upload_mitm_dataset_mitm_dataset_upload_post": {"properties": {"mitm_zip": {"type": "string", "format": "binary", "title": "Mitm Zip"}}, "type": "object", "required": ["mitm_zip"], "title": "Body_upload_mitm_dataset_mitm_dataset_upload_post"}, "CategoricalSummaryStatistics": {"properties": {"count": {"type": "integer", "minimum": 0.0, "title": "Count"}, "unique": {"type": "integer", "minimum": 0.0, "title": "Unique"}, "top": {"type": "string", "title": "Top"}, "freq": {"type": "integer", "minimum": 0.0, "title": "Freq"}}, "type": "object", "required": ["count", "unique", "top", "freq"], "title": "CategoricalSummaryStatistics"}, "ChartDataResultFormat": {"type": "string", "enum": ["csv", "json", "xlsx"], "title": "ChartDataResultFormat"}, "ChartDataResultType": {"type": "string", "enum": ["columns", "full", "query", "results", "samples", "timegrains", "post_processed", "drill_detail"], "title": "ChartDataResultType"}, "ChartDatasource": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "table_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Table Name"}, "type": {"type": "string", "enum": ["table", "annotation"], "title": "Type", "default": "table"}}, "type": "object", "title": "ChartDatasource"}, "ChartIdentifier": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "slice_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slice Name"}}, "type": "object", "title": "ChartIdentifier"}, "ChartParams": {"properties": {"datasource": {"anyOf": [{"type": "string"}, {"$ref": "#/components/schemas/DatasetIdentifier"}], "title": "Datasource"}, "viz_type": {"$ref": "#/components/schemas/SupersetVizType"}, "groupby": {"items": {"type": "string"}, "type": "array", "title": "Groupby"}, "adhoc_filters": {"items": {"$ref": "#/components/schemas/SupersetAdhocFilter"}, "type": "array", "title": "Adhoc Filters"}, "row_limit": {"type": "integer", "title": "Row Limit", "default": 10000}, "sort_by_metric": {"type": "boolean", "title": "Sort By Metric", "default": true}, "color_scheme": {"type": "string", "enum": ["blueToGreen", "supersetColors"], "title": "Color Scheme", "default": "supersetColors"}, "show_legend": {"type": "boolean", "title": "Show Legend", "default": true}, "legendType": {"type": "string", "title": "Legendtype", "default": "scroll"}, "legendOrientation": {"type": "string", "title": "Legendorientation", "default": "top"}, "extra_form_data": {"additionalProperties": true, "type": "object", "title": "Extra Form Data"}, "slice_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Slice Id"}, "dashboards": {"items": {"type": "integer"}, "type": "array", "title": "Dashboards"}}, "type": "object", "required": ["datasource", "viz_type"], "title": "ChartParams"}, "ClearDBResponse": {"properties": {"dropped_mitm_datasets": {"anyOf": [{"items": {"$ref": "#/components/schemas/ListTrackedMitMDataset"}, "type": "array"}, {"type": "null"}], "title": "Dropped Mitm Datasets"}, "dropped_schemas": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Dropped Schemas"}}, "type": "object", "title": "ClearDBResponse", "description": "Response model for clearing the database."}, "ColName": {"properties": {"name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "ColName"}, "ColumnOfDataset": {"properties": {"datasetUuid": {"type": "string", "format": "uuid", "title": "Datasetuuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "column": {"$ref": "#/components/schemas/ColName"}}, "type": "object", "required": ["datasetUuid", "column"], "title": "ColumnOfDataset"}, "ColumnProperties": {"properties": {"nullable": {"type": "boolean", "title": "Nullable"}, "unique": {"type": "boolean", "title": "Unique"}, "part_of_pk": {"type": "boolean", "title": "Part Of Pk"}, "part_of_fk": {"type": "boolean", "title": "Part Of Fk"}, "part_of_index": {"type": "boolean", "title": "Part Of Index"}, "mitm_data_type": {"$ref": "#/components/schemas/MITMDataType"}}, "type": "object", "required": ["nullable", "unique", "part_of_pk", "part_of_fk", "part_of_index", "mitm_data_type"], "title": "ColumnProperties"}, "CompiledVirtualView": {"properties": {"dialect": {"type": "string", "title": "Dialect"}, "compiled_sql": {"type": "string", "title": "Compiled Sql"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "column_dtypes": {"items": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}, "type": "array", "title": "Column Dtypes"}, "name": {"type": "string", "title": "Name"}, "schema_name": {"type": "string", "title": "Schema Name"}}, "type": "object", "required": ["dialect", "compiled_sql", "columns", "column_dtypes", "name", "schema_name"], "title": "CompiledVirtualView"}, "ComponentMeta": {"properties": {}, "type": "object", "title": "ComponentMeta"}, "ConceptMapping": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept": {"type": "string", "title": "Concept"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}, "kind_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Kind Col"}, "type_col": {"type": "string", "title": "Type Col"}, "identity_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Identity Columns"}, "inline_relations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Inline Relations"}, "foreign_relations": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelation"}, "type": "object", "title": "Foreign Relations"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["mitm", "concept", "base_table", "type_col"], "title": "ConceptMapping"}, "ControlValues": {"properties": {"enableEmptyFilter": {"type": "boolean", "title": "Enableemptyfilter", "default": false}, "defaultToFirstItem": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Defaulttofirstitem", "default": false}, "multiSelect": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Multiselect", "default": true}, "searchAllOptions": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Searchalloptions", "default": false}, "inverseSelection": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Inverseselection", "default": false}}, "type": "object", "title": "ControlValues"}, "DBConnectionInfo": {"properties": {"sql_alchemy_uri": {"type": "string", "minLength": 1, "format": "uri", "title": "Sql Alchemy Uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, "explicit_db_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Explicit Db Name"}, "schema_name": {"type": "string", "title": "Schema Name", "default": "main"}, "catalog": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Catalog"}}, "type": "object", "required": ["sql_alchemy_uri"], "title": "DBConnectionInfo"}, "DBMetaInfoBase": {"properties": {"db_structure": {"additionalProperties": {"additionalProperties": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "type": "object"}, "type": "object", "title": "Db Structure"}, "tables": {"additionalProperties": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "type": "object", "title": "Tables", "readOnly": true}}, "type": "object", "required": ["db_structure", "tables"], "title": "DBMetaInfoBase"}, "DBMetaResponse": {"properties": {"db_meta": {"anyOf": [{"$ref": "#/components/schemas/DBMetaInfoBase"}, {"type": "null"}]}}, "type": "object", "title": "DBMetaResponse"}, "DBProbeMinimal": {"properties": {"table_probes": {"additionalProperties": {"$ref": "#/components/schemas/TableProbeMinimal"}, "type": "object", "title": "Table Probes"}}, "type": "object", "title": "DBProbeMinimal"}, "DBProbeResponse": {"properties": {"db_probe": {"anyOf": [{"$ref": "#/components/schemas/DBProbeMinimal"}, {"type": "null"}]}}, "type": "object", "title": "DBProbeResponse"}, "DashboardComponent": {"properties": {"id": {"type": "string", "title": "Id"}, "type": {"$ref": "#/components/schemas/DashboardComponentType"}, "meta": {"anyOf": [{"$ref": "#/components/schemas/ComponentMeta"}, {"type": "null"}]}, "children": {"items": {"type": "string"}, "type": "array", "title": "Children"}}, "type": "object", "required": ["id", "type"], "title": "DashboardComponent"}, "DashboardComponentType": {"type": "string", "enum": ["CHART", "HEADER", "GRID", "ROW", "ROOT"], "title": "DashboardComponentType"}, "DashboardIdentifier": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "dashboard_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dashboard Title"}}, "type": "object", "title": "DashboardIdentifier"}, "DashboardMetadata": {"properties": {"color_scheme": {"type": "string", "title": "Color Scheme", "default": "blueToGreen"}, "cross_filters_enabled": {"type": "boolean", "title": "Cross Filters Enabled", "default": true}, "native_filter_configuration": {"items": {"$ref": "#/components/schemas/NativeFilterConfig"}, "type": "array", "title": "Native Filter Configuration"}}, "type": "object", "title": "DashboardMetadata"}, "DatabaseIdentifier": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "database_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Database Name"}}, "type": "object", "title": "DatabaseIdentifier"}, "DatasetIdentifier": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "table_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Table Name"}}, "type": "object", "title": "DatasetIdentifier"}, "DatasetReference": {"properties": {"datasetUuid": {"type": "string", "format": "uuid", "title": "Datasetuuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}}, "type": "object", "required": ["datasetUuid"], "title": "DatasetReference"}, "DatetimeSummaryStatistics": {"properties": {"count": {"type": "integer", "title": "Count"}, "mean": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Mean"}, "min": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Min"}, "max": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Max"}, "percentile_25": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 25"}, "percentile_50": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 50"}, "percentile_75": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 75"}}, "type": "object", "required": ["count"], "title": "DatetimeSummaryStatistics"}, "ExpressionType": {"type": "string", "enum": ["SIMPLE", "SQL"], "title": "ExpressionType"}, "FilterOperator": {"type": "string", "enum": ["==", "!=", ">", "<", ">=", "<=", "LIKE", "NOT LIKE", "ILIKE", "IS NULL", "IS NOT NULL", "IN", "NOT IN", "IS TRUE", "IS FALSE", "TEMPORAL_RANGE"], "title": "FilterOperator"}, "FilterStringOperators": {"type": "string", "enum": ["EQUALS", "NOT_EQUALS", "LESS_THAN", "GREATER_THAN", "LESS_THAN_OR_EQUAL", "GREATER_THAN_OR_EQUAL", "IN", "NOT_IN", "ILIKE", "LIKE", "IS_NOT_NULL", "IS_NULL", "LATEST_PARTITION", "IS_TRUE", "IS_FALSE"], "title": "FilterStringOperators"}, "FilterType": {"type": "string", "enum": ["filter_select", "filter_timegrain"], "title": "FilterType"}, "ForeignKeyConstraintBase": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Table"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "target_table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "target_columns": {"items": {"type": "string"}, "type": "array", "title": "Target Columns"}}, "type": "object", "required": ["table", "columns", "target_table", "target_columns"], "title": "ForeignKeyConstraintBase"}, "ForeignRelation": {"properties": {"fk_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Fk Columns"}, "referred_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Referred Table"}}, "type": "object", "required": ["fk_columns", "referred_table"], "title": "ForeignRelation"}, "FormData": {"properties": {}, "type": "object", "title": "FormData"}, "GenerateIndependentMitMDatasetDefinitionRequest": {"properties": {"dataset_name": {"type": "string", "title": "Dataset Name"}, "mitm_header": {"$ref": "#/components/schemas/Header-Input"}, "db_conn_info": {"$ref": "#/components/schemas/DBConnectionInfo"}, "identifiers": {"anyOf": [{"$ref": "#/components/schemas/MitMDatasetIdentifierBundle"}, {"type": "null"}]}}, "type": "object", "required": ["dataset_name", "mitm_header", "db_conn_info"], "title": "GenerateIndependentMitMDatasetDefinitionRequest"}, "GenerateVisualizationsRequest": {"properties": {"visualization_types": {"items": {"$ref": "#/components/schemas/MAEDVisualizationType"}, "type": "array", "title": "Visualization Types", "default": ["baseline"]}, "reuse_existing_identifiers": {"type": "boolean", "title": "Reuse Existing Identifiers", "default": true}, "track_identifiers": {"type": "boolean", "title": "Track Identifiers", "default": false}}, "type": "object", "title": "GenerateVisualizationsRequest"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "Header-Input": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "header_entries": {"items": {"$ref": "#/components/schemas/HeaderEntry"}, "type": "array", "title": "Header Entries"}}, "type": "object", "required": ["mitm"], "title": "Header"}, "Header-Output": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "header_entries": {"items": {"$ref": "#/components/schemas/HeaderEntry"}, "type": "array", "title": "Header Entries"}}, "type": "object", "required": ["mitm"], "title": "Header"}, "HeaderEntry": {"properties": {"concept": {"type": "string", "title": "Concept"}, "kind": {"type": "string", "title": "Kind"}, "type_name": {"type": "string", "title": "Type Name"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["concept", "kind", "type_name", "attributes", "attribute_dtypes"], "title": "HeaderEntry"}, "ListTrackedMitMDataset": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid"}, "dataset_name": {"type": "string", "title": "Dataset Name"}, "mitm": {"$ref": "#/components/schemas/MITM"}}, "type": "object", "required": ["uuid", "dataset_name", "mitm"], "title": "ListTrackedMitMDataset"}, "LocalTableIdentifier": {"properties": {"name": {"type": "string", "title": "Name"}, "schema": {"type": "string", "title": "Schema", "default": "main"}}, "type": "object", "required": ["name"], "title": "LocalTableIdentifier"}, "MAEDVisualizationType": {"type": "string", "enum": ["baseline", "experimental"], "title": "MAEDVisualizationType"}, "MITM": {"type": "string", "enum": ["MAED", "OCEL2"], "title": "MITM"}, "MITMDataType": {"type": "string", "enum": ["text", "json", "integer", "numeric", "boolean", "datetime", "unknown", "infer"], "title": "MITMDataType"}, "MetadataType": {"type": "string", "enum": ["Database", "SqlaTable", "Slice", "Chart", "Dashboard", "Asset", "MitMDataset"], "title": "MetadataType"}, "MitMDatasetBundleResponse": {"properties": {"mitm_dataset": {"$ref": "#/components/schemas/SupersetMitMDatasetDef"}, "datasource_bundle": {"$ref": "#/components/schemas/SupersetDatasourceBundle"}, "visualization_bundle": {"$ref": "#/components/schemas/SupersetVisualizationBundle"}}, "type": "object", "required": ["mitm_dataset", "datasource_bundle"], "title": "MitMDatasetBundleResponse"}, "MitMDatasetIdentifier": {"properties": {"id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "dataset_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dataset Name"}}, "type": "object", "title": "MitMDatasetIdentifier"}, "MitMDatasetIdentifierBundle": {"properties": {"database": {"anyOf": [{"$ref": "#/components/schemas/DatabaseIdentifier"}, {"type": "null"}]}, "ds_id_map": {"additionalProperties": {"$ref": "#/components/schemas/DatasetIdentifier"}, "type": "object", "title": "Ds Id Map"}, "mitm_dataset": {"anyOf": [{"$ref": "#/components/schemas/MitMDatasetIdentifier"}, {"type": "null"}]}, "viz_id_map": {"additionalProperties": {"additionalProperties": {"$ref": "#/components/schemas/DashboardIdentifier"}, "type": "object"}, "type": "object", "title": "Viz Id Map"}}, "type": "object", "title": "MitMDatasetIdentifierBundle"}, "MitMDatasetImportResponse": {"properties": {"mitm_datasets": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetMitMDatasetDef"}, "type": "array"}, {"type": "null"}], "title": "Mitm Datasets"}, "base_assets": {"anyOf": [{"$ref": "#/components/schemas/SupersetAssetsImport"}, {"type": "null"}]}, "metadata": {"$ref": "#/components/schemas/SupersetMetadataDef"}}, "type": "object", "required": ["mitm_datasets", "base_assets"], "title": "MitMDatasetImportResponse"}, "NativeFilterConfig": {"properties": {"id": {"type": "string", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "targets": {"items": {"anyOf": [{"$ref": "#/components/schemas/DatasetReference"}, {"$ref": "#/components/schemas/ColumnOfDataset"}]}, "type": "array", "title": "Targets"}, "controlValues": {"$ref": "#/components/schemas/ControlValues"}, "filterType": {"$ref": "#/components/schemas/FilterType", "default": "filter_select"}, "type": {"type": "string", "title": "Type", "default": "NATIVE_FILTER"}}, "type": "object", "required": ["id", "name"], "title": "NativeFilterConfig"}, "NumericSummaryStatistics": {"properties": {"count": {"type": "integer", "title": "Count"}, "mean": {"type": "number", "title": "Mean"}, "min": {"type": "number", "title": "Min"}, "max": {"type": "number", "title": "Max"}, "std": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Std"}, "percentile_25": {"type": "number", "title": "Percentile 25"}, "percentile_50": {"type": "number", "title": "Percentile 50"}, "percentile_75": {"type": "number", "title": "Percentile 75"}}, "type": "object", "required": ["count", "mean", "min", "max", "percentile_25", "percentile_50", "percentile_75"], "title": "NumericSummaryStatistics"}, "QueryContext": {"properties": {"datasource": {"$ref": "#/components/schemas/ChartDatasource"}, "queries": {"items": {"$ref": "#/components/schemas/QueryObject"}, "type": "array", "title": "Queries"}, "form_data": {"anyOf": [{"$ref": "#/components/schemas/FormData"}, {"type": "null"}]}, "result_type": {"$ref": "#/components/schemas/ChartDataResultType", "default": "full"}, "result_format": {"$ref": "#/components/schemas/ChartDataResultFormat", "default": "json"}, "force": {"type": "boolean", "title": "Force", "default": false}, "custom_cache_timeout": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Custom Cache Timeout"}}, "type": "object", "required": ["datasource"], "title": "QueryContext"}, "QueryObject": {"properties": {"annotation_layers": {"items": {"$ref": "#/components/schemas/AnnotationLayer"}, "type": "array", "title": "Annotation Layers"}, "applied_time_extras": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Applied Time Extras"}, "columns": {"items": {"anyOf": [{"type": "string"}, {"$ref": "#/components/schemas/SupersetAdhocColumn"}]}, "type": "array", "title": "Columns"}, "datasource": {"anyOf": [{"$ref": "#/components/schemas/ChartDatasource"}, {"type": "null"}]}, "extras": {"$ref": "#/components/schemas/QueryObjectExtras"}, "filters": {"items": {"$ref": "#/components/schemas/QueryObjectFilterClause"}, "type": "array", "title": "Filters"}, "metrics": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetAdhocMetric"}, "type": "array"}, {"type": "null"}], "title": "Metrics"}, "granularity": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Granularity"}, "from_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "From Dttm"}, "to_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "To Dttm"}, "inner_from_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "Inner From Dttm"}, "inner_to_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "Inner To Dttm"}, "is_rowcount": {"type": "boolean", "title": "Is Rowcount", "default": false}, "is_timeseries": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Timeseries"}, "order_desc": {"type": "boolean", "title": "Order Desc", "default": true}, "orderby": {"items": {"prefixItems": [{"anyOf": [{"$ref": "#/components/schemas/SupersetAdhocMetric"}, {"type": "string"}]}, {"type": "boolean"}], "type": "array", "maxItems": 2, "minItems": 2}, "type": "array", "title": "Orderby"}, "post_processing": {"items": {"anyOf": [{"$ref": "#/components/schemas/SupersetPostProcessing"}, {"additionalProperties": true, "type": "object"}]}, "type": "array", "title": "Post Processing"}, "result_type": {"anyOf": [{"$ref": "#/components/schemas/ChartDataResultType"}, {"type": "null"}]}, "row_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Row Limit"}, "row_offset": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Row Offset"}, "series_columns": {"items": {"type": "string"}, "type": "array", "title": "Series Columns"}, "series_limit": {"type": "integer", "title": "Series Limit", "default": 0}, "series_limit_metric": {"anyOf": [{"$ref": "#/components/schemas/SupersetAdhocMetric"}, {"type": "null"}]}, "time_offsets": {"items": {"type": "string"}, "type": "array", "title": "Time Offsets"}, "time_shift": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time Shift"}, "time_range": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time Range"}, "url_params": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Url Params"}}, "type": "object", "title": "QueryObject"}, "QueryObjectExtras": {"properties": {"having": {"type": "string", "title": "Having", "default": ""}, "where": {"type": "string", "title": "Where", "default": ""}, "time_grain_sqla": {"anyOf": [{"$ref": "#/components/schemas/TimeGrain"}, {"type": "null"}]}}, "type": "object", "title": "QueryObjectExtras"}, "QueryObjectFilterClause": {"properties": {"col": {"type": "string", "title": "Col"}, "op": {"$ref": "#/components/schemas/FilterOperator"}, "val": {"anyOf": [{"type": "boolean"}, {"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"items": {"anyOf": [{"type": "boolean"}, {"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}, "type": "array"}, {"prefixItems": [{"anyOf": [{"type": "boolean"}, {"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}], "type": "array", "maxItems": 1, "minItems": 1}, {"type": "null"}], "title": "Val"}, "grain": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Grain"}, "isExtra": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Isextra"}}, "type": "object", "required": ["col", "op"], "title": "QueryObjectFilterClause"}, "RegisterExternalMitMDatasetRequest": {"properties": {"dataset_name": {"type": "string", "title": "Dataset Name"}, "sql_alchemy_uri": {"type": "string", "minLength": 1, "format": "uri", "title": "Sql Alchemy Uri"}, "mitm": {"$ref": "#/components/schemas/MITM"}, "cvvs": {"items": {"$ref": "#/components/schemas/CompiledVirtualView"}, "type": "array", "title": "Cvvs"}, "mappings": {"items": {"$ref": "#/components/schemas/ConceptMapping"}, "type": "array", "title": "Mappings"}}, "type": "object", "required": ["dataset_name", "sql_alchemy_uri", "mitm", "cvvs", "mappings"], "title": "RegisterExternalMitMDatasetRequest"}, "RegisterMitMResponse": {"properties": {"status": {"type": "string", "enum": ["success", "failure"], "title": "Status"}, "tracked_mitm_dataset": {"anyOf": [{"$ref": "#/components/schemas/TrackedMitMDataset"}, {"type": "null"}]}, "msg": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Msg"}}, "type": "object", "required": ["status"], "title": "RegisterMitMResponse"}, "SampleSummary": {"properties": {"sample_size": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Sample Size"}, "na_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Na Fraction"}, "unique_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Unique Fraction"}, "value_counts": {"anyOf": [{"additionalProperties": {"type": "integer"}, "type": "object"}, {"type": "null"}], "title": "Value Counts"}, "summary_statistics": {"anyOf": [{"$ref": "#/components/schemas/NumericSummaryStatistics"}, {"$ref": "#/components/schemas/CategoricalSummaryStatistics"}, {"$ref": "#/components/schemas/DatetimeSummaryStatistics"}, {"type": "null"}], "title": "Summary Statistics"}, "json_schema": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Json Schema"}}, "type": "object", "title": "SampleSummary"}, "SourceDBType": {"type": "string", "enum": ["original", "working", "virtual"], "title": "SourceDBType"}, "SupersetAdhocColumn": {"properties": {"label": {"type": "string", "title": "Label"}, "sqlExpression": {"type": "string", "title": "Sqlexpression"}, "columnType": {"type": "string", "title": "Columntype", "default": "BASE_AXIS"}, "expressionType": {"type": "string", "title": "Expressiontype", "default": "SQL"}, "timeGrain": {"anyOf": [{"$ref": "#/components/schemas/TimeGrain"}, {"type": "null"}]}}, "type": "object", "required": ["label", "sqlExpression"], "title": "SupersetAdhocColumn"}, "SupersetAdhocFilter": {"properties": {"clause": {"type": "string", "title": "Clause", "default": "WHERE"}, "subject": {"type": "string", "title": "Subject"}, "operator": {"$ref": "#/components/schemas/FilterOperator"}, "operatorId": {"anyOf": [{"$ref": "#/components/schemas/FilterStringOperators"}, {"type": "null"}]}, "comparator": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Comparator", "default": "No filter"}, "expressionType": {"$ref": "#/components/schemas/ExpressionType", "default": "SIMPLE"}, "isExtra": {"type": "boolean", "title": "Isextra", "default": false}, "isNew": {"type": "boolean", "title": "Isnew", "default": false}, "sqlExpression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sqlexpression"}}, "type": "object", "required": ["subject", "operator"], "title": "SupersetAdhocFilter"}, "SupersetAdhocMetric": {"properties": {"label": {"type": "string", "title": "Label"}, "column": {"$ref": "#/components/schemas/SupersetColumn"}, "expressionType": {"$ref": "#/components/schemas/ExpressionType", "default": "SIMPLE"}, "aggregate": {"$ref": "#/components/schemas/SupersetAggregate", "default": "COUNT"}, "sqlExpression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sqlexpression"}, "datasourceWarning": {"type": "boolean", "title": "Datasourcewarning", "default": false}, "hasCustomLabel": {"type": "boolean", "title": "Hascustomlabel", "default": false}, "optionName": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Optionname"}}, "type": "object", "required": ["label", "column"], "title": "SupersetAdhocMetric"}, "SupersetAggregate": {"type": "string", "enum": ["COUNT", "SUM", "MIN", "MAX", "AVG"], "title": "SupersetAggregate"}, "SupersetAssetsImport": {"properties": {"databases": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDatabaseDef"}, "type": "array"}, {"type": "null"}], "title": "Databases"}, "datasets": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDatasetDef"}, "type": "array"}, {"type": "null"}], "title": "Datasets"}, "charts": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetChartDef"}, "type": "array"}, {"type": "null"}], "title": "Charts"}, "dashboards": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDashboardDef"}, "type": "array"}, {"type": "null"}], "title": "Dashboards"}, "metadata": {"$ref": "#/components/schemas/SupersetMetadataDef"}}, "type": "object", "title": "SupersetAssetsImport"}, "SupersetChartDef": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "slice_name": {"type": "string", "title": "Slice Name"}, "viz_type": {"$ref": "#/components/schemas/SupersetVizType"}, "dataset_uuid": {"type": "string", "format": "uuid", "title": "Dataset Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "certified_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certified By"}, "certification_details": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certification Details"}, "params": {"anyOf": [{"$ref": "#/components/schemas/ChartParams"}, {"type": "null"}]}, "query_context": {"anyOf": [{}, {"type": "null"}]}, "cache_timeout": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Cache Timeout"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}, "is_managed_externally": {"type": "boolean", "title": "Is Managed Externally", "default": false}, "external_url": {"anyOf": [{"type": "string", "minLength": 1, "format": "uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "External Url"}}, "type": "object", "required": ["uuid", "slice_name", "viz_type", "dataset_uuid"], "title": "SupersetChartDef"}, "SupersetColumn": {"properties": {"column_name": {"type": "string", "title": "Column Name"}, "verbose_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Verbose Name"}, "id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}, "is_dttm": {"type": "boolean", "title": "Is Dttm", "default": false}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "type": {"type": "string", "title": "Type", "default": "VARCHAR"}, "advanced_data_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Advanced Data Type"}, "groupby": {"type": "boolean", "title": "Groupby", "default": true}, "filterable": {"type": "boolean", "title": "Filterable", "default": true}, "expression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expression"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "python_date_format": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Python Date Format"}, "extra": {"additionalProperties": true, "type": "object", "title": "Extra"}}, "type": "object", "required": ["column_name"], "title": "SupersetColumn"}, "SupersetDashboardDef": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "dashboard_title": {"type": "string", "title": "Dashboard Title"}, "position": {"additionalProperties": {"anyOf": [{"type": "string"}, {"$ref": "#/components/schemas/DashboardComponent"}]}, "type": "object", "title": "Position"}, "metadata": {"$ref": "#/components/schemas/DashboardMetadata"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "css": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Css"}, "slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slug"}, "is_managed_externally": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Managed Externally", "default": false}, "external_url": {"anyOf": [{"type": "string", "minLength": 1, "format": "uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "External Url"}, "certified_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certified By"}, "certification_details": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certification Details"}, "published": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Published", "default": false}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}}, "type": "object", "required": ["uuid", "dashboard_title", "position", "metadata"], "title": "SupersetDashboardDef"}, "SupersetDatabaseDef": {"properties": {"database_name": {"type": "string", "title": "Database Name"}, "sqlalchemy_uri": {"type": "string", "minLength": 1, "format": "uri", "title": "Sqlalchemy Uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "cache_timeout": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cache Timeout"}, "expose_in_sqllab": {"type": "boolean", "title": "Expose In Sqllab", "default": true}, "allow_run_async": {"type": "boolean", "title": "Allow Run Async", "default": true}, "allow_ctas": {"type": "boolean", "title": "Allow Ctas", "default": false}, "allow_cvas": {"type": "boolean", "title": "Allow Cvas", "default": false}, "allow_dml": {"type": "boolean", "title": "Allow Dml", "default": false}, "allow_file_upload": {"type": "boolean", "title": "Allow File Upload", "default": false}, "extra": {"additionalProperties": true, "type": "object", "title": "Extra"}, "impersonate_user": {"type": "boolean", "title": "Impersonate User", "default": false}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}, "ssh_tunnel": {"type": "null", "title": "Ssh Tunnel"}}, "type": "object", "required": ["database_name", "sqlalchemy_uri", "uuid"], "title": "SupersetDatabaseDef"}, "SupersetDatasetDef": {"properties": {"table_name": {"type": "string", "title": "Table Name"}, "schema": {"type": "string", "title": "Schema"}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "database_uuid": {"type": "string", "format": "uuid", "title": "Database Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "main_dttm_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Main Dttm Col"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "default_endpoint": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Endpoint"}, "offset": {"type": "integer", "title": "Offset", "default": 0}, "cache_timeout": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cache Timeout"}, "catalog": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Catalog"}, "sql": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql"}, "params": {"title": "Params"}, "template_params": {"title": "Template Params"}, "is_managed_externally": {"type": "boolean", "title": "Is Managed Externally", "default": true}, "external_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "External Url"}, "filter_select_enabled": {"type": "boolean", "title": "Filter Select Enabled", "default": true}, "fetch_values_predicate": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fetch Values Predicate"}, "extra": {"additionalProperties": true, "type": "object", "title": "Extra"}, "normalize_columns": {"type": "boolean", "title": "Normalize Columns", "default": false}, "always_filter_main_dttm": {"type": "boolean", "title": "Always Filter Main Dttm", "default": false}, "metrics": {"items": {"$ref": "#/components/schemas/SupersetMetric"}, "type": "array", "title": "Metrics"}, "columns": {"items": {"$ref": "#/components/schemas/SupersetColumn"}, "type": "array", "title": "Columns"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}}, "type": "object", "required": ["table_name", "schema", "uuid", "database_uuid"], "title": "SupersetDatasetDef"}, "SupersetDatasourceBundle": {"properties": {"database": {"$ref": "#/components/schemas/SupersetDatabaseDef"}, "datasets": {"items": {"$ref": "#/components/schemas/SupersetDatasetDef"}, "type": "array", "title": "Datasets"}}, "type": "object", "required": ["database"], "title": "SupersetDatasourceBundle"}, "SupersetMetadataDef": {"properties": {"type": {"$ref": "#/components/schemas/MetadataType"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}, "timestamp": {"type": "string", "format": "date-time", "title": "Timestamp", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}}, "type": "object", "required": ["type"], "title": "SupersetMetadataDef"}, "SupersetMetric": {"properties": {"metric_name": {"type": "string", "title": "Metric Name"}, "verbose_name": {"type": "string", "title": "Verbose Name"}, "expression": {"type": "string", "title": "Expression"}, "metric_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Metric Type"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "d3format": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "D3Format"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "extra": {"additionalProperties": true, "type": "object", "title": "Extra"}, "warning_text": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Warning Text"}}, "type": "object", "required": ["metric_name", "verbose_name", "expression"], "title": "SupersetMetric"}, "SupersetMitMDatasetDef": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "dataset_name": {"type": "string", "title": "Dataset Name"}, "mitm": {"$ref": "#/components/schemas/MITM"}, "mitm_header": {"anyOf": [{"$ref": "#/components/schemas/Header-Output"}, {"type": "null"}]}, "database_uuid": {"type": "string", "format": "uuid", "title": "Database Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "tables": {"anyOf": [{"items": {"$ref": "#/components/schemas/DatasetIdentifier"}, "type": "array"}, {"type": "null"}], "title": "Tables"}, "slices": {"anyOf": [{"items": {"$ref": "#/components/schemas/ChartIdentifier"}, "type": "array"}, {"type": "null"}], "title": "Slices"}, "dashboards": {"anyOf": [{"items": {"$ref": "#/components/schemas/DashboardIdentifier"}, "type": "array"}, {"type": "null"}], "title": "Dashboards"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}}, "type": "object", "required": ["uuid", "dataset_name", "mitm", "database_uuid"], "title": "SupersetMitMDatasetDef"}, "SupersetPostProcessing": {"properties": {"operation": {"type": "string", "title": "Operation"}}, "type": "object", "required": ["operation"], "title": "SupersetPostProcessing"}, "SupersetVisualizationBundle": {"properties": {"charts": {"items": {"$ref": "#/components/schemas/SupersetChartDef"}, "type": "array", "title": "Charts"}, "dashboards": {"items": {"$ref": "#/components/schemas/SupersetDashboardDef"}, "type": "array", "title": "Dashboards"}, "viz_collections": {"anyOf": [{"additionalProperties": {"additionalProperties": {"$ref": "#/components/schemas/DashboardIdentifier"}, "type": "object"}, "type": "object"}, {"type": "null"}], "title": "Viz Collections"}}, "type": "object", "title": "SupersetVisualizationBundle"}, "SupersetVizType": {"type": "string", "enum": ["pie", "echarts_timeseries_bar", "echarts_timeseries_line", "maed_custom"], "title": "SupersetVizType"}, "TableIdentifier": {"properties": {"source": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}, "schema": {"type": "string", "title": "Schema", "default": "main"}, "name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "TableIdentifier"}, "TableMetaInfoBase": {"properties": {"schema_name": {"type": "string", "title": "Schema Name", "default": "main"}, "name": {"type": "string", "title": "Name"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "sql_column_types": {"items": {"type": "string"}, "type": "array", "title": "Sql Column Types"}, "primary_key": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Primary Key"}, "indexes": {"anyOf": [{"items": {"items": {"type": "string"}, "type": "array"}, "type": "array"}, {"type": "null"}], "title": "Indexes"}, "foreign_key_constraints": {"items": {"$ref": "#/components/schemas/ForeignKeyConstraintBase"}, "type": "array", "title": "Foreign Key Constraints"}, "column_properties": {"additionalProperties": {"$ref": "#/components/schemas/ColumnProperties"}, "type": "object", "title": "Column Properties"}}, "type": "object", "required": ["name", "columns", "sql_column_types"], "title": "TableMetaInfoBase"}, "TableProbeMinimal": {"properties": {"row_count": {"type": "integer", "minimum": 0.0, "title": "Row Count"}, "inferred_types": {"additionalProperties": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Inferred Types"}, "sample_summaries": {"additionalProperties": {"$ref": "#/components/schemas/SampleSummary"}, "type": "object", "title": "Sample Summaries"}}, "type": "object", "required": ["row_count", "inferred_types", "sample_summaries"], "title": "TableProbeMinimal"}, "TimeGrain": {"type": "string", "enum": ["PT1S", "PT5S", "PT30S", "PT1M", "PT5M", "PT10M", "PT15M", "PT30M", "PT0.5H", "PT1H", "PT6H", "P1D", "P1W", "1969-12-28T00:00:00Z/P1W", "1969-12-29T00:00:00Z/P1W", "P1W/1970-01-03T00:00:00Z", "P1W/1970-01-04T00:00:00Z", "P1M", "P3M", "P0.25Y", "P1Y"], "title": "TimeGrain"}, "TrackedMitMDataset": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid"}, "dataset_name": {"type": "string", "title": "Dataset Name"}, "schema_name": {"type": "string", "title": "Schema Name"}, "sql_alchemy_uri": {"type": "string", "minLength": 1, "format": "uri", "title": "Sql Alchemy Uri"}, "mitm_header": {"$ref": "#/components/schemas/Header-Output"}, "is_managed_locally": {"type": "boolean", "title": "Is Managed Locally", "default": true}, "last_edited": {"type": "string", "format": "date-time", "title": "Last Edited"}, "identifier_bundle": {"$ref": "#/components/schemas/MitMDatasetIdentifierBundle"}}, "type": "object", "required": ["dataset_name", "schema_name", "sql_alchemy_uri", "mitm_header", "identifier_bundle"], "title": "TrackedMitMDataset"}, "UploadMitMResponse": {"properties": {"status": {"type": "string", "enum": ["success", "failure"], "title": "Status"}, "tracked_mitm_dataset": {"anyOf": [{"$ref": "#/components/schemas/TrackedMitMDataset"}, {"type": "null"}]}, "msg": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Msg"}}, "type": "object", "required": ["status"], "title": "UploadMitMResponse"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "VisualizationImportResponse": {"properties": {"databases": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDatabaseDef"}, "type": "array"}, {"type": "null"}], "title": "Databases"}, "datasets": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDatasetDef"}, "type": "array"}, {"type": "null"}], "title": "Datasets"}, "charts": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetChartDef"}, "type": "array"}, {"type": "null"}], "title": "Charts"}, "dashboards": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDashboardDef"}, "type": "array"}, {"type": "null"}], "title": "Dashboards"}, "metadata": {"$ref": "#/components/schemas/SupersetMetadataDef"}}, "type": "object", "title": "VisualizationImportResponse"}, "WrappedMITMDataType": {"properties": {"mitm": {"$ref": "#/components/schemas/MITMDataType"}}, "type": "object", "required": ["mitm"], "title": "WrappedMITMDataType"}}}} \ No newline at end of file diff --git a/schema/openapi.yaml b/schema/openapi.yaml index abe7fd2..9b334f3 100644 --- a/schema/openapi.yaml +++ b/schema/openapi.yaml @@ -103,39 +103,6 @@ components: - TIME_SERIES title: AnnotationType type: string - Body_generate_mitm_dataset_bundle_definitions_mitm_dataset_post: - properties: - db_conn_info: - $ref: '#/components/schemas/SupersetDBConnectionInfo' - mitm_header: - $ref: '#/components/schemas/Header-Input' - required: - - mitm_header - - db_conn_info - title: Body_generate_mitm_dataset_bundle_definitions_mitm_dataset_post - type: object - Body_generate_mitm_dataset_import_definitions_mitm_dataset_import_post: - properties: - db_conn_info: - $ref: '#/components/schemas/SupersetDBConnectionInfo' - mitm_header: - $ref: '#/components/schemas/Header-Input' - required: - - mitm_header - - db_conn_info - title: Body_generate_mitm_dataset_import_definitions_mitm_dataset_import_post - type: object - Body_generate_mitm_dataset_import_zip_definitions_mitm_dataset_import_zip_post: - properties: - db_conn_info: - $ref: '#/components/schemas/SupersetDBConnectionInfo' - mitm_header: - $ref: '#/components/schemas/Header-Input' - required: - - mitm_header - - db_conn_info - title: Body_generate_mitm_dataset_import_zip_definitions_mitm_dataset_import_zip_post - type: object Body_upload_mitm_dataset_mitm_dataset_upload_post: properties: mitm_zip: @@ -146,6 +113,30 @@ components: - mitm_zip title: Body_upload_mitm_dataset_mitm_dataset_upload_post type: object + CategoricalSummaryStatistics: + properties: + count: + minimum: 0.0 + title: Count + type: integer + freq: + minimum: 0.0 + title: Freq + type: integer + top: + title: Top + type: string + unique: + minimum: 0.0 + title: Unique + type: integer + required: + - count + - unique + - top + - freq + title: CategoricalSummaryStatistics + type: object ChartDataResultFormat: enum: - csv @@ -165,6 +156,53 @@ components: - drill_detail title: ChartDataResultType type: string + ChartDatasource: + properties: + id: + anyOf: + - type: integer + - type: 'null' + title: Id + table_name: + anyOf: + - type: string + - type: 'null' + title: Table Name + type: + default: table + enum: + - table + - annotation + title: Type + type: string + uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Uuid + type: string + title: ChartDatasource + type: object + ChartIdentifier: + properties: + id: + anyOf: + - type: integer + - type: 'null' + title: Id + slice_name: + anyOf: + - type: string + - type: 'null' + title: Slice Name + uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Uuid + type: string + title: ChartIdentifier + type: object ChartParams: properties: adhoc_filters: @@ -187,9 +225,10 @@ components: datasource: anyOf: - type: string - - $ref: '#/components/schemas/DatasourceIdentifier' + - $ref: '#/components/schemas/DatasetIdentifier' title: Datasource extra_form_data: + additionalProperties: true title: Extra Form Data type: object groupby: @@ -229,6 +268,25 @@ components: - viz_type title: ChartParams type: object + ClearDBResponse: + description: Response model for clearing the database. + properties: + dropped_mitm_datasets: + anyOf: + - items: + $ref: '#/components/schemas/ListTrackedMitMDataset' + type: array + - type: 'null' + title: Dropped Mitm Datasets + dropped_schemas: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Dropped Schemas + title: ClearDBResponse + type: object ColName: properties: name: @@ -253,6 +311,34 @@ components: - column title: ColumnOfDataset type: object + ColumnProperties: + properties: + mitm_data_type: + $ref: '#/components/schemas/MITMDataType' + nullable: + title: Nullable + type: boolean + part_of_fk: + title: Part Of Fk + type: boolean + part_of_index: + title: Part Of Index + type: boolean + part_of_pk: + title: Part Of Pk + type: boolean + unique: + title: Unique + type: boolean + required: + - nullable + - unique + - part_of_pk + - part_of_fk + - part_of_index + - mitm_data_type + title: ColumnProperties + type: object CompiledVirtualView: properties: column_dtypes: @@ -396,6 +482,78 @@ components: title: Searchalloptions title: ControlValues type: object + DBConnectionInfo: + properties: + catalog: + anyOf: + - type: string + - type: 'null' + title: Catalog + explicit_db_name: + anyOf: + - type: string + - type: 'null' + title: Explicit Db Name + schema_name: + default: main + title: Schema Name + type: string + sql_alchemy_uri: + description: Better annotation for AnyUrl. Parses from string format, serializes + to string format. + format: uri + minLength: 1 + title: Sql Alchemy Uri + type: string + required: + - sql_alchemy_uri + title: DBConnectionInfo + type: object + DBMetaInfoBase: + properties: + db_structure: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/TableMetaInfoBase' + type: object + title: Db Structure + type: object + tables: + additionalProperties: + $ref: '#/components/schemas/TableMetaInfoBase' + readOnly: true + title: Tables + type: object + required: + - db_structure + - tables + title: DBMetaInfoBase + type: object + DBMetaResponse: + properties: + db_meta: + anyOf: + - $ref: '#/components/schemas/DBMetaInfoBase' + - type: 'null' + title: DBMetaResponse + type: object + DBProbeMinimal: + properties: + table_probes: + additionalProperties: + $ref: '#/components/schemas/TableProbeMinimal' + title: Table Probes + type: object + title: DBProbeMinimal + type: object + DBProbeResponse: + properties: + db_probe: + anyOf: + - $ref: '#/components/schemas/DBProbeMinimal' + - type: 'null' + title: DBProbeResponse + type: object DashboardComponent: properties: children: @@ -426,6 +584,26 @@ components: - ROOT title: DashboardComponentType type: string + DashboardIdentifier: + properties: + dashboard_title: + anyOf: + - type: string + - type: 'null' + title: Dashboard Title + id: + anyOf: + - type: integer + - type: 'null' + title: Id + uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Uuid + type: string + title: DashboardIdentifier + type: object DashboardMetadata: properties: color_scheme: @@ -443,6 +621,46 @@ components: type: array title: DashboardMetadata type: object + DatabaseIdentifier: + properties: + database_name: + anyOf: + - type: string + - type: 'null' + title: Database Name + id: + anyOf: + - type: integer + - type: 'null' + title: Id + uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Uuid + type: string + title: DatabaseIdentifier + type: object + DatasetIdentifier: + properties: + id: + anyOf: + - type: integer + - type: 'null' + title: Id + table_name: + anyOf: + - type: string + - type: 'null' + title: Table Name + uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Uuid + type: string + title: DatasetIdentifier + type: object DatasetReference: properties: datasetUuid: @@ -455,20 +673,50 @@ components: - datasetUuid title: DatasetReference type: object - DatasourceIdentifier: + DatetimeSummaryStatistics: properties: - id: - default: -1 - title: Id + count: + title: Count type: integer - type: - default: table - enum: - - table - - annotation - title: Type - type: string - title: DatasourceIdentifier + max: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Max + mean: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Mean + min: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Min + percentile_25: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Percentile 25 + percentile_50: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Percentile 50 + percentile_75: + anyOf: + - format: date-time + type: string + - type: 'null' + title: Percentile 75 + required: + - count + title: DatetimeSummaryStatistics type: object ExpressionType: enum: @@ -521,6 +769,50 @@ components: - filter_timegrain title: FilterType type: string + ForeignKeyConstraintBase: + properties: + columns: + items: + type: string + title: Columns + type: array + name: + anyOf: + - type: string + - type: 'null' + title: Name + table: + anyOf: + - $ref: '#/components/schemas/LocalTableIdentifier' + - maxItems: 2 + minItems: 2 + prefixItems: + - type: string + - type: string + type: array + title: Table + target_columns: + items: + type: string + title: Target Columns + type: array + target_table: + anyOf: + - $ref: '#/components/schemas/LocalTableIdentifier' + - maxItems: 2 + minItems: 2 + prefixItems: + - type: string + - type: string + type: array + title: Target Table + required: + - table + - columns + - target_table + - target_columns + title: ForeignKeyConstraintBase + type: object ForeignRelation: properties: fk_columns: @@ -558,14 +850,44 @@ components: properties: {} title: FormData type: object - GenericDataType: - enum: - - 0 - - 1 - - 2 - - 3 - title: GenericDataType - type: integer + GenerateIndependentMitMDatasetDefinitionRequest: + properties: + dataset_name: + title: Dataset Name + type: string + db_conn_info: + $ref: '#/components/schemas/DBConnectionInfo' + identifiers: + anyOf: + - $ref: '#/components/schemas/MitMDatasetIdentifierBundle' + - type: 'null' + mitm_header: + $ref: '#/components/schemas/Header-Input' + required: + - dataset_name + - mitm_header + - db_conn_info + title: GenerateIndependentMitMDatasetDefinitionRequest + type: object + GenerateVisualizationsRequest: + properties: + reuse_existing_identifiers: + default: true + title: Reuse Existing Identifiers + type: boolean + track_identifiers: + default: false + title: Track Identifiers + type: boolean + visualization_types: + default: + - baseline + items: + $ref: '#/components/schemas/MAEDVisualizationType' + title: Visualization Types + type: array + title: GenerateVisualizationsRequest + type: object HTTPValidationError: properties: detail: @@ -630,6 +952,42 @@ components: - attribute_dtypes title: HeaderEntry type: object + ListTrackedMitMDataset: + properties: + dataset_name: + title: Dataset Name + type: string + mitm: + $ref: '#/components/schemas/MITM' + uuid: + format: uuid + title: Uuid + type: string + required: + - uuid + - dataset_name + - mitm + title: ListTrackedMitMDataset + type: object + LocalTableIdentifier: + properties: + name: + title: Name + type: string + schema: + default: main + title: Schema + type: string + required: + - name + title: LocalTableIdentifier + type: object + MAEDVisualizationType: + enum: + - baseline + - experimental + title: MAEDVisualizationType + type: string MITM: enum: - MAED @@ -659,6 +1017,83 @@ components: - MitMDataset title: MetadataType type: string + MitMDatasetBundleResponse: + properties: + datasource_bundle: + $ref: '#/components/schemas/SupersetDatasourceBundle' + mitm_dataset: + $ref: '#/components/schemas/SupersetMitMDatasetDef' + visualization_bundle: + $ref: '#/components/schemas/SupersetVisualizationBundle' + required: + - mitm_dataset + - datasource_bundle + title: MitMDatasetBundleResponse + type: object + MitMDatasetIdentifier: + properties: + dataset_name: + anyOf: + - type: string + - type: 'null' + title: Dataset Name + id: + anyOf: + - type: integer + - type: 'null' + title: Id + uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Uuid + type: string + title: MitMDatasetIdentifier + type: object + MitMDatasetIdentifierBundle: + properties: + database: + anyOf: + - $ref: '#/components/schemas/DatabaseIdentifier' + - type: 'null' + ds_id_map: + additionalProperties: + $ref: '#/components/schemas/DatasetIdentifier' + title: Ds Id Map + type: object + mitm_dataset: + anyOf: + - $ref: '#/components/schemas/MitMDatasetIdentifier' + - type: 'null' + viz_id_map: + additionalProperties: + additionalProperties: + $ref: '#/components/schemas/DashboardIdentifier' + type: object + title: Viz Id Map + type: object + title: MitMDatasetIdentifierBundle + type: object + MitMDatasetImportResponse: + properties: + base_assets: + anyOf: + - $ref: '#/components/schemas/SupersetAssetsImport' + - type: 'null' + metadata: + $ref: '#/components/schemas/SupersetMetadataDef' + mitm_datasets: + anyOf: + - items: + $ref: '#/components/schemas/SupersetMitMDatasetDef' + type: array + - type: 'null' + title: Mitm Datasets + required: + - mitm_datasets + - base_assets + title: MitMDatasetImportResponse + type: object NativeFilterConfig: properties: controlValues: @@ -688,6 +1123,44 @@ components: - name title: NativeFilterConfig type: object + NumericSummaryStatistics: + properties: + count: + title: Count + type: integer + max: + title: Max + type: number + mean: + title: Mean + type: number + min: + title: Min + type: number + percentile_25: + title: Percentile 25 + type: number + percentile_50: + title: Percentile 50 + type: number + percentile_75: + title: Percentile 75 + type: number + std: + anyOf: + - type: number + - type: 'null' + title: Std + required: + - count + - mean + - min + - max + - percentile_25 + - percentile_50 + - percentile_75 + title: NumericSummaryStatistics + type: object QueryContext: properties: custom_cache_timeout: @@ -696,7 +1169,7 @@ components: - type: 'null' title: Custom Cache Timeout datasource: - $ref: '#/components/schemas/DatasourceIdentifier' + $ref: '#/components/schemas/ChartDatasource' force: default: false title: Force @@ -741,7 +1214,7 @@ components: type: array datasource: anyOf: - - $ref: '#/components/schemas/DatasourceIdentifier' + - $ref: '#/components/schemas/ChartDatasource' - type: 'null' extras: $ref: '#/components/schemas/QueryObjectExtras' @@ -815,7 +1288,8 @@ components: items: anyOf: - $ref: '#/components/schemas/SupersetPostProcessing' - - type: object + - additionalProperties: true + type: object title: Post Processing type: array result_type: @@ -1002,56 +1476,49 @@ components: - status title: RegisterMitMResponse type: object - RelatedDashboard: + SampleSummary: properties: - dashboard_id: + json_schema: anyOf: - - type: integer + - additionalProperties: true + type: object - type: 'null' - title: Dashboard Id - dashboard_uuid: - description: Better annotation for UUID. Parses from string format, serializes - to string format. - format: uuid - title: Dashboard Uuid - type: string - required: - - dashboard_uuid - title: RelatedDashboard - type: object - RelatedSlice: - properties: - slice_id: + title: Json Schema + na_fraction: anyOf: - - type: integer + - maximum: 1.0 + minimum: 0.0 + type: number - type: 'null' - title: Slice Id - slice_uuid: - description: Better annotation for UUID. Parses from string format, serializes - to string format. - format: uuid - title: Slice Uuid - type: string - required: - - slice_uuid - title: RelatedSlice - type: object - RelatedTable: - properties: - table_id: + title: Na Fraction + sample_size: anyOf: - - type: integer + - minimum: 0.0 + type: integer - type: 'null' - title: Table Id - table_uuid: - description: Better annotation for UUID. Parses from string format, serializes - to string format. - format: uuid - title: Table Uuid - type: string - required: - - table_uuid - title: RelatedTable + title: Sample Size + summary_statistics: + anyOf: + - $ref: '#/components/schemas/NumericSummaryStatistics' + - $ref: '#/components/schemas/CategoricalSummaryStatistics' + - $ref: '#/components/schemas/DatetimeSummaryStatistics' + - type: 'null' + title: Summary Statistics + unique_fraction: + anyOf: + - maximum: 1.0 + minimum: 0.0 + type: number + - type: 'null' + title: Unique Fraction + value_counts: + anyOf: + - additionalProperties: + type: integer + type: object + - type: 'null' + title: Value Counts + title: SampleSummary type: object SourceDBType: enum: @@ -1253,7 +1720,7 @@ components: - type: 'null' query_context: anyOf: - - $ref: '#/components/schemas/QueryContext' + - {} - type: 'null' slice_name: title: Slice Name @@ -1298,6 +1765,7 @@ components: - type: 'null' title: Expression extra: + additionalProperties: true title: Extra type: object filterable: @@ -1330,9 +1798,6 @@ components: default: VARCHAR title: Type type: string - type_generic: - $ref: '#/components/schemas/GenericDataType' - default: 1 verbose_name: anyOf: - type: string @@ -1342,28 +1807,6 @@ components: - column_name title: SupersetColumn type: object - SupersetDBConnectionInfo: - properties: - explicit_db_name: - anyOf: - - type: string - - type: 'null' - title: Explicit Db Name - schema_name: - default: main - title: Schema Name - type: string - sql_alchemy_uri: - description: Better annotation for AnyUrl. Parses from string format, serializes - to string format. - format: uri - minLength: 1 - title: Sql Alchemy Uri - type: string - required: - - sql_alchemy_uri - title: SupersetDBConnectionInfo - type: object SupersetDashboardDef: properties: certification_details: @@ -1460,7 +1903,7 @@ components: title: Allow File Upload type: boolean allow_run_async: - default: false + default: true title: Allow Run Async type: boolean cache_timeout: @@ -1476,6 +1919,7 @@ components: title: Expose In Sqllab type: boolean extra: + additionalProperties: true title: Extra type: object impersonate_user: @@ -1545,7 +1989,13 @@ components: - type: string - type: 'null' title: Description + external_url: + anyOf: + - type: string + - type: 'null' + title: External Url extra: + additionalProperties: true title: Extra type: object fetch_values_predicate: @@ -1557,6 +2007,10 @@ components: default: true title: Filter Select Enabled type: boolean + is_managed_externally: + default: true + title: Is Managed Externally + type: boolean main_dttm_col: anyOf: - type: string @@ -1659,6 +2113,7 @@ components: title: Expression type: string extra: + additionalProperties: true title: Extra type: object metric_name: @@ -1683,25 +2138,12 @@ components: - expression title: SupersetMetric type: object - SupersetMitMDatasetBundle: - properties: - datasource_bundle: - $ref: '#/components/schemas/SupersetDatasourceBundle' - mitm_dataset: - $ref: '#/components/schemas/SupersetMitMDatasetDef' - visualization_bundle: - $ref: '#/components/schemas/SupersetVisualizationBundle' - required: - - mitm_dataset - - datasource_bundle - title: SupersetMitMDatasetBundle - type: object SupersetMitMDatasetDef: properties: dashboards: anyOf: - items: - $ref: '#/components/schemas/RelatedDashboard' + $ref: '#/components/schemas/DashboardIdentifier' type: array - type: 'null' title: Dashboards @@ -1723,14 +2165,14 @@ components: slices: anyOf: - items: - $ref: '#/components/schemas/RelatedSlice' + $ref: '#/components/schemas/ChartIdentifier' type: array - type: 'null' title: Slices tables: anyOf: - items: - $ref: '#/components/schemas/RelatedTable' + $ref: '#/components/schemas/DatasetIdentifier' type: array - type: 'null' title: Tables @@ -1751,30 +2193,9 @@ components: - database_uuid title: SupersetMitMDatasetDef type: object - SupersetMitMDatasetImport: - properties: - base_assets: - anyOf: - - $ref: '#/components/schemas/SupersetAssetsImport' - - type: 'null' - metadata: - $ref: '#/components/schemas/SupersetMetadataDef' - mitm_datasets: - anyOf: - - items: - $ref: '#/components/schemas/SupersetMitMDatasetDef' - type: array - - type: 'null' - title: Mitm Datasets - required: - - mitm_datasets - - base_assets - title: SupersetMitMDatasetImport - type: object SupersetPostProcessing: properties: operation: - readOnly: true title: Operation type: string required: @@ -1793,6 +2214,15 @@ components: $ref: '#/components/schemas/SupersetDashboardDef' title: Dashboards type: array + viz_collections: + anyOf: + - additionalProperties: + additionalProperties: + $ref: '#/components/schemas/DashboardIdentifier' + type: object + type: object + - type: 'null' + title: Viz Collections title: SupersetVisualizationBundle type: object SupersetVizType: @@ -1800,6 +2230,7 @@ components: - pie - echarts_timeseries_bar - echarts_timeseries_line + - maed_custom title: SupersetVizType type: string TableIdentifier: @@ -1818,6 +2249,79 @@ components: - name title: TableIdentifier type: object + TableMetaInfoBase: + properties: + column_properties: + additionalProperties: + $ref: '#/components/schemas/ColumnProperties' + title: Column Properties + type: object + columns: + items: + type: string + title: Columns + type: array + foreign_key_constraints: + items: + $ref: '#/components/schemas/ForeignKeyConstraintBase' + title: Foreign Key Constraints + type: array + indexes: + anyOf: + - items: + items: + type: string + type: array + type: array + - type: 'null' + title: Indexes + name: + title: Name + type: string + primary_key: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Primary Key + schema_name: + default: main + title: Schema Name + type: string + sql_column_types: + items: + type: string + title: Sql Column Types + type: array + required: + - name + - columns + - sql_column_types + title: TableMetaInfoBase + type: object + TableProbeMinimal: + properties: + inferred_types: + additionalProperties: + $ref: '#/components/schemas/MITMDataType' + title: Inferred Types + type: object + row_count: + minimum: 0.0 + title: Row Count + type: integer + sample_summaries: + additionalProperties: + $ref: '#/components/schemas/SampleSummary' + title: Sample Summaries + type: object + required: + - row_count + - inferred_types + - sample_summaries + title: TableProbeMinimal + type: object TimeGrain: enum: - PT1S @@ -1848,10 +2352,16 @@ components: dataset_name: title: Dataset Name type: string - is_local: + identifier_bundle: + $ref: '#/components/schemas/MitMDatasetIdentifierBundle' + is_managed_locally: default: true - title: Is Local + title: Is Managed Locally type: boolean + last_edited: + format: date-time + title: Last Edited + type: string mitm_header: $ref: '#/components/schemas/Header-Output' schema_name: @@ -1871,6 +2381,7 @@ components: - schema_name - sql_alchemy_uri - mitm_header + - identifier_bundle title: TrackedMitMDataset type: object UploadMitMResponse: @@ -1915,6 +2426,40 @@ components: - type title: ValidationError type: object + VisualizationImportResponse: + properties: + charts: + anyOf: + - items: + $ref: '#/components/schemas/SupersetChartDef' + type: array + - type: 'null' + title: Charts + dashboards: + anyOf: + - items: + $ref: '#/components/schemas/SupersetDashboardDef' + type: array + - type: 'null' + title: Dashboards + databases: + anyOf: + - items: + $ref: '#/components/schemas/SupersetDatabaseDef' + type: array + - type: 'null' + title: Databases + datasets: + anyOf: + - items: + $ref: '#/components/schemas/SupersetDatasetDef' + type: array + - type: 'null' + title: Datasets + metadata: + $ref: '#/components/schemas/SupersetMetadataDef' + title: VisualizationImportResponse + type: object WrappedMITMDataType: properties: mitm: @@ -1938,16 +2483,78 @@ paths: schema: {} description: Successful Response summary: Root - /definitions/mitm_dataset: + /admin/clear-db: post: - operationId: generate_mitm_dataset_bundle + description: Clear the database. + operationId: clear_db + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ClearDBResponse' + description: Successful Response + summary: Clear Db + tags: + - admin + /data/db-meta/{uuid}: + get: + operationId: get_db_meta parameters: - - in: query - name: dataset_name + - in: path + name: uuid required: true schema: - title: Dataset Name + format: uuid + title: Uuid type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DBMetaResponse' + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Get Db Meta + tags: + - data + /data/db-probe/{uuid}: + get: + operationId: get_db_probe + parameters: + - in: path + name: uuid + required: true + schema: + format: uuid + title: Uuid + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DBProbeResponse' + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Get Db Probe + tags: + - data + /definitions/mitm_dataset: + post: + operationId: generate_mitm_dataset_bundle + parameters: - in: query name: include_visualizations required: false @@ -1959,14 +2566,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Body_generate_mitm_dataset_bundle_definitions_mitm_dataset_post' + $ref: '#/components/schemas/GenerateIndependentMitMDatasetDefinitionRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SupersetMitMDatasetBundle' + $ref: '#/components/schemas/MitMDatasetBundleResponse' description: Successful Response '422': content: @@ -1981,12 +2588,6 @@ paths: post: operationId: generate_mitm_dataset_import parameters: - - in: query - name: dataset_name - required: true - schema: - title: Dataset Name - type: string - in: query name: include_visualizations required: false @@ -1994,18 +2595,26 @@ paths: default: false title: Include Visualizations type: boolean + - in: query + name: override_metadata_type + required: false + schema: + anyOf: + - $ref: '#/components/schemas/MetadataType' + - type: 'null' + title: Override Metadata Type requestBody: content: application/json: schema: - $ref: '#/components/schemas/Body_generate_mitm_dataset_import_definitions_mitm_dataset_import_post' + $ref: '#/components/schemas/GenerateIndependentMitMDatasetDefinitionRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SupersetMitMDatasetImport' + $ref: '#/components/schemas/MitMDatasetImportResponse' description: Successful Response '422': content: @@ -2021,23 +2630,136 @@ paths: operationId: generate_mitm_dataset_import_zip parameters: - in: query - name: dataset_name + name: include_visualizations + required: false + schema: + default: false + title: Include Visualizations + type: boolean + - in: query + name: override_metadata_type + required: false + schema: + anyOf: + - $ref: '#/components/schemas/MetadataType' + - type: 'null' + title: Override Metadata Type + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateIndependentMitMDatasetDefinitionRequest' + required: true + responses: + '200': + content: + application/zip: {} + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Generate Mitm Dataset Import Zip + tags: + - definitions + /definitions/mitm_dataset/viz/{uuid}: + post: + operationId: generate_visualizations_for_tracked_dataset + parameters: + - in: path + name: uuid required: true schema: - title: Dataset Name + format: uuid + title: Uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateVisualizationsRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MitMDatasetBundleResponse' + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Generate Visualizations For Tracked Dataset + tags: + - definitions + /definitions/mitm_dataset/viz/{uuid}/import: + post: + operationId: generate_visualizations_import_for_tracked_dataset + parameters: + - in: path + name: uuid + required: true + schema: + format: uuid + title: Uuid type: string - in: query - name: include_visualizations + name: as_assets required: false schema: default: false - title: Include Visualizations + title: As Assets + type: boolean + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateVisualizationsRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/VisualizationImportResponse' + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Generate Visualizations Import For Tracked Dataset + tags: + - definitions + /definitions/mitm_dataset/viz/{uuid}/import/zip: + post: + operationId: generate_visualizations_import_zip_for_tracked_dataset + parameters: + - in: path + name: uuid + required: true + schema: + format: uuid + title: Uuid + type: string + - in: query + name: as_assets + required: false + schema: + default: false + title: As Assets type: boolean requestBody: content: application/json: schema: - $ref: '#/components/schemas/Body_generate_mitm_dataset_import_zip_definitions_mitm_dataset_import_zip_post' + $ref: '#/components/schemas/GenerateVisualizationsRequest' required: true responses: '200': @@ -2050,12 +2772,12 @@ paths: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error - summary: Generate Mitm Dataset Import Zip + summary: Generate Visualizations Import Zip For Tracked Dataset tags: - definitions - /definitions/mitm_dataset/{uuid}/: + /definitions/mitm_dataset/{uuid}: get: - operationId: generate_uploaded_mitm_dataset_bundle + operationId: generate_tracked_mitm_dataset_bundle parameters: - in: path name: uuid @@ -2076,7 +2798,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SupersetMitMDatasetBundle' + $ref: '#/components/schemas/MitMDatasetBundleResponse' description: Successful Response '422': content: @@ -2084,12 +2806,12 @@ paths: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error - summary: Generate Uploaded Mitm Dataset Bundle + summary: Generate Tracked Mitm Dataset Bundle tags: - definitions /definitions/mitm_dataset/{uuid}/import: get: - operationId: generate_uploaded_mitm_dataset_import + operationId: generate_tracked_mitm_dataset_import parameters: - in: path name: uuid @@ -2105,12 +2827,20 @@ paths: default: false title: Include Visualizations type: boolean + - in: query + name: override_metadata_type + required: false + schema: + anyOf: + - $ref: '#/components/schemas/MetadataType' + - type: 'null' + title: Override Metadata Type responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SupersetMitMDatasetImport' + $ref: '#/components/schemas/MitMDatasetImportResponse' description: Successful Response '422': content: @@ -2118,12 +2848,12 @@ paths: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error - summary: Generate Uploaded Mitm Dataset Import + summary: Generate Tracked Mitm Dataset Import tags: - definitions /definitions/mitm_dataset/{uuid}/import/zip: get: - operationId: generate_uploaded_mitm_dataset_import_zip + operationId: generate_tracked_mitm_dataset_import_zip parameters: - in: path name: uuid @@ -2139,6 +2869,14 @@ paths: default: false title: Include Visualizations type: boolean + - in: query + name: override_metadata_type + required: false + schema: + anyOf: + - $ref: '#/components/schemas/MetadataType' + - type: 'null' + title: Override Metadata Type responses: '200': content: @@ -2150,7 +2888,7 @@ paths: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error - summary: Generate Uploaded Mitm Dataset Import Zip + summary: Generate Tracked Mitm Dataset Import Zip tags: - definitions /health: @@ -2172,7 +2910,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/TrackedMitMDataset' + $ref: '#/components/schemas/ListTrackedMitMDataset' title: Response Get Mitm Datasets Mitm Dataset Get type: array description: Successful Response @@ -2191,7 +2929,8 @@ paths: '200': content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/TrackedMitMDataset' description: Successful Response '422': content: @@ -2202,6 +2941,31 @@ paths: summary: Post Mitm Dataset tags: - mitm_dataset + /mitm_dataset/export/{uuid}: + post: + operationId: export_mitm_dataset + parameters: + - in: path + name: uuid + required: true + schema: + format: uuid + title: Uuid + type: string + responses: + '200': + content: + application/zip: {} + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Export Mitm Dataset + tags: + - mitm_dataset /mitm_dataset/register: post: operationId: register_mitm_dataset diff --git a/test/export.http b/test/export.http index f7041db..ba58cff 100644 --- a/test/export.http +++ b/test/export.http @@ -3,4 +3,10 @@ // @name Export POST http://localhost:{{port}}/mitm_dataset/export/{{uuid}} -### \ No newline at end of file +### + +// @name Export Streaming +POST http://localhost:{{port}}/mitm_dataset/export/{{uuid}}?use_streaming=true + +###### + diff --git a/test/http-client.env.json b/test/http-client.env.json index dae25fc..5f385fd 100644 --- a/test/http-client.env.json +++ b/test/http-client.env.json @@ -1,7 +1,7 @@ { "dev": { "port": "8181", - "uuid": "8e8e00c1-edf1-4d56-863b-938ec8b07eb6" + "uuid": "f41c6400-abe3-4367-9375-67a8f713d299" }, "docker": { "port": "8180", @@ -9,7 +9,7 @@ }, "superset": { "port": "8180", - "uuid": "607d9d82-0435-4984-bdbf-6512960cd69f" + "uuid": "5b9bc5c0-7faf-4807-a098-573558a0e2a6" }, "kubernetes": { "port": "8080", diff --git a/test/superset-passthrough.http b/test/superset-passthrough.http index 4b91f98..66b7371 100644 --- a/test/superset-passthrough.http +++ b/test/superset-passthrough.http @@ -1,3 +1,3 @@ -GET http://localhost:8088/api/v1/mitm_service/call/health +GET http://localhost:8088/api/v1/ext_service/call/mitm/health ### \ No newline at end of file diff --git a/test/upload.http b/test/upload.http index d43706e..706b92c 100644 --- a/test/upload.http +++ b/test/upload.http @@ -30,7 +30,7 @@ Content-Type: multipart/form-data; boundary=WebAppBoundary Content-Disposition: form-data; name="mitm_zip"; filename="synthetic-variation.maed" Content-Type: application/zip -< ./synthetic.maed +< ./synthetic-trimmed.maed --WebAppBoundary-- ### -- GitLab