From a62a97150df9643f7678e9e19b5b00f9433626cc Mon Sep 17 00:00:00 2001 From: Daniel Vaz Gaspar Date: Tue, 11 Jan 2022 09:30:00 +0000 Subject: [PATCH] chore: use new FAB functionality for component schemas update OAS (#17967) * chore: use new FAB functionality for component schemas and update OpenAPI spec * remove unused import * fix spec and lint * EOF fix * update open api spec with latest master --- docs/src/resources/openapi.json | 8504 +++++++++++++++-------- superset/cli.py | 5 +- superset/dashboards/filter_state/api.py | 6 +- superset/views/base_api.py | 31 +- 4 files changed, 5562 insertions(+), 2984 deletions(-) diff --git a/docs/src/resources/openapi.json b/docs/src/resources/openapi.json index 7913a24f6a8b9..52201d1b5d903 100644 --- a/docs/src/resources/openapi.json +++ b/docs/src/resources/openapi.json @@ -156,6 +156,7 @@ }, "showLabel": { "description": "Should the label always be shown", + "nullable": true, "type": "boolean" }, "showMarkers": { @@ -205,7 +206,6 @@ "required": [ "name", "show", - "showLabel", "showMarkers", "value" ], @@ -232,7 +232,7 @@ "AnnotationLayerRestApi.get_list": { "properties": { "changed_by": { - "$ref": "#/components/schemas/Meta4" + "$ref": "#/components/schemas/AnnotationLayerRestApi.get_list.User1" }, "changed_on": { "format": "date-time", @@ -243,7 +243,7 @@ "readOnly": true }, "created_by": { - "$ref": "#/components/schemas/Meta3" + "$ref": "#/components/schemas/AnnotationLayerRestApi.get_list.User" }, "created_on": { "format": "date-time", @@ -266,6 +266,40 @@ }, "type": "object" }, + "AnnotationLayerRestApi.get_list.User": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "last_name": { + "maxLength": 64, + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "type": "object" + }, + "AnnotationLayerRestApi.get_list.User1": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "last_name": { + "maxLength": 64, + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "type": "object" + }, "AnnotationLayerRestApi.post": { "properties": { "descr": { @@ -280,6 +314,9 @@ "type": "string" } }, + "required": [ + "name" + ], "type": "object" }, "AnnotationLayerRestApi.put": { @@ -313,7 +350,7 @@ "type": "string" }, "layer": { - "$ref": "#/components/schemas/Meta2" + "$ref": "#/components/schemas/AnnotationRestApi.get.AnnotationLayer" }, "long_descr": { "nullable": true, @@ -335,16 +372,30 @@ ], "type": "object" }, + "AnnotationRestApi.get.AnnotationLayer": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + }, + "name": { + "maxLength": 250, + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, "AnnotationRestApi.get_list": { "properties": { "changed_by": { - "$ref": "#/components/schemas/Meta1" + "$ref": "#/components/schemas/AnnotationRestApi.get_list.User1" }, "changed_on_delta_humanized": { "readOnly": true }, "created_by": { - "$ref": "#/components/schemas/Meta" + "$ref": "#/components/schemas/AnnotationRestApi.get_list.User" }, "end_dttm": { "format": "date-time", @@ -372,6 +423,38 @@ }, "type": "object" }, + "AnnotationRestApi.get_list.User": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "first_name" + ], + "type": "object" + }, + "AnnotationRestApi.get_list.User1": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "first_name" + ], + "type": "object" + }, "AnnotationRestApi.post": { "properties": { "end_dttm": { @@ -401,6 +484,11 @@ "type": "string" } }, + "required": [ + "end_dttm", + "short_descr", + "start_dttm" + ], "type": "object" }, "AnnotationRestApi.put": { @@ -412,10 +500,12 @@ }, "json_metadata": { "description": "JSON metadata", + "nullable": true, "type": "string" }, "long_descr": { "description": "A long description", + "nullable": true, "type": "string" }, "short_descr": { @@ -535,6 +625,10 @@ "example": true, "type": "boolean" }, + "isExtra": { + "description": "Indicates if the filter has been added by a filter component as opposed to being a part of the original query.", + "type": "boolean" + }, "label": { "description": "Label for the metric. Is automatically generated unless hasCustomLabel is true, in which case label must be defined.", "example": "Weighted observations", @@ -549,6 +643,11 @@ "description": "The metric as defined by a SQL aggregate expression. Only required for SQL expression type.", "example": "SUM(weight * observations) / SUM(weight)", "type": "string" + }, + "timeGrain": { + "description": "Optional time grain for temporal filters", + "example": "PT1M", + "type": "string" } }, "required": [ @@ -613,6 +712,7 @@ "metrics": { "description": "Aggregate expressions. Metrics can be passed as both references to datasource metrics (strings), or ad-hoc metricswhich are defined only within the query object. See `ChartDataAdhocMetricSchema` for the structure of ad-hoc metrics.", "items": {}, + "nullable": true, "type": "array" }, "percentiles": { @@ -766,10 +866,18 @@ "ChartDataFilter": { "properties": { "col": { - "description": "The column to filter.", - "example": "country", + "description": "The column to filter by. Can be either a string (physical or saved expression) or an object (adhoc column)", + "example": "country" + }, + "grain": { + "description": "Optional time grain for temporal filters", + "example": "PT1M", "type": "string" }, + "isExtra": { + "description": "Indicates if the filter has been added by a filter component as opposed to being a part of the original query.", + "type": "boolean" + }, "op": { "description": "The comparison operator.", "enum": [ @@ -897,8 +1005,8 @@ "type": "string" }, "columns": { + "description": "Columns to group by on the table columns", "items": { - "description": "Columns to group by on the table columns", "type": "string" }, "type": "array" @@ -940,7 +1048,8 @@ "select", "sort", "diff", - "compare" + "compare", + "resample" ], "example": "aggregate", "type": "string" @@ -1044,6 +1153,9 @@ "description": "Should the queries be forced to load from the source. Default: `false`", "type": "boolean" }, + "form_data": { + "nullable": true + }, "queries": { "items": { "$ref": "#/components/schemas/ChartDataQueryObject" @@ -1080,9 +1192,7 @@ }, "columns": { "description": "Columns which to select in the query.", - "items": { - "type": "string" - }, + "items": {}, "nullable": true, "type": "array" }, @@ -1126,10 +1236,8 @@ "type": "string" }, "groupby": { - "items": { - "description": "Columns by which to group the query.", - "type": "string" - }, + "description": "Columns by which to group the query. This field is deprecated, use `columns` instead.", + "items": {}, "nullable": true, "type": "array" }, @@ -1213,6 +1321,22 @@ "nullable": true, "type": "integer" }, + "series_columns": { + "description": "Columns to use when limiting series count. All columns must be present in the `columns` property. Requires `series_limit` and `series_limit_metric` to be set.", + "items": {}, + "nullable": true, + "type": "array" + }, + "series_limit": { + "description": "Maximum number of series. Requires `series` and `series_limit_metric` to be set.", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "series_limit_metric": { + "description": "Metric used to limit timeseries queries by. Requires `series` and `series_limit` to be set.", + "nullable": true + }, "time_offsets": { "items": { "type": "string" @@ -1232,13 +1356,13 @@ "type": "string" }, "timeseries_limit": { - "description": "Maximum row count for timeseries queries. Default: `0`", + "description": "Maximum row count for timeseries queries. This field is deprecated, use `series_limit` instead.Default: `0`", "format": "int32", "nullable": true, "type": "integer" }, "timeseries_limit_metric": { - "description": "Metric used to limit timeseries queries by.", + "description": "Metric used to limit timeseries queries by. This field is deprecated, use `series_limit_metric` instead.", "nullable": true }, "url_params": { @@ -1294,6 +1418,21 @@ "nullable": true, "type": "string" }, + "colnames": { + "description": "A list of column names", + "items": { + "type": "string" + }, + "type": "array" + }, + "coltypes": { + "description": "A list of generic data types of each column", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, "data": { "description": "A list with results", "items": { @@ -1306,6 +1445,11 @@ "nullable": true, "type": "string" }, + "from_dttm": { + "format": "int32", + "nullable": true, + "type": "integer" + }, "is_cached": { "description": "Is the result cached", "type": "boolean" @@ -1342,6 +1486,11 @@ "timed_out" ], "type": "string" + }, + "to_dttm": { + "format": "int32", + "nullable": true, + "type": "integer" } }, "required": [ @@ -1365,299 +1514,113 @@ }, "type": "object" }, - "ChartDataRollingOptionsSchema": { + "ChartDataRestApi.get": { "properties": { - "center": { - "description": "Should the label be at the center of the window. Default: `false`", - "example": false, - "type": "boolean" - }, - "min_periods": { - "description": "The minimum amount of periods required for a row to be included in the result set.", - "example": 7, + "cache_timeout": { "format": "int32", + "nullable": true, "type": "integer" }, - "rolling_type": { - "description": "Type of rolling window. Any numpy function will work.", - "enum": [ - "average", - "argmin", - "argmax", - "cumsum", - "cumprod", - "max", - "mean", - "median", - "nansum", - "nanmin", - "nanmax", - "nanmean", - "nanmedian", - "nanpercentile", - "min", - "percentile", - "prod", - "product", - "std", - "sum", - "var" - ], - "example": "percentile", + "certification_details": { + "nullable": true, "type": "string" }, - "rolling_type_options": { - "example": {}, - "type": "object" + "certified_by": { + "nullable": true, + "type": "string" }, - "win_type": { - "description": "Type of window function. See [SciPy window functions](https://docs.scipy.org/doc/scipy/reference/signal.windows.html#module-scipy.signal.windows) for more details. Some window functions require passing additional parameters to `rolling_type_options`. For instance, to use `gaussian`, the parameter `std` needs to be provided.", - "enum": [ - "boxcar", - "triang", - "blackman", - "hamming", - "bartlett", - "parzen", - "bohman", - "blackmanharris", - "nuttall", - "barthann", - "kaiser", - "gaussian", - "general_gaussian", - "slepian", - "exponential" - ], + "dashboards": { + "$ref": "#/components/schemas/ChartDataRestApi.get.Dashboard" + }, + "description": { + "nullable": true, "type": "string" }, - "window": { - "description": "Size of the rolling window in days.", - "example": 7, + "owners": { + "$ref": "#/components/schemas/ChartDataRestApi.get.User" + }, + "params": { + "nullable": true, + "type": "string" + }, + "query_context": { + "nullable": true, + "type": "string" + }, + "slice_name": { + "maxLength": 250, + "nullable": true, + "type": "string" + }, + "viz_type": { + "maxLength": 250, + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "ChartDataRestApi.get.Dashboard": { + "properties": { + "dashboard_title": { + "maxLength": 500, + "nullable": true, + "type": "string" + }, + "id": { "format": "int32", "type": "integer" + }, + "json_metadata": { + "nullable": true, + "type": "string" } }, - "required": [ - "rolling_type", - "window" - ], "type": "object" }, - "ChartDataSelectOptionsSchema": { + "ChartDataRestApi.get.User": { "properties": { - "columns": { - "description": "Columns which to select from the input data, in the desired order. If columns are renamed, the original column name should be referenced here.", - "example": [ - "country", - "gender", - "age" - ], - "items": { - "type": "string" - }, - "type": "array" + "first_name": { + "maxLength": 64, + "type": "string" }, - "exclude": { - "description": "Columns to exclude from selection.", - "example": [ - "my_temp_column" - ], - "items": { - "type": "string" - }, - "type": "array" - }, - "rename": { - "description": "columns which to rename, mapping source column to target column. For instance, `{'y': 'y2'}` will rename the column `y` to `y2`.", - "example": [ - { - "age": "average_age" - } - ], - "items": { - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "ChartDataSortOptionsSchema": { - "properties": { - "aggregates": { - "description": "The keys are the name of the aggregate column to be created, and the values specify the details of how to apply the aggregation. If an operator requires additional options, these can be passed here to be unpacked in the operator call. The following numpy operators are supported: average, argmin, argmax, cumsum, cumprod, max, mean, median, nansum, nanmin, nanmax, nanmean, nanmedian, min, percentile, prod, product, std, sum, var. Any options required by the operator can be passed to the `options` object.\n\nIn the example, a new column `first_quantile` is created based on values in the column `my_col` using the `percentile` operator with the `q=0.25` parameter.", - "example": { - "first_quantile": { - "column": "my_col", - "operator": "percentile", - "options": { - "q": 0.25 - } - } - }, - "type": "object" - }, - "columns": { - "description": "columns by by which to sort. The key specifies the column name, value specifies if sorting in ascending order.", - "example": { - "country": true, - "gender": false - }, - "type": "object" - } - }, - "required": [ - "columns" - ], - "type": "object" - }, - "ChartEntityResponseSchema": { - "properties": { - "cache_timeout": { - "description": "Duration (in seconds) of the caching timeout for this chart. Note this defaults to the datasource/table timeout if undefined.", - "format": "int32", - "type": "integer" - }, - "changed_on": { - "description": "The ISO date that the chart was last changed.", - "type": "string" - }, - "datasource": { - "description": "The datasource name.", - "type": "string" - }, - "description": { - "description": "A description of the chart propose.", - "type": "string" - }, - "description_markeddown": { - "description": "Sanitized HTML version of the chart description.", - "type": "string" - }, - "form_data": { - "description": "Form data from the Explore controls used to form the chart's data query.", - "type": "object" - }, - "modified": { - "type": "string" - }, - "slice_id": { - "format": "int32", - "type": "integer" - }, - "slice_name": { - "description": "The name of the chart.", - "type": "string" - }, - "slice_url": { - "description": "The URL of the chart.", - "type": "string" - } - }, - "type": "object" - }, - "ChartFavStarResponseResult": { - "properties": { "id": { - "description": "The Chart id", - "format": "int32", - "type": "integer" - }, - "value": { - "description": "The FaveStar value", - "type": "boolean" - } - }, - "type": "object" - }, - "ChartGetDatasourceObjectDataResponse": { - "properties": { - "datasource_id": { - "description": "The datasource identifier", "format": "int32", "type": "integer" }, - "datasource_type": { - "description": "The datasource type", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ChartGetDatasourceObjectResponse": { - "properties": { - "label": { - "description": "The name of the datasource", + "last_name": { + "maxLength": 64, "type": "string" }, - "value": { - "$ref": "#/components/schemas/ChartGetDatasourceObjectDataResponse" - } - }, - "type": "object" - }, - "ChartGetDatasourceResponseSchema": { - "properties": { - "count": { - "description": "The total number of datasources", - "format": "int32", - "type": "integer" - }, - "result": { - "$ref": "#/components/schemas/ChartGetDatasourceObjectResponse" + "username": { + "maxLength": 64, + "type": "string" } }, + "required": [ + "first_name", + "last_name", + "username" + ], "type": "object" }, - "ChartRestApi.get": { + "ChartDataRestApi.get_list": { "properties": { "cache_timeout": { "format": "int32", "nullable": true, "type": "integer" }, - "dashboards": { - "$ref": "#/components/schemas/Meta9" - }, - "description": { - "nullable": true, - "type": "string" - }, - "owners": { - "$ref": "#/components/schemas/Meta10" - }, - "params": { - "nullable": true, - "type": "string" - }, - "query_context": { - "nullable": true, - "type": "string" - }, - "slice_name": { - "maxLength": 250, + "certification_details": { "nullable": true, "type": "string" }, - "viz_type": { - "maxLength": 250, + "certified_by": { "nullable": true, "type": "string" - } - }, - "type": "object" - }, - "ChartRestApi.get_list": { - "properties": { - "cache_timeout": { - "format": "int32", - "nullable": true, - "type": "integer" }, "changed_by": { - "$ref": "#/components/schemas/Meta8" + "$ref": "#/components/schemas/ChartDataRestApi.get_list.User2" }, "changed_by_name": { "readOnly": true @@ -1672,7 +1635,7 @@ "readOnly": true }, "created_by": { - "$ref": "#/components/schemas/Meta5" + "$ref": "#/components/schemas/ChartDataRestApi.get_list.User1" }, "datasource_id": { "format": "int32", @@ -1704,8 +1667,16 @@ "format": "int32", "type": "integer" }, + "last_saved_at": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "last_saved_by": { + "$ref": "#/components/schemas/ChartDataRestApi.get_list.User3" + }, "owners": { - "$ref": "#/components/schemas/Meta7" + "$ref": "#/components/schemas/ChartDataRestApi.get_list.User" }, "params": { "nullable": true, @@ -1717,7 +1688,7 @@ "type": "string" }, "table": { - "$ref": "#/components/schemas/Meta6" + "$ref": "#/components/schemas/ChartDataRestApi.get_list.SqlaTable" }, "thumbnail_url": { "readOnly": true @@ -1733,54 +1704,165 @@ }, "type": "object" }, - "ChartRestApi.post": { + "ChartDataRestApi.get_list.SqlaTable": { "properties": { - "cache_timeout": { - "description": "Duration (in seconds) of the caching timeout for this chart. Note this defaults to the datasource/table timeout if undefined.", - "format": "int32", + "default_endpoint": { "nullable": true, - "type": "integer" + "type": "string" }, - "dashboards": { - "items": { - "description": "A list of dashboards to include this new chart to.", - "format": "int32", - "type": "integer" - }, - "type": "array" + "table_name": { + "maxLength": 250, + "type": "string" + } + }, + "required": [ + "table_name" + ], + "type": "object" + }, + "ChartDataRestApi.get_list.User": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" }, - "datasource_id": { - "description": "The id of the dataset/datasource this new chart will use. A complete datasource identification needs `datasouce_id` and `datasource_type`.", + "id": { "format": "int32", "type": "integer" }, - "datasource_name": { - "description": "The datasource name.", - "nullable": true, + "last_name": { + "maxLength": 64, "type": "string" }, - "datasource_type": { - "description": "The type of dataset/datasource identified on `datasource_id`.", - "enum": [ - "druid", - "table", - "view" - ], + "username": { + "maxLength": 64, "type": "string" - }, - "description": { - "description": "A description of the chart propose.", - "nullable": true, + } + }, + "required": [ + "first_name", + "last_name", + "username" + ], + "type": "object" + }, + "ChartDataRestApi.get_list.User1": { + "properties": { + "first_name": { + "maxLength": 64, "type": "string" }, - "owners": { - "items": { - "description": "Owner are users ids allowed to delete or change this chart. If left empty you will be one of the owners of the chart.", - "format": "int32", - "type": "integer" - }, - "type": "array" - }, + "id": { + "format": "int32", + "type": "integer" + }, + "last_name": { + "maxLength": 64, + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "type": "object" + }, + "ChartDataRestApi.get_list.User2": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "last_name": { + "maxLength": 64, + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "type": "object" + }, + "ChartDataRestApi.get_list.User3": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "last_name": { + "maxLength": 64, + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "type": "object" + }, + "ChartDataRestApi.post": { + "properties": { + "cache_timeout": { + "description": "Duration (in seconds) of the caching timeout for this chart. Note this defaults to the datasource/table timeout if undefined.", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "certification_details": { + "description": "Details of the certification", + "nullable": true, + "type": "string" + }, + "certified_by": { + "description": "Person or group that has certified this chart", + "nullable": true, + "type": "string" + }, + "dashboards": { + "items": { + "description": "A list of dashboards to include this new chart to.", + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "datasource_id": { + "description": "The id of the dataset/datasource this new chart will use. A complete datasource identification needs `datasouce_id` and `datasource_type`.", + "format": "int32", + "type": "integer" + }, + "datasource_name": { + "description": "The datasource name.", + "nullable": true, + "type": "string" + }, + "datasource_type": { + "description": "The type of dataset/datasource identified on `datasource_id`.", + "enum": [ + "druid", + "table", + "view" + ], + "type": "string" + }, + "description": { + "description": "A description of the chart propose.", + "nullable": true, + "type": "string" + }, + "owners": { + "items": { + "description": "Owner are users ids allowed to delete or change this chart. If left empty you will be one of the owners of the chart.", + "format": "int32", + "type": "integer" + }, + "type": "array" + }, "params": { "description": "Parameters are generated dynamically when clicking the save or overwrite button in the explore view. This JSON object for power users who may want to alter specific parameters.", "nullable": true, @@ -1791,6 +1873,11 @@ "nullable": true, "type": "string" }, + "query_context_generation": { + "description": "The query context generation represents whether the query_contextis user generated or not so that it does not update user modfiedstate.", + "nullable": true, + "type": "boolean" + }, "slice_name": { "description": "The name of the chart.", "maxLength": 250, @@ -1817,7 +1904,7 @@ ], "type": "object" }, - "ChartRestApi.put": { + "ChartDataRestApi.put": { "properties": { "cache_timeout": { "description": "Duration (in seconds) of the caching timeout for this chart. Note this defaults to the datasource/table timeout if undefined.", @@ -1825,6 +1912,16 @@ "nullable": true, "type": "integer" }, + "certification_details": { + "description": "Details of the certification", + "nullable": true, + "type": "string" + }, + "certified_by": { + "description": "Person or group that has certified this chart", + "nullable": true, + "type": "string" + }, "dashboards": { "items": { "description": "A list of dashboards to include this new chart to.", @@ -1872,6 +1969,11 @@ "nullable": true, "type": "string" }, + "query_context_generation": { + "description": "The query context generation represents whether the query_contextis user generated or not so that it does not update user modfiedstate.", + "nullable": true, + "type": "boolean" + }, "slice_name": { "description": "The name of the chart.", "maxLength": 250, @@ -1895,314 +1997,363 @@ }, "type": "object" }, - "CssTemplateRestApi.get": { + "ChartDataRollingOptionsSchema": { "properties": { - "created_by": { - "$ref": "#/components/schemas/Meta13" - }, - "css": { - "nullable": true, - "type": "string" + "center": { + "description": "Should the label be at the center of the window. Default: `false`", + "example": false, + "type": "boolean" }, - "id": { + "min_periods": { + "description": "The minimum amount of periods required for a row to be included in the result set.", + "example": 7, "format": "int32", "type": "integer" }, - "template_name": { - "maxLength": 250, - "nullable": true, + "rolling_type": { + "description": "Type of rolling window. Any numpy function will work.", + "enum": [ + "average", + "argmin", + "argmax", + "cumsum", + "cumprod", + "max", + "mean", + "median", + "nansum", + "nanmin", + "nanmax", + "nanmean", + "nanmedian", + "nanpercentile", + "min", + "percentile", + "prod", + "product", + "std", + "sum", + "var" + ], + "example": "percentile", "type": "string" - } - }, - "type": "object" - }, - "CssTemplateRestApi.get_list": { - "properties": { - "changed_by": { - "$ref": "#/components/schemas/Meta12" }, - "changed_on_delta_humanized": { - "readOnly": true - }, - "created_by": { - "$ref": "#/components/schemas/Meta11" - }, - "created_on": { - "format": "date-time", - "nullable": true, - "type": "string" + "rolling_type_options": { + "example": {}, + "type": "object" }, - "css": { - "nullable": true, + "win_type": { + "description": "Type of window function. See [SciPy window functions](https://docs.scipy.org/doc/scipy/reference/signal.windows.html#module-scipy.signal.windows) for more details. Some window functions require passing additional parameters to `rolling_type_options`. For instance, to use `gaussian`, the parameter `std` needs to be provided.", + "enum": [ + "boxcar", + "triang", + "blackman", + "hamming", + "bartlett", + "parzen", + "bohman", + "blackmanharris", + "nuttall", + "barthann", + "kaiser", + "gaussian", + "general_gaussian", + "slepian", + "exponential" + ], "type": "string" }, - "id": { + "window": { + "description": "Size of the rolling window in days.", + "example": 7, "format": "int32", "type": "integer" - }, - "template_name": { - "maxLength": 250, - "nullable": true, - "type": "string" } }, + "required": [ + "rolling_type", + "window" + ], "type": "object" }, - "CssTemplateRestApi.post": { + "ChartDataSelectOptionsSchema": { "properties": { - "css": { - "nullable": true, - "type": "string" + "columns": { + "description": "Columns which to select from the input data, in the desired order. If columns are renamed, the original column name should be referenced here.", + "example": [ + "country", + "gender", + "age" + ], + "items": { + "type": "string" + }, + "type": "array" }, - "template_name": { - "maxLength": 250, - "nullable": true, - "type": "string" + "exclude": { + "description": "Columns to exclude from selection.", + "example": [ + "my_temp_column" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "rename": { + "description": "columns which to rename, mapping source column to target column. For instance, `{'y': 'y2'}` will rename the column `y` to `y2`.", + "example": [ + { + "age": "average_age" + } + ], + "items": { + "type": "object" + }, + "type": "array" } }, "type": "object" }, - "CssTemplateRestApi.put": { + "ChartDataSortOptionsSchema": { "properties": { - "css": { - "nullable": true, - "type": "string" + "aggregates": { + "description": "The keys are the name of the aggregate column to be created, and the values specify the details of how to apply the aggregation. If an operator requires additional options, these can be passed here to be unpacked in the operator call. The following numpy operators are supported: average, argmin, argmax, cumsum, cumprod, max, mean, median, nansum, nanmin, nanmax, nanmean, nanmedian, min, percentile, prod, product, std, sum, var. Any options required by the operator can be passed to the `options` object.\n\nIn the example, a new column `first_quantile` is created based on values in the column `my_col` using the `percentile` operator with the `q=0.25` parameter.", + "example": { + "first_quantile": { + "column": "my_col", + "operator": "percentile", + "options": { + "q": 0.25 + } + } + }, + "type": "object" }, - "template_name": { - "maxLength": 250, - "nullable": true, - "type": "string" + "columns": { + "description": "columns by by which to sort. The key specifies the column name, value specifies if sorting in ascending order.", + "example": { + "country": true, + "gender": false + }, + "type": "object" } }, + "required": [ + "columns" + ], "type": "object" }, - "DashboardDatasetSchema": { + "ChartEntityResponseSchema": { "properties": { "cache_timeout": { + "description": "Duration (in seconds) of the caching timeout for this chart. Note this defaults to the datasource/table timeout if undefined.", "format": "int32", "type": "integer" }, - "column_formats": { - "type": "object" - }, - "column_types": { - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "columns": { - "items": { - "type": "object" - }, - "type": "array" - }, - "database": { - "$ref": "#/components/schemas/Database" + "certification_details": { + "description": "Details of the certification", + "type": "string" }, - "datasource_name": { + "certified_by": { + "description": "Person or group that has certified this chart", "type": "string" }, - "default_endpoint": { + "changed_on": { + "description": "The ISO date that the chart was last changed.", "type": "string" }, - "edit_url": { + "description": { + "description": "A description of the chart propose.", "type": "string" }, - "fetch_values_predicate": { + "description_markeddown": { + "description": "Sanitized HTML version of the chart description.", "type": "string" }, - "filter_select": { - "type": "boolean" + "form_data": { + "description": "Form data from the Explore controls used to form the chart's data query.", + "type": "object" }, - "filter_select_enabled": { - "type": "boolean" + "modified": { + "type": "string" }, - "granularity_sqla": { - "items": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": "array" + "slice_id": { + "format": "int32", + "type": "integer" }, - "health_check_message": { + "slice_name": { + "description": "The name of the chart.", "type": "string" }, + "slice_url": { + "description": "The URL of the chart.", + "type": "string" + } + }, + "type": "object" + }, + "ChartFavStarResponseResult": { + "properties": { "id": { + "description": "The Chart id", "format": "int32", "type": "integer" }, - "is_sqllab_view": { + "value": { + "description": "The FaveStar value", "type": "boolean" + } + }, + "type": "object" + }, + "ChartGetDatasourceObjectDataResponse": { + "properties": { + "datasource_id": { + "description": "The datasource identifier", + "format": "int32", + "type": "integer" }, - "main_dttm_col": { - "type": "string" - }, - "metrics": { - "items": { - "type": "object" - }, - "type": "array" - }, - "name": { + "datasource_type": { + "description": "The datasource type", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ChartGetDatasourceObjectResponse": { + "properties": { + "label": { + "description": "The name of the datasource", "type": "string" }, - "offset": { + "value": { + "$ref": "#/components/schemas/ChartGetDatasourceObjectDataResponse" + } + }, + "type": "object" + }, + "ChartGetDatasourceResponseSchema": { + "properties": { + "count": { + "description": "The total number of datasources", "format": "int32", "type": "integer" }, - "order_by_choices": { - "items": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": "array" - }, - "owners": { - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" + "result": { + "$ref": "#/components/schemas/ChartGetDatasourceObjectResponse" + } + }, + "type": "object" + }, + "ChartRestApi.get": { + "properties": { + "cache_timeout": { + "format": "int32", + "nullable": true, + "type": "integer" }, - "params": { + "certification_details": { + "nullable": true, "type": "string" }, - "perm": { + "certified_by": { + "nullable": true, "type": "string" }, - "schema": { - "type": "string" + "dashboards": { + "$ref": "#/components/schemas/ChartRestApi.get.Dashboard" }, - "select_star": { + "description": { + "nullable": true, "type": "string" }, - "sql": { - "type": "string" + "owners": { + "$ref": "#/components/schemas/ChartRestApi.get.User" }, - "table_name": { + "params": { + "nullable": true, "type": "string" }, - "template_params": { + "query_context": { + "nullable": true, "type": "string" }, - "time_grain_sqla": { - "items": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": "array" - }, - "type": { + "slice_name": { + "maxLength": 250, + "nullable": true, "type": "string" }, - "uid": { + "viz_type": { + "maxLength": 250, + "nullable": true, "type": "string" - }, - "verbose_map": { - "additionalProperties": { - "type": "string" - }, - "type": "object" } }, "type": "object" }, - "DashboardGetResponseSchema": { + "ChartRestApi.get.Dashboard": { "properties": { - "changed_by": { - "$ref": "#/components/schemas/User" - }, - "changed_by_name": { - "type": "string" - }, - "changed_by_url": { - "type": "string" - }, - "changed_on": { - "format": "date-time", - "type": "string" - }, - "changed_on_delta_humanized": { + "dashboard_title": { + "maxLength": 500, + "nullable": true, "type": "string" }, - "charts": { - "items": { - "description": "The names of the dashboard's charts. Names are used for legacy reasons.", - "type": "string" - }, - "type": "array" + "id": { + "format": "int32", + "type": "integer" }, - "css": { - "description": "Override CSS for the dashboard.", + "json_metadata": { + "nullable": true, "type": "string" - }, - "dashboard_title": { - "description": "A title for the dashboard.", + } + }, + "type": "object" + }, + "ChartRestApi.get.User": { + "properties": { + "first_name": { + "maxLength": 64, "type": "string" }, "id": { "format": "int32", "type": "integer" }, - "json_metadata": { - "description": "This JSON object is generated dynamically when clicking the save or overwrite button in the dashboard view. It is exposed here for reference and for power users who may want to alter specific parameters.", + "last_name": { + "maxLength": 64, "type": "string" }, - "owners": { - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array" - }, - "position_json": { - "description": "This json object describes the positioning of the widgets in the dashboard. It is dynamically generated when adjusting the widgets size and positions by using drag & drop in the dashboard view", - "type": "string" - }, - "published": { - "type": "boolean" - }, - "roles": { - "items": { - "$ref": "#/components/schemas/Roles" - }, - "type": "array" - }, - "slug": { - "type": "string" - }, - "table_names": { - "type": "string" - }, - "thumbnail_url": { - "type": "string" - }, - "url": { + "username": { + "maxLength": 64, "type": "string" } }, + "required": [ + "first_name", + "last_name", + "username" + ], "type": "object" }, - "DashboardRestApi.get": { + "ChartRestApi.get_list": { "properties": { - "id": { + "cache_timeout": { "format": "int32", + "nullable": true, "type": "integer" - } - }, - "type": "object" - }, - "DashboardRestApi.get_list": { - "properties": { + }, + "certification_details": { + "nullable": true, + "type": "string" + }, + "certified_by": { + "nullable": true, + "type": "string" + }, "changed_by": { - "$ref": "#/components/schemas/Meta15" + "$ref": "#/components/schemas/ChartRestApi.get_list.User2" }, "changed_by_name": { "readOnly": true @@ -2217,340 +2368,374 @@ "readOnly": true }, "created_by": { - "$ref": "#/components/schemas/Meta14" + "$ref": "#/components/schemas/ChartRestApi.get_list.User1" }, - "css": { + "datasource_id": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "datasource_name_text": { + "readOnly": true + }, + "datasource_type": { + "maxLength": 200, "nullable": true, "type": "string" }, - "dashboard_title": { - "maxLength": 500, + "datasource_url": { + "readOnly": true + }, + "description": { "nullable": true, "type": "string" }, + "description_markeddown": { + "readOnly": true + }, + "edit_url": { + "readOnly": true + }, "id": { "format": "int32", "type": "integer" }, - "json_metadata": { + "last_saved_at": { + "format": "date-time", "nullable": true, "type": "string" }, + "last_saved_by": { + "$ref": "#/components/schemas/ChartRestApi.get_list.User3" + }, "owners": { - "$ref": "#/components/schemas/Meta17" + "$ref": "#/components/schemas/ChartRestApi.get_list.User" }, - "position_json": { + "params": { "nullable": true, "type": "string" }, - "published": { - "nullable": true, - "type": "boolean" - }, - "roles": { - "$ref": "#/components/schemas/Meta16" - }, - "slug": { - "maxLength": 255, + "slice_name": { + "maxLength": 250, "nullable": true, "type": "string" }, - "status": { - "readOnly": true + "table": { + "$ref": "#/components/schemas/ChartRestApi.get_list.SqlaTable" }, "thumbnail_url": { "readOnly": true }, "url": { "readOnly": true + }, + "viz_type": { + "maxLength": 250, + "nullable": true, + "type": "string" } }, "type": "object" }, - "DashboardRestApi.post": { + "ChartRestApi.get_list.SqlaTable": { "properties": { - "css": { - "type": "string" - }, - "dashboard_title": { - "description": "A title for the dashboard.", - "maxLength": 500, - "minLength": 0, + "default_endpoint": { "nullable": true, "type": "string" }, - "json_metadata": { - "description": "This JSON object is generated dynamically when clicking the save or overwrite button in the dashboard view. It is exposed here for reference and for power users who may want to alter specific parameters.", - "type": "string" - }, - "owners": { - "items": { - "description": "Owner are users ids allowed to delete or change this dashboard. If left empty you will be one of the owners of the dashboard.", - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "position_json": { - "description": "This json object describes the positioning of the widgets in the dashboard. It is dynamically generated when adjusting the widgets size and positions by using drag & drop in the dashboard view", - "type": "string" - }, - "published": { - "description": "Determines whether or not this dashboard is visible in the list of all dashboards.", - "type": "boolean" - }, - "roles": { - "items": { - "description": "Roles is a list which defines access to the dashboard. These roles are always applied in addition to restrictions on dataset level access. If no roles defined then the dashboard is available to all roles.", - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "slug": { - "description": "Unique identifying part for the web address of the dashboard.", - "maxLength": 255, - "minLength": 1, - "nullable": true, + "table_name": { + "maxLength": 250, "type": "string" } }, + "required": [ + "table_name" + ], "type": "object" }, - "DashboardRestApi.put": { + "ChartRestApi.get_list.User": { "properties": { - "css": { - "description": "Override CSS for the dashboard.", - "nullable": true, - "type": "string" - }, - "dashboard_title": { - "description": "A title for the dashboard.", - "maxLength": 500, - "minLength": 0, - "nullable": true, - "type": "string" - }, - "json_metadata": { - "description": "This JSON object is generated dynamically when clicking the save or overwrite button in the dashboard view. It is exposed here for reference and for power users who may want to alter specific parameters.", - "nullable": true, + "first_name": { + "maxLength": 64, "type": "string" }, - "owners": { - "items": { - "description": "Owner are users ids allowed to delete or change this dashboard. If left empty you will be one of the owners of the dashboard.", - "format": "int32", - "nullable": true, - "type": "integer" - }, - "type": "array" + "id": { + "format": "int32", + "type": "integer" }, - "position_json": { - "description": "This json object describes the positioning of the widgets in the dashboard. It is dynamically generated when adjusting the widgets size and positions by using drag & drop in the dashboard view", - "nullable": true, + "last_name": { + "maxLength": 64, "type": "string" }, - "published": { - "description": "Determines whether or not this dashboard is visible in the list of all dashboards.", - "nullable": true, - "type": "boolean" - }, - "roles": { - "items": { - "description": "Roles is a list which defines access to the dashboard. These roles are always applied in addition to restrictions on dataset level access. If no roles defined then the dashboard is available to all roles.", - "format": "int32", - "nullable": true, - "type": "integer" - }, - "type": "array" - }, - "slug": { - "description": "Unique identifying part for the web address of the dashboard.", - "maxLength": 255, - "minLength": 0, - "nullable": true, + "username": { + "maxLength": 64, "type": "string" } }, + "required": [ + "first_name", + "last_name", + "username" + ], "type": "object" }, - "Database": { + "ChartRestApi.get_list.User1": { "properties": { - "allow_multi_schema_metadata_fetch": { - "type": "boolean" - }, - "allows_cost_estimate": { - "type": "boolean" - }, - "allows_subquery": { - "type": "boolean" - }, - "allows_virtual_table_explore": { - "type": "boolean" - }, - "backend": { + "first_name": { + "maxLength": 64, "type": "string" }, - "explore_database_id": { - "format": "int32", - "type": "integer" - }, "id": { "format": "int32", "type": "integer" }, - "name": { + "last_name": { + "maxLength": 64, "type": "string" } }, + "required": [ + "first_name", + "last_name" + ], "type": "object" }, - "DatabaseFunctionNamesResponse": { + "ChartRestApi.get_list.User2": { "properties": { - "function_names": { - "items": { - "type": "string" - }, - "type": "array" + "first_name": { + "maxLength": 64, + "type": "string" + }, + "last_name": { + "maxLength": 64, + "type": "string" } }, + "required": [ + "first_name", + "last_name" + ], "type": "object" }, - "DatabaseRelatedChart": { + "ChartRestApi.get_list.User3": { "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, "id": { "format": "int32", "type": "integer" }, - "slice_name": { - "type": "string" - }, - "viz_type": { + "last_name": { + "maxLength": 64, "type": "string" } }, + "required": [ + "first_name", + "last_name" + ], "type": "object" }, - "DatabaseRelatedCharts": { + "ChartRestApi.post": { "properties": { - "count": { - "description": "Chart count", + "cache_timeout": { + "description": "Duration (in seconds) of the caching timeout for this chart. Note this defaults to the datasource/table timeout if undefined.", "format": "int32", + "nullable": true, "type": "integer" }, - "result": { - "description": "A list of dashboards", + "certification_details": { + "description": "Details of the certification", + "nullable": true, + "type": "string" + }, + "certified_by": { + "description": "Person or group that has certified this chart", + "nullable": true, + "type": "string" + }, + "dashboards": { "items": { - "$ref": "#/components/schemas/DatabaseRelatedChart" + "description": "A list of dashboards to include this new chart to.", + "format": "int32", + "type": "integer" }, "type": "array" - } - }, - "type": "object" - }, - "DatabaseRelatedDashboard": { - "properties": { - "id": { + }, + "datasource_id": { + "description": "The id of the dataset/datasource this new chart will use. A complete datasource identification needs `datasouce_id` and `datasource_type`.", "format": "int32", "type": "integer" }, - "json_metadata": { - "type": "object" + "datasource_name": { + "description": "The datasource name.", + "nullable": true, + "type": "string" }, - "slug": { + "datasource_type": { + "description": "The type of dataset/datasource identified on `datasource_id`.", + "enum": [ + "druid", + "table", + "view" + ], "type": "string" }, - "title": { + "description": { + "description": "A description of the chart propose.", + "nullable": true, "type": "string" - } - }, - "type": "object" - }, - "DatabaseRelatedDashboards": { - "properties": { - "count": { - "description": "Dashboard count", - "format": "int32", - "type": "integer" }, - "result": { - "description": "A list of dashboards", + "owners": { "items": { - "$ref": "#/components/schemas/DatabaseRelatedDashboard" + "description": "Owner are users ids allowed to delete or change this chart. If left empty you will be one of the owners of the chart.", + "format": "int32", + "type": "integer" }, "type": "array" - } - }, - "type": "object" - }, - "DatabaseRelatedObjectsResponse": { - "properties": { - "charts": { - "$ref": "#/components/schemas/DatabaseRelatedCharts" }, - "dashboards": { - "$ref": "#/components/schemas/DatabaseRelatedDashboards" - } - }, - "type": "object" - }, - "DatabaseRestApi.get": { - "properties": { - "allow_csv_upload": { + "params": { + "description": "Parameters are generated dynamically when clicking the save or overwrite button in the explore view. This JSON object for power users who may want to alter specific parameters.", "nullable": true, - "type": "boolean" + "type": "string" }, - "allow_ctas": { + "query_context": { + "description": "The query context represents the queries that need to run in order to generate the data the visualization, and in what format the data should be returned.", "nullable": true, - "type": "boolean" + "type": "string" }, - "allow_cvas": { + "query_context_generation": { + "description": "The query context generation represents whether the query_contextis user generated or not so that it does not update user modfiedstate.", "nullable": true, "type": "boolean" }, - "allow_dml": { + "slice_name": { + "description": "The name of the chart.", + "maxLength": 250, + "minLength": 1, + "type": "string" + }, + "viz_type": { + "description": "The type of chart visualization used.", + "example": [ + "bar", + "line_multi", + "area", + "table" + ], + "maxLength": 250, + "minLength": 0, + "type": "string" + } + }, + "required": [ + "datasource_id", + "datasource_type", + "slice_name" + ], + "type": "object" + }, + "ChartRestApi.put": { + "properties": { + "cache_timeout": { + "description": "Duration (in seconds) of the caching timeout for this chart. Note this defaults to the datasource/table timeout if undefined.", + "format": "int32", "nullable": true, - "type": "boolean" + "type": "integer" }, - "allow_multi_schema_metadata_fetch": { + "certification_details": { + "description": "Details of the certification", "nullable": true, - "type": "boolean" + "type": "string" }, - "allow_run_async": { + "certified_by": { + "description": "Person or group that has certified this chart", "nullable": true, - "type": "boolean" + "type": "string" }, - "backend": { - "readOnly": true + "dashboards": { + "items": { + "description": "A list of dashboards to include this new chart to.", + "format": "int32", + "type": "integer" + }, + "type": "array" }, - "cache_timeout": { + "datasource_id": { + "description": "The id of the dataset/datasource this new chart will use. A complete datasource identification needs `datasouce_id` and `datasource_type`.", "format": "int32", "nullable": true, "type": "integer" }, - "configuration_method": { - "maxLength": 255, + "datasource_type": { + "description": "The type of dataset/datasource identified on `datasource_id`.", + "enum": [ + "druid", + "table", + "view" + ], "nullable": true, "type": "string" }, - "database_name": { - "maxLength": 250, + "description": { + "description": "A description of the chart propose.", + "nullable": true, "type": "string" }, - "encrypted_extra": { + "owners": { + "items": { + "description": "Owner are users ids allowed to delete or change this chart. If left empty you will be one of the owners of the chart.", + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "params": { + "description": "Parameters are generated dynamically when clicking the save or overwrite button in the explore view. This JSON object for power users who may want to alter specific parameters.", "nullable": true, "type": "string" }, - "expose_in_sqllab": { + "query_context": { + "description": "The query context represents the queries that need to run in order to generate the data the visualization, and in what format the data should be returned.", + "nullable": true, + "type": "string" + }, + "query_context_generation": { + "description": "The query context generation represents whether the query_contextis user generated or not so that it does not update user modfiedstate.", "nullable": true, "type": "boolean" }, - "extra": { + "slice_name": { + "description": "The name of the chart.", + "maxLength": 250, + "minLength": 0, "nullable": true, "type": "string" }, - "force_ctas_schema": { + "viz_type": { + "description": "The type of chart visualization used.", + "example": [ + "bar", + "line_multi", + "area", + "table" + ], "maxLength": 250, + "minLength": 0, + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "CssTemplateRestApi.get": { + "properties": { + "created_by": { + "$ref": "#/components/schemas/CssTemplateRestApi.get.User" + }, + "css": { "nullable": true, "type": "string" }, @@ -2558,455 +2743,357 @@ "format": "int32", "type": "integer" }, - "impersonate_user": { - "nullable": true, - "type": "boolean" - }, - "parameters": { - "readOnly": true - }, - "server_cert": { + "template_name": { + "maxLength": 250, "nullable": true, "type": "string" + } + }, + "type": "object" + }, + "CssTemplateRestApi.get.User": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" }, - "sqlalchemy_uri": { - "maxLength": 1024, + "id": { + "format": "int32", + "type": "integer" + }, + "last_name": { + "maxLength": 64, "type": "string" } }, "required": [ - "database_name", - "sqlalchemy_uri" + "first_name", + "last_name" ], "type": "object" }, - "DatabaseRestApi.get_list": { + "CssTemplateRestApi.get_list": { "properties": { - "allow_csv_upload": { - "nullable": true, - "type": "boolean" + "changed_by": { + "$ref": "#/components/schemas/CssTemplateRestApi.get_list.User1" }, - "allow_ctas": { - "nullable": true, - "type": "boolean" + "changed_on_delta_humanized": { + "readOnly": true }, - "allow_cvas": { - "nullable": true, - "type": "boolean" + "created_by": { + "$ref": "#/components/schemas/CssTemplateRestApi.get_list.User" }, - "allow_dml": { + "created_on": { + "format": "date-time", "nullable": true, - "type": "boolean" - }, - "allow_multi_schema_metadata_fetch": { - "nullable": true, - "type": "boolean" - }, - "allow_run_async": { - "nullable": true, - "type": "boolean" - }, - "allows_cost_estimate": { - "readOnly": true - }, - "allows_subquery": { - "readOnly": true - }, - "allows_virtual_table_explore": { - "readOnly": true - }, - "backend": { - "readOnly": true + "type": "string" }, - "changed_on": { - "format": "date-time", + "css": { "nullable": true, "type": "string" }, - "changed_on_delta_humanized": { - "readOnly": true - }, - "created_by": { - "$ref": "#/components/schemas/Meta18" + "id": { + "format": "int32", + "type": "integer" }, - "database_name": { + "template_name": { "maxLength": 250, - "type": "string" - }, - "explore_database_id": { - "readOnly": true - }, - "expose_in_sqllab": { - "nullable": true, - "type": "boolean" - }, - "extra": { "nullable": true, "type": "string" - }, - "force_ctas_schema": { - "maxLength": 250, - "nullable": true, + } + }, + "type": "object" + }, + "CssTemplateRestApi.get_list.User": { + "properties": { + "first_name": { + "maxLength": 64, "type": "string" }, "id": { "format": "int32", "type": "integer" + }, + "last_name": { + "maxLength": 64, + "type": "string" } }, "required": [ - "database_name" + "first_name", + "last_name" ], "type": "object" }, - "DatabaseRestApi.post": { + "CssTemplateRestApi.get_list.User1": { "properties": { - "allow_csv_upload": { - "description": "Allow to upload CSV file data into this databaseIf selected, please set the schemas allowed for csv upload in Extra.", - "type": "boolean" - }, - "allow_ctas": { - "description": "Allow CREATE TABLE AS option in SQL Lab", - "type": "boolean" - }, - "allow_cvas": { - "description": "Allow CREATE VIEW AS option in SQL Lab", - "type": "boolean" - }, - "allow_dml": { - "description": "Allow users to run non-SELECT statements (UPDATE, DELETE, CREATE, ...) in SQL Lab", - "type": "boolean" - }, - "allow_multi_schema_metadata_fetch": { - "description": "Allow SQL Lab to fetch a list of all tables and all views across all database schemas. For large data warehouse with thousands of tables, this can be expensive and put strain on the system.", - "type": "boolean" - }, - "allow_run_async": { - "description": "Operate the database in asynchronous mode, meaning that the queries are executed on remote workers as opposed to on the web server itself. This assumes that you have a Celery worker setup as well as a results backend. Refer to the installation docs for more information.", - "type": "boolean" + "first_name": { + "maxLength": 64, + "type": "string" }, - "cache_timeout": { - "description": "Duration (in seconds) of the caching timeout for charts of this database. A timeout of 0 indicates that the cache never expires. Note this defaults to the global timeout if undefined.", + "id": { "format": "int32", - "nullable": true, "type": "integer" }, - "configuration_method": { - "default": "sqlalchemy_form", - "description": "Configuration_method is used on the frontend to inform the backend whether to explode parameters or to provide only a sqlalchemy_uri." - }, - "database_name": { - "description": "A database name to identify this connection.", - "maxLength": 250, - "minLength": 1, - "type": "string" - }, - "encrypted_extra": { - "description": "

JSON string containing additional connection configuration.
This is used to provide connection information for systems like Hive, Presto, and BigQuery, which do not conform to the username:password syntax normally used by SQLAlchemy.

", - "nullable": true, + "last_name": { + "maxLength": 64, "type": "string" - }, - "engine": { - "description": "SQLAlchemy engine to use", + } + }, + "required": [ + "first_name", + "last_name" + ], + "type": "object" + }, + "CssTemplateRestApi.post": { + "properties": { + "css": { "nullable": true, "type": "string" }, - "expose_in_sqllab": { - "description": "Expose this database to SQLLab", - "type": "boolean" - }, - "extra": { - "description": "

JSON string containing extra configuration elements.
1. The engine_params object gets unpacked into the sqlalchemy.create_engine call, while the metadata_params gets unpacked into the sqlalchemy.MetaData call.
2. The metadata_cache_timeout is a cache timeout setting in seconds for metadata fetch of this database. Specify it as \"metadata_cache_timeout\": {\"schema_cache_timeout\": 600, \"table_cache_timeout\": 600}. If unset, cache will not be enabled for the functionality. A timeout of 0 indicates that the cache never expires.
3. The schemas_allowed_for_csv_upload is a comma separated list of schemas that CSVs are allowed to upload to. Specify it as \"schemas_allowed_for_csv_upload\": [\"public\", \"csv_upload\"]. If database flavor does not support schema or any schema is allowed to be accessed, just leave the list empty
4. the version field is a string specifying the this db's version. This should be used with Presto DBs so that the syntax is correct
5. The allows_virtual_table_explore field is a boolean specifying whether or not the Explore button in SQL Lab results is shown.

", - "type": "string" - }, - "force_ctas_schema": { - "description": "When allowing CREATE TABLE AS option in SQL Lab, this option forces the table to be created in this schema", + "template_name": { "maxLength": 250, - "minLength": 0, "nullable": true, "type": "string" - }, - "impersonate_user": { - "description": "If Presto, Trino or Drill all the queries in SQL Lab are going to be executed as the currently logged on user who must have permission to run them.
If Hive and hive.server2.enable.doAs is enabled, will run the queries as service account, but impersonate the currently logged on user via hive.server2.proxy.user property.", - "type": "boolean" - }, - "parameters": { - "additionalProperties": {}, - "description": "DB-specific parameters for configuration", - "type": "object" - }, - "server_cert": { - "description": "

Optional CA_BUNDLE contents to validate HTTPS requests. Only available on certain database engines.

", + } + }, + "type": "object" + }, + "CssTemplateRestApi.put": { + "properties": { + "css": { "nullable": true, "type": "string" }, - "sqlalchemy_uri": { - "description": "

Refer to the SqlAlchemy docs for more information on how to structure your URI.

", - "maxLength": 1024, - "minLength": 1, + "template_name": { + "maxLength": 250, + "nullable": true, "type": "string" } }, - "required": [ - "database_name" - ], "type": "object" }, - "DatabaseRestApi.put": { + "DashboardDatasetSchema": { "properties": { - "allow_csv_upload": { - "description": "Allow to upload CSV file data into this databaseIf selected, please set the schemas allowed for csv upload in Extra.", - "type": "boolean" - }, - "allow_ctas": { - "description": "Allow CREATE TABLE AS option in SQL Lab", - "type": "boolean" + "cache_timeout": { + "format": "int32", + "type": "integer" }, - "allow_cvas": { - "description": "Allow CREATE VIEW AS option in SQL Lab", - "type": "boolean" + "column_formats": { + "type": "object" }, - "allow_dml": { - "description": "Allow users to run non-SELECT statements (UPDATE, DELETE, CREATE, ...) in SQL Lab", - "type": "boolean" + "column_types": { + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" }, - "allow_multi_schema_metadata_fetch": { - "description": "Allow SQL Lab to fetch a list of all tables and all views across all database schemas. For large data warehouse with thousands of tables, this can be expensive and put strain on the system.", - "type": "boolean" + "columns": { + "items": { + "type": "object" + }, + "type": "array" }, - "allow_run_async": { - "description": "Operate the database in asynchronous mode, meaning that the queries are executed on remote workers as opposed to on the web server itself. This assumes that you have a Celery worker setup as well as a results backend. Refer to the installation docs for more information.", - "type": "boolean" + "database": { + "$ref": "#/components/schemas/Database" }, - "cache_timeout": { - "description": "Duration (in seconds) of the caching timeout for charts of this database. A timeout of 0 indicates that the cache never expires. Note this defaults to the global timeout if undefined.", - "format": "int32", - "nullable": true, - "type": "integer" + "datasource_name": { + "type": "string" }, - "configuration_method": { - "default": "sqlalchemy_form", - "description": "Configuration_method is used on the frontend to inform the backend whether to explode parameters or to provide only a sqlalchemy_uri." + "default_endpoint": { + "type": "string" }, - "database_name": { - "description": "A database name to identify this connection.", - "maxLength": 250, - "minLength": 1, - "nullable": true, + "edit_url": { "type": "string" }, - "encrypted_extra": { - "description": "

JSON string containing additional connection configuration.
This is used to provide connection information for systems like Hive, Presto, and BigQuery, which do not conform to the username:password syntax normally used by SQLAlchemy.

", - "nullable": true, + "fetch_values_predicate": { "type": "string" }, - "engine": { - "description": "SQLAlchemy engine to use", - "nullable": true, + "filter_select": { + "type": "boolean" + }, + "filter_select_enabled": { + "type": "boolean" + }, + "granularity_sqla": { + "items": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": "array" + }, + "health_check_message": { "type": "string" }, - "expose_in_sqllab": { - "description": "Expose this database to SQLLab", + "id": { + "format": "int32", + "type": "integer" + }, + "is_sqllab_view": { "type": "boolean" }, - "extra": { - "description": "

JSON string containing extra configuration elements.
1. The engine_params object gets unpacked into the sqlalchemy.create_engine call, while the metadata_params gets unpacked into the sqlalchemy.MetaData call.
2. The metadata_cache_timeout is a cache timeout setting in seconds for metadata fetch of this database. Specify it as \"metadata_cache_timeout\": {\"schema_cache_timeout\": 600, \"table_cache_timeout\": 600}. If unset, cache will not be enabled for the functionality. A timeout of 0 indicates that the cache never expires.
3. The schemas_allowed_for_csv_upload is a comma separated list of schemas that CSVs are allowed to upload to. Specify it as \"schemas_allowed_for_csv_upload\": [\"public\", \"csv_upload\"]. If database flavor does not support schema or any schema is allowed to be accessed, just leave the list empty
4. the version field is a string specifying the this db's version. This should be used with Presto DBs so that the syntax is correct
5. The allows_virtual_table_explore field is a boolean specifying whether or not the Explore button in SQL Lab results is shown.

", + "main_dttm_col": { "type": "string" }, - "force_ctas_schema": { - "description": "When allowing CREATE TABLE AS option in SQL Lab, this option forces the table to be created in this schema", - "maxLength": 250, - "minLength": 0, - "nullable": true, + "metrics": { + "items": { + "type": "object" + }, + "type": "array" + }, + "name": { "type": "string" }, - "impersonate_user": { - "description": "If Presto, Trino or Drill all the queries in SQL Lab are going to be executed as the currently logged on user who must have permission to run them.
If Hive and hive.server2.enable.doAs is enabled, will run the queries as service account, but impersonate the currently logged on user via hive.server2.proxy.user property.", - "type": "boolean" + "offset": { + "format": "int32", + "type": "integer" }, - "parameters": { - "additionalProperties": {}, - "description": "DB-specific parameters for configuration", - "type": "object" + "order_by_choices": { + "items": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": "array" + }, + "owners": { + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" }, - "server_cert": { - "description": "

Optional CA_BUNDLE contents to validate HTTPS requests. Only available on certain database engines.

", - "nullable": true, + "params": { "type": "string" }, - "sqlalchemy_uri": { - "description": "

Refer to the SqlAlchemy docs for more information on how to structure your URI.

", - "maxLength": 1024, - "minLength": 0, + "perm": { "type": "string" - } - }, - "type": "object" - }, - "DatabaseTestConnectionSchema": { - "properties": { - "configuration_method": { - "default": "sqlalchemy_form", - "description": "Configuration_method is used on the frontend to inform the backend whether to explode parameters or to provide only a sqlalchemy_uri." }, - "database_name": { - "description": "A database name to identify this connection.", - "maxLength": 250, - "minLength": 1, - "nullable": true, + "schema": { "type": "string" }, - "encrypted_extra": { - "description": "

JSON string containing additional connection configuration.
This is used to provide connection information for systems like Hive, Presto, and BigQuery, which do not conform to the username:password syntax normally used by SQLAlchemy.

", - "nullable": true, + "select_star": { "type": "string" }, - "engine": { - "description": "SQLAlchemy engine to use", - "nullable": true, + "sql": { "type": "string" }, - "extra": { - "description": "

JSON string containing extra configuration elements.
1. The engine_params object gets unpacked into the sqlalchemy.create_engine call, while the metadata_params gets unpacked into the sqlalchemy.MetaData call.
2. The metadata_cache_timeout is a cache timeout setting in seconds for metadata fetch of this database. Specify it as \"metadata_cache_timeout\": {\"schema_cache_timeout\": 600, \"table_cache_timeout\": 600}. If unset, cache will not be enabled for the functionality. A timeout of 0 indicates that the cache never expires.
3. The schemas_allowed_for_csv_upload is a comma separated list of schemas that CSVs are allowed to upload to. Specify it as \"schemas_allowed_for_csv_upload\": [\"public\", \"csv_upload\"]. If database flavor does not support schema or any schema is allowed to be accessed, just leave the list empty
4. the version field is a string specifying the this db's version. This should be used with Presto DBs so that the syntax is correct
5. The allows_virtual_table_explore field is a boolean specifying whether or not the Explore button in SQL Lab results is shown.

", + "table_name": { "type": "string" }, - "impersonate_user": { - "description": "If Presto, Trino or Drill all the queries in SQL Lab are going to be executed as the currently logged on user who must have permission to run them.
If Hive and hive.server2.enable.doAs is enabled, will run the queries as service account, but impersonate the currently logged on user via hive.server2.proxy.user property.", - "type": "boolean" + "template_params": { + "type": "string" }, - "parameters": { - "additionalProperties": {}, - "description": "DB-specific parameters for configuration", - "type": "object" + "time_grain_sqla": { + "items": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": "array" }, - "server_cert": { - "description": "

Optional CA_BUNDLE contents to validate HTTPS requests. Only available on certain database engines.

", - "nullable": true, + "type": { "type": "string" }, - "sqlalchemy_uri": { - "description": "

Refer to the SqlAlchemy docs for more information on how to structure your URI.

", - "maxLength": 1024, - "minLength": 1, + "uid": { "type": "string" + }, + "verbose_map": { + "additionalProperties": { + "type": "string" + }, + "type": "object" } }, "type": "object" }, - "DatabaseValidateParametersSchema": { + "DashboardGetResponseSchema": { "properties": { - "configuration_method": { - "description": "Configuration_method is used on the frontend to inform the backend whether to explode parameters or to provide only a sqlalchemy_uri." + "certification_details": { + "description": "Details of the certification", + "type": "string" }, - "database_name": { - "description": "A database name to identify this connection.", - "maxLength": 250, - "minLength": 1, - "nullable": true, + "certified_by": { + "description": "Person or group that has certified this dashboard", "type": "string" }, - "encrypted_extra": { - "description": "

JSON string containing additional connection configuration.
This is used to provide connection information for systems like Hive, Presto, and BigQuery, which do not conform to the username:password syntax normally used by SQLAlchemy.

", - "nullable": true, + "changed_by": { + "$ref": "#/components/schemas/User" + }, + "changed_by_name": { "type": "string" }, - "engine": { - "description": "SQLAlchemy engine to use", + "changed_by_url": { "type": "string" }, - "extra": { - "description": "

JSON string containing extra configuration elements.
1. The engine_params object gets unpacked into the sqlalchemy.create_engine call, while the metadata_params gets unpacked into the sqlalchemy.MetaData call.
2. The metadata_cache_timeout is a cache timeout setting in seconds for metadata fetch of this database. Specify it as \"metadata_cache_timeout\": {\"schema_cache_timeout\": 600, \"table_cache_timeout\": 600}. If unset, cache will not be enabled for the functionality. A timeout of 0 indicates that the cache never expires.
3. The schemas_allowed_for_csv_upload is a comma separated list of schemas that CSVs are allowed to upload to. Specify it as \"schemas_allowed_for_csv_upload\": [\"public\", \"csv_upload\"]. If database flavor does not support schema or any schema is allowed to be accessed, just leave the list empty
4. the version field is a string specifying the this db's version. This should be used with Presto DBs so that the syntax is correct
5. The allows_virtual_table_explore field is a boolean specifying whether or not the Explore button in SQL Lab results is shown.

", + "changed_on": { + "format": "date-time", "type": "string" }, - "impersonate_user": { - "description": "If Presto, Trino or Drill all the queries in SQL Lab are going to be executed as the currently logged on user who must have permission to run them.
If Hive and hive.server2.enable.doAs is enabled, will run the queries as service account, but impersonate the currently logged on user via hive.server2.proxy.user property.", - "type": "boolean" + "changed_on_delta_humanized": { + "type": "string" }, - "parameters": { - "additionalProperties": { - "nullable": true + "charts": { + "items": { + "description": "The names of the dashboard's charts. Names are used for legacy reasons.", + "type": "string" }, - "description": "DB-specific parameters for configuration", - "type": "object" - }, - "server_cert": { - "description": "

Optional CA_BUNDLE contents to validate HTTPS requests. Only available on certain database engines.

", - "nullable": true, - "type": "string" - } - }, - "required": [ - "configuration_method", - "engine" - ], - "type": "object" - }, - "DatasetColumnsPut": { - "properties": { - "column_name": { - "maxLength": 255, - "minLength": 1, - "type": "string" + "type": "array" }, - "description": { - "nullable": true, + "css": { + "description": "Override CSS for the dashboard.", "type": "string" }, - "expression": { - "nullable": true, + "dashboard_title": { + "description": "A title for the dashboard.", "type": "string" }, - "filterable": { - "type": "boolean" - }, - "groupby": { - "type": "boolean" - }, "id": { "format": "int32", "type": "integer" }, - "is_active": { - "type": "boolean" + "json_metadata": { + "description": "This JSON object is generated dynamically when clicking the save or overwrite button in the dashboard view. It is exposed here for reference and for power users who may want to alter specific parameters.", + "type": "string" }, - "is_dttm": { - "type": "boolean" + "owners": { + "items": { + "$ref": "#/components/schemas/User" + }, + "type": "array" }, - "python_date_format": { - "maxLength": 255, - "minLength": 1, - "nullable": true, + "position_json": { + "description": "This json object describes the positioning of the widgets in the dashboard. It is dynamically generated when adjusting the widgets size and positions by using drag & drop in the dashboard view", "type": "string" }, - "type": { - "maxLength": 32, - "minLength": 1, + "published": { + "type": "boolean" + }, + "roles": { + "items": { + "$ref": "#/components/schemas/Roles" + }, + "type": "array" + }, + "slug": { "type": "string" }, - "uuid": { - "nullable": true, + "thumbnail_url": { "type": "string" }, - "verbose_name": { - "nullable": true, + "url": { "type": "string" } }, - "required": [ - "column_name" - ], - "type": "object" - }, - "DatasetColumnsRestApi.get": { - "properties": { - "id": { - "format": "int32", - "type": "integer" - } - }, "type": "object" }, - "DatasetColumnsRestApi.get_list": { + "DashboardRestApi.get": { "properties": { "id": { "format": "int32", @@ -3015,102 +3102,341 @@ }, "type": "object" }, - "DatasetColumnsRestApi.post": { + "DashboardRestApi.get_list": { "properties": { + "certification_details": { + "nullable": true, + "type": "string" + }, + "certified_by": { + "nullable": true, + "type": "string" + }, + "changed_by": { + "$ref": "#/components/schemas/DashboardRestApi.get_list.User2" + }, + "changed_by_name": { + "readOnly": true + }, + "changed_by_url": { + "readOnly": true + }, + "changed_on_delta_humanized": { + "readOnly": true + }, + "changed_on_utc": { + "readOnly": true + }, + "created_by": { + "$ref": "#/components/schemas/DashboardRestApi.get_list.User1" + }, + "css": { + "nullable": true, + "type": "string" + }, + "dashboard_title": { + "maxLength": 500, + "nullable": true, + "type": "string" + }, "id": { "format": "int32", "type": "integer" + }, + "json_metadata": { + "nullable": true, + "type": "string" + }, + "owners": { + "$ref": "#/components/schemas/DashboardRestApi.get_list.User" + }, + "position_json": { + "nullable": true, + "type": "string" + }, + "published": { + "nullable": true, + "type": "boolean" + }, + "roles": { + "$ref": "#/components/schemas/DashboardRestApi.get_list.Role" + }, + "slug": { + "maxLength": 255, + "nullable": true, + "type": "string" + }, + "status": { + "readOnly": true + }, + "thumbnail_url": { + "readOnly": true + }, + "url": { + "readOnly": true } }, "type": "object" }, - "DatasetColumnsRestApi.put": { + "DashboardRestApi.get_list.Role": { "properties": { "id": { "format": "int32", "type": "integer" + }, + "name": { + "maxLength": 64, + "type": "string" } }, + "required": [ + "name" + ], "type": "object" }, - "DatasetMetricRestApi.get": { + "DashboardRestApi.get_list.User": { "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, "id": { "format": "int32", "type": "integer" + }, + "last_name": { + "maxLength": 64, + "type": "string" + }, + "username": { + "maxLength": 64, + "type": "string" } }, + "required": [ + "first_name", + "last_name", + "username" + ], "type": "object" }, - "DatasetMetricRestApi.get_list": { + "DashboardRestApi.get_list.User1": { "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, "id": { "format": "int32", "type": "integer" + }, + "last_name": { + "maxLength": 64, + "type": "string" } }, + "required": [ + "first_name", + "last_name" + ], "type": "object" }, - "DatasetMetricRestApi.post": { + "DashboardRestApi.get_list.User2": { "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, "id": { "format": "int32", "type": "integer" + }, + "last_name": { + "maxLength": 64, + "type": "string" + }, + "username": { + "maxLength": 64, + "type": "string" } }, + "required": [ + "first_name", + "last_name", + "username" + ], "type": "object" }, - "DatasetMetricRestApi.put": { + "DashboardRestApi.post": { "properties": { - "id": { - "format": "int32", - "type": "integer" + "certification_details": { + "description": "Details of the certification", + "nullable": true, + "type": "string" + }, + "certified_by": { + "description": "Person or group that has certified this dashboard", + "nullable": true, + "type": "string" + }, + "css": { + "type": "string" + }, + "dashboard_title": { + "description": "A title for the dashboard.", + "maxLength": 500, + "minLength": 0, + "nullable": true, + "type": "string" + }, + "json_metadata": { + "description": "This JSON object is generated dynamically when clicking the save or overwrite button in the dashboard view. It is exposed here for reference and for power users who may want to alter specific parameters.", + "type": "string" + }, + "owners": { + "items": { + "description": "Owner are users ids allowed to delete or change this dashboard. If left empty you will be one of the owners of the dashboard.", + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "position_json": { + "description": "This json object describes the positioning of the widgets in the dashboard. It is dynamically generated when adjusting the widgets size and positions by using drag & drop in the dashboard view", + "type": "string" + }, + "published": { + "description": "Determines whether or not this dashboard is visible in the list of all dashboards.", + "type": "boolean" + }, + "roles": { + "items": { + "description": "Roles is a list which defines access to the dashboard. These roles are always applied in addition to restrictions on dataset level access. If no roles defined then the dashboard is available to all roles.", + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "slug": { + "description": "Unique identifying part for the web address of the dashboard.", + "maxLength": 255, + "minLength": 1, + "nullable": true, + "type": "string" } }, "type": "object" }, - "DatasetMetricsPut": { + "DashboardRestApi.put": { "properties": { - "d3format": { - "maxLength": 128, - "minLength": 1, + "certification_details": { + "description": "Details of the certification", "nullable": true, "type": "string" }, - "description": { + "certified_by": { + "description": "Person or group that has certified this dashboard", "nullable": true, "type": "string" }, - "expression": { + "css": { + "description": "Override CSS for the dashboard.", + "nullable": true, "type": "string" }, - "id": { - "format": "int32", - "type": "integer" + "dashboard_title": { + "description": "A title for the dashboard.", + "maxLength": 500, + "minLength": 0, + "nullable": true, + "type": "string" }, - "metric_name": { - "maxLength": 255, - "minLength": 1, + "json_metadata": { + "description": "This JSON object is generated dynamically when clicking the save or overwrite button in the dashboard view. It is exposed here for reference and for power users who may want to alter specific parameters.", + "nullable": true, "type": "string" }, - "metric_type": { - "maxLength": 32, - "minLength": 1, + "owners": { + "items": { + "description": "Owner are users ids allowed to delete or change this dashboard. If left empty you will be one of the owners of the dashboard.", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "type": "array" + }, + "position_json": { + "description": "This json object describes the positioning of the widgets in the dashboard. It is dynamically generated when adjusting the widgets size and positions by using drag & drop in the dashboard view", "nullable": true, "type": "string" }, - "warning_text": { + "published": { + "description": "Determines whether or not this dashboard is visible in the list of all dashboards.", + "nullable": true, + "type": "boolean" + }, + "roles": { + "items": { + "description": "Roles is a list which defines access to the dashboard. These roles are always applied in addition to restrictions on dataset level access. If no roles defined then the dashboard is available to all roles.", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "type": "array" + }, + "slug": { + "description": "Unique identifying part for the web address of the dashboard.", + "maxLength": 255, + "minLength": 0, "nullable": true, "type": "string" } }, - "required": [ - "expression", - "metric_name" - ], "type": "object" }, - "DatasetRelatedChart": { + "Database": { + "properties": { + "allow_multi_schema_metadata_fetch": { + "type": "boolean" + }, + "allows_cost_estimate": { + "type": "boolean" + }, + "allows_subquery": { + "type": "boolean" + }, + "allows_virtual_table_explore": { + "type": "boolean" + }, + "backend": { + "type": "string" + }, + "explore_database_id": { + "format": "int32", + "type": "integer" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "DatabaseFunctionNamesResponse": { + "properties": { + "function_names": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "DatabaseRelatedChart": { "properties": { "id": { "format": "int32", @@ -3125,7 +3451,7 @@ }, "type": "object" }, - "DatasetRelatedCharts": { + "DatabaseRelatedCharts": { "properties": { "count": { "description": "Chart count", @@ -3135,14 +3461,14 @@ "result": { "description": "A list of dashboards", "items": { - "$ref": "#/components/schemas/DatasetRelatedChart" + "$ref": "#/components/schemas/DatabaseRelatedChart" }, "type": "array" } }, "type": "object" }, - "DatasetRelatedDashboard": { + "DatabaseRelatedDashboard": { "properties": { "id": { "format": "int32", @@ -3160,7 +3486,7 @@ }, "type": "object" }, - "DatasetRelatedDashboards": { + "DatabaseRelatedDashboards": { "properties": { "count": { "description": "Dashboard count", @@ -3170,454 +3496,570 @@ "result": { "description": "A list of dashboards", "items": { - "$ref": "#/components/schemas/DatasetRelatedDashboard" + "$ref": "#/components/schemas/DatabaseRelatedDashboard" }, "type": "array" } }, "type": "object" }, - "DatasetRelatedObjectsResponse": { + "DatabaseRelatedObjectsResponse": { "properties": { "charts": { - "$ref": "#/components/schemas/DatasetRelatedCharts" + "$ref": "#/components/schemas/DatabaseRelatedCharts" }, "dashboards": { - "$ref": "#/components/schemas/DatasetRelatedDashboards" + "$ref": "#/components/schemas/DatabaseRelatedDashboards" } }, "type": "object" }, - "DatasetRestApi.get": { + "DatabaseRestApi.get": { "properties": { - "cache_timeout": { - "format": "int32", + "allow_ctas": { "nullable": true, - "type": "integer" + "type": "boolean" }, - "columns": { - "$ref": "#/components/schemas/Meta22" + "allow_cvas": { + "nullable": true, + "type": "boolean" }, - "database": { - "$ref": "#/components/schemas/Meta23" + "allow_dml": { + "nullable": true, + "type": "boolean" }, - "datasource_type": { + "allow_file_upload": { + "nullable": true, + "type": "boolean" + }, + "allow_multi_schema_metadata_fetch": { + "nullable": true, + "type": "boolean" + }, + "allow_run_async": { + "nullable": true, + "type": "boolean" + }, + "backend": { "readOnly": true }, - "default_endpoint": { + "cache_timeout": { + "format": "int32", "nullable": true, - "type": "string" + "type": "integer" }, - "description": { + "configuration_method": { + "maxLength": 255, "nullable": true, "type": "string" }, - "extra": { - "nullable": true, + "database_name": { + "maxLength": 250, "type": "string" }, - "fetch_values_predicate": { - "maxLength": 1000, + "encrypted_extra": { "nullable": true, "type": "string" }, - "filter_select_enabled": { + "expose_in_sqllab": { "nullable": true, "type": "boolean" }, - "id": { - "format": "int32", - "type": "integer" - }, - "is_sqllab_view": { + "extra": { "nullable": true, - "type": "boolean" + "type": "string" }, - "main_dttm_col": { + "force_ctas_schema": { "maxLength": 250, "nullable": true, "type": "string" }, - "metrics": { - "$ref": "#/components/schemas/Meta25" - }, - "offset": { + "id": { "format": "int32", - "nullable": true, "type": "integer" }, - "owners": { - "$ref": "#/components/schemas/Meta24" - }, - "schema": { - "maxLength": 255, + "impersonate_user": { "nullable": true, - "type": "string" + "type": "boolean" }, - "sql": { - "nullable": true, - "type": "string" + "parameters": { + "readOnly": true }, - "table_name": { - "maxLength": 250, - "type": "string" + "parameters_schema": { + "readOnly": true }, - "template_params": { + "server_cert": { "nullable": true, "type": "string" }, - "url": { - "readOnly": true + "sqlalchemy_uri": { + "maxLength": 1024, + "type": "string" } }, "required": [ - "columns", - "database", - "metrics", - "table_name" + "database_name", + "sqlalchemy_uri" ], "type": "object" }, - "DatasetRestApi.get_list": { + "DatabaseRestApi.get_list": { "properties": { - "changed_by": { - "$ref": "#/components/schemas/Meta19" + "allow_ctas": { + "nullable": true, + "type": "boolean" }, - "changed_by_name": { - "readOnly": true + "allow_cvas": { + "nullable": true, + "type": "boolean" }, - "changed_by_url": { + "allow_dml": { + "nullable": true, + "type": "boolean" + }, + "allow_file_upload": { + "nullable": true, + "type": "boolean" + }, + "allow_multi_schema_metadata_fetch": { + "nullable": true, + "type": "boolean" + }, + "allow_run_async": { + "nullable": true, + "type": "boolean" + }, + "allows_cost_estimate": { "readOnly": true }, - "changed_on_delta_humanized": { + "allows_subquery": { "readOnly": true }, - "changed_on_utc": { + "allows_virtual_table_explore": { "readOnly": true }, - "database": { - "$ref": "#/components/schemas/Meta21" + "backend": { + "readOnly": true }, - "default_endpoint": { + "changed_on": { + "format": "date-time", "nullable": true, "type": "string" }, - "explore_url": { + "changed_on_delta_humanized": { "readOnly": true }, - "extra": { - "nullable": true, - "type": "string" + "created_by": { + "$ref": "#/components/schemas/DatabaseRestApi.get_list.User" }, - "id": { - "format": "int32", - "type": "integer" + "database_name": { + "maxLength": 250, + "type": "string" }, - "kind": { + "explore_database_id": { "readOnly": true }, - "owners": { - "$ref": "#/components/schemas/Meta20" + "expose_in_sqllab": { + "nullable": true, + "type": "boolean" }, - "schema": { - "maxLength": 255, + "extra": { "nullable": true, "type": "string" }, - "sql": { + "force_ctas_schema": { + "maxLength": 250, "nullable": true, "type": "string" }, - "table_name": { - "maxLength": 250, + "id": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "database_name" + ], + "type": "object" + }, + "DatabaseRestApi.get_list.User": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "last_name": { + "maxLength": 64, "type": "string" } }, "required": [ - "database", - "table_name" + "first_name", + "last_name" ], "type": "object" }, - "DatasetRestApi.post": { + "DatabaseRestApi.post": { "properties": { - "database": { + "allow_ctas": { + "description": "Allow CREATE TABLE AS option in SQL Lab", + "type": "boolean" + }, + "allow_cvas": { + "description": "Allow CREATE VIEW AS option in SQL Lab", + "type": "boolean" + }, + "allow_dml": { + "description": "Allow users to run non-SELECT statements (UPDATE, DELETE, CREATE, ...) in SQL Lab", + "type": "boolean" + }, + "allow_file_upload": { + "description": "Allow to upload CSV file data into this databaseIf selected, please set the schemas allowed for csv upload in Extra.", + "type": "boolean" + }, + "allow_multi_schema_metadata_fetch": { + "description": "Allow SQL Lab to fetch a list of all tables and all views across all database schemas. For large data warehouse with thousands of tables, this can be expensive and put strain on the system.", + "type": "boolean" + }, + "allow_run_async": { + "description": "Operate the database in asynchronous mode, meaning that the queries are executed on remote workers as opposed to on the web server itself. This assumes that you have a Celery worker setup as well as a results backend. Refer to the installation docs for more information.", + "type": "boolean" + }, + "cache_timeout": { + "description": "Duration (in seconds) of the caching timeout for charts of this database. A timeout of 0 indicates that the cache never expires. Note this defaults to the global timeout if undefined.", "format": "int32", + "nullable": true, "type": "integer" }, - "owners": { - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" + "configuration_method": { + "default": "sqlalchemy_form", + "description": "Configuration_method is used on the frontend to inform the backend whether to explode parameters or to provide only a sqlalchemy_uri." }, - "schema": { + "database_name": { + "description": "A database name to identify this connection.", "maxLength": 250, - "minLength": 0, + "minLength": 1, "type": "string" }, - "table_name": { + "encrypted_extra": { + "description": "

JSON string containing additional connection configuration.
This is used to provide connection information for systems like Hive, Presto, and BigQuery, which do not conform to the username:password syntax normally used by SQLAlchemy.

", + "nullable": true, + "type": "string" + }, + "engine": { + "description": "SQLAlchemy engine to use", + "nullable": true, + "type": "string" + }, + "expose_in_sqllab": { + "description": "Expose this database to SQLLab", + "type": "boolean" + }, + "extra": { + "description": "

JSON string containing extra configuration elements.
1. The engine_params object gets unpacked into the sqlalchemy.create_engine call, while the metadata_params gets unpacked into the sqlalchemy.MetaData call.
2. The metadata_cache_timeout is a cache timeout setting in seconds for metadata fetch of this database. Specify it as \"metadata_cache_timeout\": {\"schema_cache_timeout\": 600, \"table_cache_timeout\": 600}. If unset, cache will not be enabled for the functionality. A timeout of 0 indicates that the cache never expires.
3. The schemas_allowed_for_file_upload is a comma separated list of schemas that CSVs are allowed to upload to. Specify it as \"schemas_allowed_for_file_upload\": [\"public\", \"csv_upload\"]. If database flavor does not support schema or any schema is allowed to be accessed, just leave the list empty
4. the version field is a string specifying the this db's version. This should be used with Presto DBs so that the syntax is correct
5. The allows_virtual_table_explore field is a boolean specifying whether or not the Explore button in SQL Lab results is shown.

", + "type": "string" + }, + "force_ctas_schema": { + "description": "When allowing CREATE TABLE AS option in SQL Lab, this option forces the table to be created in this schema", "maxLength": 250, + "minLength": 0, + "nullable": true, + "type": "string" + }, + "impersonate_user": { + "description": "If Presto, all the queries in SQL Lab are going to be executed as the currently logged on user who must have permission to run them.
If Hive and hive.server2.enable.doAs is enabled, will run the queries as service account, but impersonate the currently logged on user via hive.server2.proxy.user property.", + "type": "boolean" + }, + "parameters": { + "additionalProperties": {}, + "description": "DB-specific parameters for configuration", + "type": "object" + }, + "server_cert": { + "description": "

Optional CA_BUNDLE contents to validate HTTPS requests. Only available on certain database engines.

", + "nullable": true, + "type": "string" + }, + "sqlalchemy_uri": { + "description": "

Refer to the SqlAlchemy docs for more information on how to structure your URI.

", + "maxLength": 1024, "minLength": 1, "type": "string" } }, "required": [ - "database", - "table_name" + "database_name" ], "type": "object" }, - "DatasetRestApi.put": { + "DatabaseRestApi.put": { "properties": { + "allow_ctas": { + "description": "Allow CREATE TABLE AS option in SQL Lab", + "type": "boolean" + }, + "allow_cvas": { + "description": "Allow CREATE VIEW AS option in SQL Lab", + "type": "boolean" + }, + "allow_dml": { + "description": "Allow users to run non-SELECT statements (UPDATE, DELETE, CREATE, ...) in SQL Lab", + "type": "boolean" + }, + "allow_file_upload": { + "description": "Allow to upload CSV file data into this databaseIf selected, please set the schemas allowed for csv upload in Extra.", + "type": "boolean" + }, + "allow_multi_schema_metadata_fetch": { + "description": "Allow SQL Lab to fetch a list of all tables and all views across all database schemas. For large data warehouse with thousands of tables, this can be expensive and put strain on the system.", + "type": "boolean" + }, + "allow_run_async": { + "description": "Operate the database in asynchronous mode, meaning that the queries are executed on remote workers as opposed to on the web server itself. This assumes that you have a Celery worker setup as well as a results backend. Refer to the installation docs for more information.", + "type": "boolean" + }, "cache_timeout": { + "description": "Duration (in seconds) of the caching timeout for charts of this database. A timeout of 0 indicates that the cache never expires. Note this defaults to the global timeout if undefined.", "format": "int32", "nullable": true, "type": "integer" }, - "columns": { - "items": { - "$ref": "#/components/schemas/DatasetColumnsPut" - }, - "type": "array" + "configuration_method": { + "default": "sqlalchemy_form", + "description": "Configuration_method is used on the frontend to inform the backend whether to explode parameters or to provide only a sqlalchemy_uri." }, - "database_id": { - "format": "int32", - "type": "integer" + "database_name": { + "description": "A database name to identify this connection.", + "maxLength": 250, + "minLength": 1, + "nullable": true, + "type": "string" }, - "default_endpoint": { + "encrypted_extra": { + "description": "

JSON string containing additional connection configuration.
This is used to provide connection information for systems like Hive, Presto, and BigQuery, which do not conform to the username:password syntax normally used by SQLAlchemy.

", "nullable": true, "type": "string" }, - "description": { + "engine": { + "description": "SQLAlchemy engine to use", "nullable": true, "type": "string" }, + "expose_in_sqllab": { + "description": "Expose this database to SQLLab", + "type": "boolean" + }, "extra": { - "nullable": true, + "description": "

JSON string containing extra configuration elements.
1. The engine_params object gets unpacked into the sqlalchemy.create_engine call, while the metadata_params gets unpacked into the sqlalchemy.MetaData call.
2. The metadata_cache_timeout is a cache timeout setting in seconds for metadata fetch of this database. Specify it as \"metadata_cache_timeout\": {\"schema_cache_timeout\": 600, \"table_cache_timeout\": 600}. If unset, cache will not be enabled for the functionality. A timeout of 0 indicates that the cache never expires.
3. The schemas_allowed_for_file_upload is a comma separated list of schemas that CSVs are allowed to upload to. Specify it as \"schemas_allowed_for_file_upload\": [\"public\", \"csv_upload\"]. If database flavor does not support schema or any schema is allowed to be accessed, just leave the list empty
4. the version field is a string specifying the this db's version. This should be used with Presto DBs so that the syntax is correct
5. The allows_virtual_table_explore field is a boolean specifying whether or not the Explore button in SQL Lab results is shown.

", "type": "string" }, - "fetch_values_predicate": { - "maxLength": 1000, + "force_ctas_schema": { + "description": "When allowing CREATE TABLE AS option in SQL Lab, this option forces the table to be created in this schema", + "maxLength": 250, "minLength": 0, "nullable": true, "type": "string" }, - "filter_select_enabled": { - "nullable": true, + "impersonate_user": { + "description": "If Presto, all the queries in SQL Lab are going to be executed as the currently logged on user who must have permission to run them.
If Hive and hive.server2.enable.doAs is enabled, will run the queries as service account, but impersonate the currently logged on user via hive.server2.proxy.user property.", "type": "boolean" }, - "is_sqllab_view": { - "nullable": true, - "type": "boolean" + "parameters": { + "additionalProperties": {}, + "description": "DB-specific parameters for configuration", + "type": "object" }, - "main_dttm_col": { + "server_cert": { + "description": "

Optional CA_BUNDLE contents to validate HTTPS requests. Only available on certain database engines.

", "nullable": true, "type": "string" }, - "metrics": { - "items": { - "$ref": "#/components/schemas/DatasetMetricsPut" - }, - "type": "array" + "sqlalchemy_uri": { + "description": "

Refer to the SqlAlchemy docs for more information on how to structure your URI.

", + "maxLength": 1024, + "minLength": 0, + "type": "string" + } + }, + "type": "object" + }, + "DatabaseTestConnectionSchema": { + "properties": { + "configuration_method": { + "default": "sqlalchemy_form", + "description": "Configuration_method is used on the frontend to inform the backend whether to explode parameters or to provide only a sqlalchemy_uri." }, - "offset": { - "format": "int32", + "database_name": { + "description": "A database name to identify this connection.", + "maxLength": 250, + "minLength": 1, "nullable": true, - "type": "integer" - }, - "owners": { - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" + "type": "string" }, - "schema": { - "maxLength": 255, - "minLength": 0, + "encrypted_extra": { + "description": "

JSON string containing additional connection configuration.
This is used to provide connection information for systems like Hive, Presto, and BigQuery, which do not conform to the username:password syntax normally used by SQLAlchemy.

", "nullable": true, "type": "string" }, - "sql": { + "engine": { + "description": "SQLAlchemy engine to use", "nullable": true, "type": "string" }, - "table_name": { - "maxLength": 250, - "minLength": 1, - "nullable": true, + "extra": { + "description": "

JSON string containing extra configuration elements.
1. The engine_params object gets unpacked into the sqlalchemy.create_engine call, while the metadata_params gets unpacked into the sqlalchemy.MetaData call.
2. The metadata_cache_timeout is a cache timeout setting in seconds for metadata fetch of this database. Specify it as \"metadata_cache_timeout\": {\"schema_cache_timeout\": 600, \"table_cache_timeout\": 600}. If unset, cache will not be enabled for the functionality. A timeout of 0 indicates that the cache never expires.
3. The schemas_allowed_for_file_upload is a comma separated list of schemas that CSVs are allowed to upload to. Specify it as \"schemas_allowed_for_file_upload\": [\"public\", \"csv_upload\"]. If database flavor does not support schema or any schema is allowed to be accessed, just leave the list empty
4. the version field is a string specifying the this db's version. This should be used with Presto DBs so that the syntax is correct
5. The allows_virtual_table_explore field is a boolean specifying whether or not the Explore button in SQL Lab results is shown.

", "type": "string" }, - "template_params": { + "impersonate_user": { + "description": "If Presto, all the queries in SQL Lab are going to be executed as the currently logged on user who must have permission to run them.
If Hive and hive.server2.enable.doAs is enabled, will run the queries as service account, but impersonate the currently logged on user via hive.server2.proxy.user property.", + "type": "boolean" + }, + "parameters": { + "additionalProperties": {}, + "description": "DB-specific parameters for configuration", + "type": "object" + }, + "server_cert": { + "description": "

Optional CA_BUNDLE contents to validate HTTPS requests. Only available on certain database engines.

", "nullable": true, "type": "string" + }, + "sqlalchemy_uri": { + "description": "

Refer to the SqlAlchemy docs for more information on how to structure your URI.

", + "maxLength": 1024, + "minLength": 1, + "type": "string" } }, "type": "object" }, - "Datasource": { + "DatabaseValidateParametersSchema": { "properties": { + "configuration_method": { + "description": "Configuration_method is used on the frontend to inform the backend whether to explode parameters or to provide only a sqlalchemy_uri." + }, "database_name": { - "description": "Datasource name", + "description": "A database name to identify this connection.", + "maxLength": 250, + "minLength": 1, + "nullable": true, "type": "string" }, - "datasource_name": { - "description": "The datasource name.", + "encrypted_extra": { + "description": "

JSON string containing additional connection configuration.
This is used to provide connection information for systems like Hive, Presto, and BigQuery, which do not conform to the username:password syntax normally used by SQLAlchemy.

", + "nullable": true, "type": "string" }, - "datasource_type": { - "description": "The type of dataset/datasource identified on `datasource_id`.", - "enum": [ - "druid", - "table", - "view" - ], + "engine": { + "description": "SQLAlchemy engine to use", "type": "string" }, - "schema": { - "description": "Datasource schema", + "extra": { + "description": "

JSON string containing extra configuration elements.
1. The engine_params object gets unpacked into the sqlalchemy.create_engine call, while the metadata_params gets unpacked into the sqlalchemy.MetaData call.
2. The metadata_cache_timeout is a cache timeout setting in seconds for metadata fetch of this database. Specify it as \"metadata_cache_timeout\": {\"schema_cache_timeout\": 600, \"table_cache_timeout\": 600}. If unset, cache will not be enabled for the functionality. A timeout of 0 indicates that the cache never expires.
3. The schemas_allowed_for_file_upload is a comma separated list of schemas that CSVs are allowed to upload to. Specify it as \"schemas_allowed_for_file_upload\": [\"public\", \"csv_upload\"]. If database flavor does not support schema or any schema is allowed to be accessed, just leave the list empty
4. the version field is a string specifying the this db's version. This should be used with Presto DBs so that the syntax is correct
5. The allows_virtual_table_explore field is a boolean specifying whether or not the Explore button in SQL Lab results is shown.

", "type": "string" - } - }, - "required": [ - "datasource_type" - ], - "type": "object" - }, - "DistincResponseSchema": { - "properties": { - "count": { - "description": "The total number of distinct values", - "format": "int32", - "type": "integer" }, - "result": { - "items": { - "$ref": "#/components/schemas/DistinctResultResponse" + "impersonate_user": { + "description": "If Presto, all the queries in SQL Lab are going to be executed as the currently logged on user who must have permission to run them.
If Hive and hive.server2.enable.doAs is enabled, will run the queries as service account, but impersonate the currently logged on user via hive.server2.proxy.user property.", + "type": "boolean" + }, + "parameters": { + "additionalProperties": { + "nullable": true }, - "type": "array" - } - }, - "type": "object" - }, - "DistinctResultResponse": { - "properties": { - "text": { - "description": "The distinct item", + "description": "DB-specific parameters for configuration", + "type": "object" + }, + "server_cert": { + "description": "

Optional CA_BUNDLE contents to validate HTTPS requests. Only available on certain database engines.

", + "nullable": true, "type": "string" } }, + "required": [ + "configuration_method", + "engine" + ], "type": "object" }, - "GetFavStarIdsSchema": { - "properties": { - "result": { - "description": "A list of results for each corresponding chart in the request", - "items": { - "$ref": "#/components/schemas/ChartFavStarResponseResult" - }, - "type": "array" - } - }, - "type": "object" - }, - "LogRestApi.get": { + "DatasetColumnsPut": { "properties": { - "action": { - "maxLength": 512, - "nullable": true, + "column_name": { + "maxLength": 255, + "minLength": 1, "type": "string" }, - "dashboard_id": { - "format": "int32", - "nullable": true, - "type": "integer" - }, - "dttm": { - "format": "date-time", + "description": { "nullable": true, "type": "string" }, - "duration_ms": { - "format": "int32", - "nullable": true, - "type": "integer" - }, - "json": { + "expression": { "nullable": true, "type": "string" }, - "referrer": { - "maxLength": 1024, + "extra": { "nullable": true, "type": "string" }, - "slice_id": { - "format": "int32", - "nullable": true, - "type": "integer" + "filterable": { + "type": "boolean" }, - "user": { - "$ref": "#/components/schemas/Meta43" + "groupby": { + "type": "boolean" }, - "user_id": { + "id": { "format": "int32", - "nullable": true, "type": "integer" - } - }, - "type": "object" - }, - "LogRestApi.get_list": { - "properties": { - "action": { - "maxLength": 512, - "nullable": true, - "type": "string" }, - "dashboard_id": { - "format": "int32", - "nullable": true, - "type": "integer" + "is_active": { + "type": "boolean" }, - "dttm": { - "format": "date-time", - "nullable": true, - "type": "string" + "is_dttm": { + "type": "boolean" }, - "duration_ms": { - "format": "int32", + "python_date_format": { + "maxLength": 255, + "minLength": 1, "nullable": true, - "type": "integer" + "type": "string" }, - "json": { + "type": { "nullable": true, "type": "string" }, - "referrer": { - "maxLength": 1024, + "uuid": { + "format": "uuid", "nullable": true, "type": "string" }, - "slice_id": { - "format": "int32", + "verbose_name": { "nullable": true, + "type": "string" + } + }, + "required": [ + "column_name" + ], + "type": "object" + }, + "DatasetColumnsRestApi.get": { + "properties": { + "id": { + "format": "int32", "type": "integer" - }, - "user": { - "$ref": "#/components/schemas/Meta42" - }, - "user_id": { + } + }, + "type": "object" + }, + "DatasetColumnsRestApi.get_list": { + "properties": { + "id": { "format": "int32", - "nullable": true, "type": "integer" } }, "type": "object" }, - "LogRestApi.post": { + "DatasetColumnsRestApi.post": { "properties": { "id": { "format": "int32", @@ -3626,373 +4068,354 @@ }, "type": "object" }, - "LogRestApi.put": { + "DatasetColumnsRestApi.put": { "properties": { - "action": { - "maxLength": 512, - "nullable": true, - "type": "string" - }, - "dttm": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "json": { - "nullable": true, - "type": "string" - }, - "user": { - "nullable": true + "id": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "Meta": { + "DatasetMetricRestApi.get": { "properties": { - "first_name": { - "maxLength": 64, - "type": "string" - }, "id": { "format": "int32", "type": "integer" } }, - "required": [ - "first_name" - ], "type": "object" }, - "Meta1": { + "DatasetMetricRestApi.get_list": { "properties": { - "first_name": { - "maxLength": 64, - "type": "string" - }, "id": { "format": "int32", "type": "integer" } }, - "required": [ - "first_name" - ], "type": "object" }, - "Meta10": { + "DatasetMetricRestApi.post": { "properties": { - "first_name": { - "maxLength": 64, - "type": "string" - }, "id": { "format": "int32", "type": "integer" - }, - "last_name": { - "maxLength": 64, - "type": "string" - }, - "username": { - "maxLength": 64, - "type": "string" } }, - "required": [ - "first_name", - "last_name", - "username" - ], "type": "object" }, - "Meta11": { + "DatasetMetricRestApi.put": { "properties": { - "first_name": { - "maxLength": 64, - "type": "string" - }, "id": { "format": "int32", "type": "integer" - }, - "last_name": { - "maxLength": 64, - "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], "type": "object" }, - "Meta12": { + "DatasetMetricsPut": { "properties": { - "active": { - "nullable": true, - "type": "boolean" - }, - "changed_on": { - "format": "date-time", + "d3format": { + "maxLength": 128, + "minLength": 1, "nullable": true, "type": "string" }, - "created_on": { - "format": "date-time", + "description": { "nullable": true, "type": "string" }, - "email": { - "maxLength": 64, + "expression": { "type": "string" }, - "fail_login_count": { - "format": "int32", + "extra": { "nullable": true, - "type": "integer" - }, - "first_name": { - "maxLength": 64, "type": "string" }, "id": { "format": "int32", "type": "integer" }, - "last_login": { - "format": "date-time", - "nullable": true, + "metric_name": { + "maxLength": 255, + "minLength": 1, "type": "string" }, - "last_name": { - "maxLength": 64, + "metric_type": { + "maxLength": 32, + "minLength": 1, + "nullable": true, "type": "string" }, - "login_count": { - "format": "int32", + "uuid": { + "format": "uuid", "nullable": true, - "type": "integer" + "type": "string" }, - "password": { - "maxLength": 256, + "verbose_name": { "nullable": true, "type": "string" }, - "username": { - "maxLength": 64, + "warning_text": { + "nullable": true, "type": "string" } }, "required": [ - "email", - "first_name", - "last_name", - "username" + "expression", + "metric_name" ], "type": "object" }, - "Meta13": { + "DatasetRelatedChart": { "properties": { - "first_name": { - "maxLength": 64, + "id": { + "format": "int32", + "type": "integer" + }, + "slice_name": { + "type": "string" + }, + "viz_type": { "type": "string" + } + }, + "type": "object" + }, + "DatasetRelatedCharts": { + "properties": { + "count": { + "description": "Chart count", + "format": "int32", + "type": "integer" }, + "result": { + "description": "A list of dashboards", + "items": { + "$ref": "#/components/schemas/DatasetRelatedChart" + }, + "type": "array" + } + }, + "type": "object" + }, + "DatasetRelatedDashboard": { + "properties": { "id": { "format": "int32", "type": "integer" }, - "last_name": { - "maxLength": 64, + "json_metadata": { + "type": "object" + }, + "slug": { + "type": "string" + }, + "title": { "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], "type": "object" }, - "Meta14": { + "DatasetRelatedDashboards": { "properties": { - "first_name": { - "maxLength": 64, + "count": { + "description": "Dashboard count", + "format": "int32", + "type": "integer" + }, + "result": { + "description": "A list of dashboards", + "items": { + "$ref": "#/components/schemas/DatasetRelatedDashboard" + }, + "type": "array" + } + }, + "type": "object" + }, + "DatasetRelatedObjectsResponse": { + "properties": { + "charts": { + "$ref": "#/components/schemas/DatasetRelatedCharts" + }, + "dashboards": { + "$ref": "#/components/schemas/DatasetRelatedDashboards" + } + }, + "type": "object" + }, + "DatasetRestApi.get": { + "properties": { + "cache_timeout": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "columns": { + "$ref": "#/components/schemas/DatasetRestApi.get.TableColumn" + }, + "database": { + "$ref": "#/components/schemas/DatasetRestApi.get.Database" + }, + "datasource_type": { + "readOnly": true + }, + "default_endpoint": { + "nullable": true, + "type": "string" + }, + "description": { + "nullable": true, + "type": "string" + }, + "extra": { + "nullable": true, + "type": "string" + }, + "fetch_values_predicate": { + "nullable": true, "type": "string" }, + "filter_select_enabled": { + "nullable": true, + "type": "boolean" + }, "id": { "format": "int32", "type": "integer" }, - "last_name": { - "maxLength": 64, - "type": "string" - } - }, - "required": [ - "first_name", - "last_name" - ], - "type": "object" - }, - "Meta15": { - "properties": { - "first_name": { - "maxLength": 64, + "is_sqllab_view": { + "nullable": true, + "type": "boolean" + }, + "main_dttm_col": { + "maxLength": 250, + "nullable": true, "type": "string" }, - "id": { + "metrics": { + "$ref": "#/components/schemas/DatasetRestApi.get.SqlMetric" + }, + "offset": { "format": "int32", + "nullable": true, "type": "integer" }, - "last_name": { - "maxLength": 64, + "owners": { + "$ref": "#/components/schemas/DatasetRestApi.get.User" + }, + "schema": { + "maxLength": 255, + "nullable": true, "type": "string" }, - "username": { - "maxLength": 64, + "sql": { + "nullable": true, "type": "string" - } - }, - "required": [ - "first_name", - "last_name", - "username" - ], - "type": "object" - }, - "Meta16": { - "properties": { - "id": { - "format": "int32", - "type": "integer" }, - "name": { - "maxLength": 64, + "table_name": { + "maxLength": 250, + "type": "string" + }, + "template_params": { + "nullable": true, "type": "string" + }, + "url": { + "readOnly": true } }, "required": [ - "name" + "columns", + "database", + "metrics", + "table_name" ], "type": "object" }, - "Meta17": { + "DatasetRestApi.get.Database": { "properties": { - "first_name": { - "maxLength": 64, + "backend": { + "readOnly": true + }, + "database_name": { + "maxLength": 250, "type": "string" }, "id": { "format": "int32", "type": "integer" - }, - "last_name": { - "maxLength": 64, - "type": "string" - }, - "username": { - "maxLength": 64, - "type": "string" } }, "required": [ - "first_name", - "last_name", - "username" + "database_name" ], "type": "object" }, - "Meta18": { + "DatasetRestApi.get.SqlMetric": { "properties": { - "first_name": { - "maxLength": 64, + "changed_on": { + "format": "date-time", + "nullable": true, "type": "string" }, - "last_name": { - "maxLength": 64, - "type": "string" - } - }, - "required": [ - "first_name", - "last_name" - ], - "type": "object" - }, - "Meta19": { - "properties": { - "first_name": { - "maxLength": 64, + "created_on": { + "format": "date-time", + "nullable": true, "type": "string" }, - "username": { - "maxLength": 64, + "d3format": { + "maxLength": 128, + "nullable": true, "type": "string" - } - }, - "required": [ - "first_name", - "username" - ], - "type": "object" - }, - "Meta2": { - "properties": { - "id": { - "format": "int32", - "type": "integer" }, - "name": { - "maxLength": 250, + "description": { "nullable": true, "type": "string" - } - }, - "type": "object" - }, - "Meta20": { - "properties": { - "first_name": { - "maxLength": 64, + }, + "expression": { + "type": "string" + }, + "extra": { + "nullable": true, "type": "string" }, "id": { "format": "int32", "type": "integer" }, - "last_name": { - "maxLength": 64, + "metric_name": { + "maxLength": 255, "type": "string" }, - "username": { - "maxLength": 64, + "metric_type": { + "maxLength": 32, + "nullable": true, "type": "string" - } - }, - "required": [ - "first_name", - "last_name", - "username" - ], - "type": "object" - }, - "Meta21": { - "properties": { - "database_name": { - "maxLength": 250, + }, + "uuid": { + "format": "uuid", + "nullable": true, "type": "string" }, - "id": { - "format": "int32", - "type": "integer" + "verbose_name": { + "maxLength": 1024, + "nullable": true, + "type": "string" + }, + "warning_text": { + "nullable": true, + "type": "string" } }, "required": [ - "database_name" + "expression", + "metric_name" ], "type": "object" }, - "Meta22": { + "DatasetRestApi.get.TableColumn": { "properties": { "changed_on": { "format": "date-time", @@ -4016,6 +4439,10 @@ "nullable": true, "type": "string" }, + "extra": { + "nullable": true, + "type": "string" + }, "filterable": { "nullable": true, "type": "boolean" @@ -4042,7 +4469,6 @@ "type": "string" }, "type": { - "maxLength": 32, "nullable": true, "type": "string" }, @@ -4065,23 +4491,7 @@ ], "type": "object" }, - "Meta23": { - "properties": { - "database_name": { - "maxLength": 250, - "type": "string" - }, - "id": { - "format": "int32", - "type": "integer" - } - }, - "required": [ - "database_name" - ], - "type": "object" - }, - "Meta24": { + "DatasetRestApi.get.User": { "properties": { "first_name": { "maxLength": 64, @@ -4107,498 +4517,641 @@ ], "type": "object" }, - "Meta25": { + "DatasetRestApi.get_list": { "properties": { - "changed_on": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "created_on": { - "format": "date-time", - "nullable": true, - "type": "string" + "changed_by": { + "$ref": "#/components/schemas/DatasetRestApi.get_list.User" }, - "d3format": { - "maxLength": 128, - "nullable": true, - "type": "string" + "changed_by_name": { + "readOnly": true }, - "description": { - "nullable": true, - "type": "string" + "changed_by_url": { + "readOnly": true }, - "expression": { - "type": "string" + "changed_on_delta_humanized": { + "readOnly": true }, - "extra": { - "nullable": true, - "type": "string" + "changed_on_utc": { + "readOnly": true }, - "id": { - "format": "int32", - "type": "integer" + "database": { + "$ref": "#/components/schemas/DatasetRestApi.get_list.Database" }, - "metric_name": { - "maxLength": 255, - "type": "string" + "datasource_type": { + "readOnly": true }, - "metric_type": { - "maxLength": 32, + "default_endpoint": { "nullable": true, "type": "string" }, - "uuid": { - "format": "uuid", + "description": { "nullable": true, "type": "string" }, - "verbose_name": { - "maxLength": 1024, - "nullable": true, - "type": "string" + "explore_url": { + "readOnly": true }, - "warning_text": { + "extra": { "nullable": true, "type": "string" - } - }, - "required": [ - "expression", - "metric_name" - ], - "type": "object" - }, - "Meta26": { - "properties": { - "first_name": { - "maxLength": 64, - "type": "string" }, "id": { "format": "int32", "type": "integer" }, - "last_name": { - "maxLength": 64, + "kind": { + "readOnly": true + }, + "owners": { + "$ref": "#/components/schemas/DatasetRestApi.get_list.User1" + }, + "schema": { + "maxLength": 255, + "nullable": true, "type": "string" }, - "username": { - "maxLength": 64, + "sql": { + "nullable": true, + "type": "string" + }, + "table_name": { + "maxLength": 250, "type": "string" } }, "required": [ - "first_name", - "last_name", - "username" + "database", + "table_name" ], "type": "object" }, - "Meta27": { + "DatasetRestApi.get_list.Database": { "properties": { "database_name": { "maxLength": 250, "type": "string" - } - }, - "required": [ - "database_name" - ], - "type": "object" - }, - "Meta28": { - "properties": { + }, "id": { "format": "int32", "type": "integer" } }, + "required": [ + "database_name" + ], "type": "object" }, - "Meta29": { + "DatasetRestApi.get_list.User": { "properties": { "first_name": { "maxLength": 64, "type": "string" }, - "id": { - "format": "int32", - "type": "integer" - }, - "last_name": { + "username": { "maxLength": 64, "type": "string" } }, "required": [ "first_name", - "last_name" + "username" ], "type": "object" }, - "Meta3": { + "DatasetRestApi.get_list.User1": { "properties": { "first_name": { "maxLength": 64, "type": "string" }, + "id": { + "format": "int32", + "type": "integer" + }, "last_name": { "maxLength": 64, "type": "string" + }, + "username": { + "maxLength": 64, + "type": "string" } }, "required": [ "first_name", - "last_name" + "last_name", + "username" ], "type": "object" }, - "Meta30": { + "DatasetRestApi.post": { "properties": { - "database_name": { + "database": { + "format": "int32", + "type": "integer" + }, + "owners": { + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "schema": { "maxLength": 250, + "minLength": 0, "type": "string" }, - "id": { - "format": "int32", - "type": "integer" + "table_name": { + "maxLength": 250, + "minLength": 1, + "type": "string" } }, "required": [ - "database_name" + "database", + "table_name" ], "type": "object" }, - "Meta31": { + "DatasetRestApi.put": { "properties": { - "first_name": { - "maxLength": 64, + "cache_timeout": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "columns": { + "items": { + "$ref": "#/components/schemas/DatasetColumnsPut" + }, + "type": "array" + }, + "database_id": { + "format": "int32", + "type": "integer" + }, + "default_endpoint": { + "nullable": true, "type": "string" }, - "id": { + "description": { + "nullable": true, + "type": "string" + }, + "extra": { + "nullable": true, + "type": "string" + }, + "fetch_values_predicate": { + "maxLength": 1000, + "minLength": 0, + "nullable": true, + "type": "string" + }, + "filter_select_enabled": { + "nullable": true, + "type": "boolean" + }, + "is_sqllab_view": { + "nullable": true, + "type": "boolean" + }, + "main_dttm_col": { + "nullable": true, + "type": "string" + }, + "metrics": { + "items": { + "$ref": "#/components/schemas/DatasetMetricsPut" + }, + "type": "array" + }, + "offset": { "format": "int32", + "nullable": true, "type": "integer" }, - "last_name": { - "maxLength": 64, + "owners": { + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "schema": { + "maxLength": 255, + "minLength": 0, + "nullable": true, + "type": "string" + }, + "sql": { + "nullable": true, + "type": "string" + }, + "table_name": { + "maxLength": 250, + "minLength": 1, + "nullable": true, + "type": "string" + }, + "template_params": { + "nullable": true, "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], "type": "object" }, - "Meta32": { + "Datasource": { "properties": { "database_name": { - "maxLength": 250, + "description": "Datasource name", "type": "string" }, - "id": { - "format": "int32", - "type": "integer" + "datasource_name": { + "description": "The datasource name.", + "type": "string" + }, + "datasource_type": { + "description": "The type of dataset/datasource identified on `datasource_id`.", + "enum": [ + "druid", + "table", + "view" + ], + "type": "string" + }, + "schema": { + "description": "Datasource schema", + "type": "string" } }, "required": [ - "database_name" + "datasource_type" ], "type": "object" }, - "Meta33": { + "DistincResponseSchema": { "properties": { - "first_name": { - "maxLength": 64, - "type": "string" + "count": { + "description": "The total number of distinct values", + "format": "int32", + "type": "integer" }, - "last_name": { - "maxLength": 64, - "type": "string" + "result": { + "items": { + "$ref": "#/components/schemas/DistinctResultResponse" + }, + "type": "array" } }, - "required": [ - "first_name", - "last_name" - ], "type": "object" }, - "Meta34": { + "DistinctResultResponse": { "properties": { - "first_name": { - "maxLength": 64, - "type": "string" - }, - "last_name": { - "maxLength": 64, + "text": { + "description": "The distinct item", "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], "type": "object" }, - "Meta35": { + "FilterSetRestApi.get": { "properties": { - "id": { + "dashboard_id": { "format": "int32", + "nullable": true, "type": "integer" }, - "type": { - "maxLength": 50, + "description": { + "nullable": true, "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, - "Meta36": { - "properties": { - "first_name": { - "maxLength": 64, + }, + "id": { + "format": "int32", + "type": "integer" + }, + "name": { + "maxLength": 500, "type": "string" }, - "id": { + "owner_id": { "format": "int32", "type": "integer" }, - "last_name": { - "maxLength": 64, + "owner_type": { + "maxLength": 255, "type": "string" + }, + "params": { + "readOnly": true } }, "required": [ - "first_name", - "last_name" + "name", + "owner_id", + "owner_type" ], "type": "object" }, - "Meta37": { + "FilterSetRestApi.get_list": { "properties": { - "database_name": { - "maxLength": 250, + "changed_by_fk": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "changed_on": { + "format": "date-time", + "nullable": true, "type": "string" }, - "id": { + "created_by_fk": { "format": "int32", + "nullable": true, "type": "integer" - } - }, - "required": [ - "database_name" - ], - "type": "object" - }, - "Meta38": { - "properties": { - "id": { + }, + "created_on": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "dashboard_id": { "format": "int32", + "nullable": true, "type": "integer" }, - "recipient_config_json": { + "description": { "nullable": true, "type": "string" }, - "type": { - "maxLength": 50, + "id": { + "format": "int32", + "type": "integer" + }, + "name": { + "maxLength": 500, + "type": "string" + }, + "owner_id": { + "format": "int32", + "type": "integer" + }, + "owner_type": { + "maxLength": 255, "type": "string" + }, + "params": { + "readOnly": true } }, "required": [ - "type" + "name", + "owner_id", + "owner_type" ], "type": "object" }, - "Meta39": { + "FilterSetRestApi.post": { "properties": { - "first_name": { - "maxLength": 64, + "description": { + "maxLength": 1000, + "minLength": 1, + "nullable": true, "type": "string" }, - "id": { + "json_metadata": { + "type": "string" + }, + "name": { + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "owner_id": { "format": "int32", "type": "integer" }, - "last_name": { - "maxLength": 64, + "owner_type": { + "enum": [ + "User", + "Dashboard" + ], "type": "string" } }, "required": [ - "first_name", - "last_name" + "json_metadata", + "name", + "owner_type" ], "type": "object" }, - "Meta4": { + "FilterSetRestApi.put": { "properties": { - "first_name": { - "maxLength": 64, + "description": { + "maxLength": 1000, + "minLength": 1, "type": "string" }, - "last_name": { - "maxLength": 64, + "json_metadata": { "type": "string" - } - }, - "required": [ - "first_name", - "last_name" - ], - "type": "object" - }, - "Meta40": { - "properties": { - "id": { - "format": "int32", - "type": "integer" }, - "slice_name": { - "maxLength": 250, - "nullable": true, + "name": { + "maxLength": 500, + "minLength": 0, "type": "string" }, - "viz_type": { - "maxLength": 250, - "nullable": true, + "owner_type": { + "enum": [ + "Dashboard" + ], "type": "string" } }, "type": "object" }, - "Meta41": { + "GetFavStarIdsSchema": { "properties": { - "dashboard_title": { - "maxLength": 500, - "nullable": true, - "type": "string" - }, - "id": { - "format": "int32", - "type": "integer" + "result": { + "description": "A list of results for each corresponding chart in the request", + "items": { + "$ref": "#/components/schemas/ChartFavStarResponseResult" + }, + "type": "array" } }, "type": "object" }, - "Meta42": { + "KeyValuePostSchema": { "properties": { - "username": { - "maxLength": 64, + "value": { + "description": "Any type of JSON supported text.", "type": "string" } }, "required": [ - "username" + "value" ], "type": "object" }, - "Meta43": { + "KeyValuePutSchema": { "properties": { - "username": { - "maxLength": 64, + "value": { + "description": "Any type of JSON supported text.", "type": "string" } }, "required": [ - "username" + "value" ], "type": "object" }, - "Meta5": { + "LogRestApi.get": { "properties": { - "first_name": { - "maxLength": 64, + "action": { + "maxLength": 512, + "nullable": true, "type": "string" }, - "id": { + "dashboard_id": { "format": "int32", + "nullable": true, "type": "integer" }, - "last_name": { - "maxLength": 64, + "dttm": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "duration_ms": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "json": { + "nullable": true, + "type": "string" + }, + "referrer": { + "maxLength": 1024, + "nullable": true, "type": "string" + }, + "slice_id": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "user": { + "$ref": "#/components/schemas/LogRestApi.get.User" + }, + "user_id": { + "format": "int32", + "nullable": true, + "type": "integer" } }, - "required": [ - "first_name", - "last_name" - ], "type": "object" }, - "Meta6": { + "LogRestApi.get.User": { "properties": { - "default_endpoint": { - "nullable": true, - "type": "string" - }, - "table_name": { - "maxLength": 250, + "username": { + "maxLength": 64, "type": "string" } }, "required": [ - "table_name" + "username" ], "type": "object" }, - "Meta7": { + "LogRestApi.get_list": { "properties": { - "first_name": { - "maxLength": 64, + "action": { + "maxLength": 512, + "nullable": true, "type": "string" }, - "id": { + "dashboard_id": { "format": "int32", + "nullable": true, "type": "integer" }, - "last_name": { - "maxLength": 64, + "dttm": { + "format": "date-time", + "nullable": true, "type": "string" }, - "username": { - "maxLength": 64, + "duration_ms": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "json": { + "nullable": true, + "type": "string" + }, + "referrer": { + "maxLength": 1024, + "nullable": true, "type": "string" + }, + "slice_id": { + "format": "int32", + "nullable": true, + "type": "integer" + }, + "user": { + "$ref": "#/components/schemas/LogRestApi.get_list.User" + }, + "user_id": { + "format": "int32", + "nullable": true, + "type": "integer" } }, - "required": [ - "first_name", - "last_name", - "username" - ], "type": "object" }, - "Meta8": { + "LogRestApi.get_list.User": { "properties": { - "first_name": { - "maxLength": 64, - "type": "string" - }, - "last_name": { + "username": { "maxLength": 64, "type": "string" } }, "required": [ - "first_name", - "last_name" + "username" ], "type": "object" }, - "Meta9": { + "LogRestApi.post": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "LogRestApi.put": { "properties": { - "dashboard_title": { - "maxLength": 500, + "action": { + "maxLength": 512, "nullable": true, "type": "string" }, - "id": { - "format": "int32", - "type": "integer" + "dttm": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "json": { + "nullable": true, + "type": "string" + }, + "user": { + "nullable": true } }, "type": "object" @@ -4615,7 +5168,7 @@ "type": "string" }, "database": { - "$ref": "#/components/schemas/Meta28" + "$ref": "#/components/schemas/QueryRestApi.get.Database" }, "end_result_backend_time": { "nullable": true, @@ -4722,6 +5275,15 @@ ], "type": "object" }, + "QueryRestApi.get.Database": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "QueryRestApi.get_list": { "properties": { "changed_on": { @@ -4730,7 +5292,7 @@ "type": "string" }, "database": { - "$ref": "#/components/schemas/Meta27" + "$ref": "#/components/schemas/QueryRestApi.get_list.Database" }, "end_time": { "nullable": true, @@ -4785,7 +5347,7 @@ "type": "string" }, "user": { - "$ref": "#/components/schemas/Meta26" + "$ref": "#/components/schemas/QueryRestApi.get_list.User" } }, "required": [ @@ -4793,6 +5355,44 @@ ], "type": "object" }, + "QueryRestApi.get_list.Database": { + "properties": { + "database_name": { + "maxLength": 250, + "type": "string" + } + }, + "required": [ + "database_name" + ], + "type": "object" + }, + "QueryRestApi.get_list.User": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "last_name": { + "maxLength": 64, + "type": "string" + }, + "username": { + "maxLength": 64, + "type": "string" + } + }, + "required": [ + "first_name", + "last_name", + "username" + ], + "type": "object" + }, "QueryRestApi.post": { "properties": { "id": { @@ -4991,7 +5591,7 @@ "type": "boolean" }, "chart": { - "$ref": "#/components/schemas/Meta40" + "$ref": "#/components/schemas/ReportScheduleRestApi.get.Slice" }, "context_markdown": { "nullable": true, @@ -5007,15 +5607,19 @@ "type": "string" }, "dashboard": { - "$ref": "#/components/schemas/Meta41" + "$ref": "#/components/schemas/ReportScheduleRestApi.get.Dashboard" }, "database": { - "$ref": "#/components/schemas/Meta37" + "$ref": "#/components/schemas/ReportScheduleRestApi.get.Database" }, "description": { "nullable": true, "type": "string" }, + "force_screenshot": { + "nullable": true, + "type": "boolean" + }, "grace_period": { "format": "int32", "nullable": true, @@ -5054,10 +5658,10 @@ "type": "string" }, "owners": { - "$ref": "#/components/schemas/Meta39" + "$ref": "#/components/schemas/ReportScheduleRestApi.get.User" }, "recipients": { - "$ref": "#/components/schemas/Meta38" + "$ref": "#/components/schemas/ReportScheduleRestApi.get.ReportRecipients" }, "report_format": { "maxLength": 50, @@ -5099,6 +5703,96 @@ ], "type": "object" }, + "ReportScheduleRestApi.get.Dashboard": { + "properties": { + "dashboard_title": { + "maxLength": 500, + "nullable": true, + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ReportScheduleRestApi.get.Database": { + "properties": { + "database_name": { + "maxLength": 250, + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "database_name" + ], + "type": "object" + }, + "ReportScheduleRestApi.get.ReportRecipients": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + }, + "recipient_config_json": { + "nullable": true, + "type": "string" + }, + "type": { + "maxLength": 50, + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "ReportScheduleRestApi.get.Slice": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + }, + "slice_name": { + "maxLength": 250, + "nullable": true, + "type": "string" + }, + "viz_type": { + "maxLength": 250, + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "ReportScheduleRestApi.get.User": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "last_name": { + "maxLength": 64, + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "type": "object" + }, "ReportScheduleRestApi.get_list": { "properties": { "active": { @@ -5106,7 +5800,7 @@ "type": "boolean" }, "changed_by": { - "$ref": "#/components/schemas/Meta34" + "$ref": "#/components/schemas/ReportScheduleRestApi.get_list.User1" }, "changed_on": { "format": "date-time", @@ -5117,7 +5811,7 @@ "readOnly": true }, "created_by": { - "$ref": "#/components/schemas/Meta33" + "$ref": "#/components/schemas/ReportScheduleRestApi.get_list.User" }, "created_on": { "format": "date-time", @@ -5159,10 +5853,10 @@ "type": "string" }, "owners": { - "$ref": "#/components/schemas/Meta36" + "$ref": "#/components/schemas/ReportScheduleRestApi.get_list.User2" }, "recipients": { - "$ref": "#/components/schemas/Meta35" + "$ref": "#/components/schemas/ReportScheduleRestApi.get_list.ReportRecipients" }, "timezone": { "maxLength": 100, @@ -5181,6 +5875,77 @@ ], "type": "object" }, + "ReportScheduleRestApi.get_list.ReportRecipients": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + }, + "type": { + "maxLength": 50, + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "ReportScheduleRestApi.get_list.User": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "last_name": { + "maxLength": 64, + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "type": "object" + }, + "ReportScheduleRestApi.get_list.User1": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "last_name": { + "maxLength": 64, + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "type": "object" + }, + "ReportScheduleRestApi.get_list.User2": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "last_name": { + "maxLength": 64, + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "type": "object" + }, "ReportScheduleRestApi.post": { "properties": { "active": { @@ -5221,6 +5986,9 @@ "nullable": true, "type": "string" }, + "force_screenshot": { + "type": "boolean" + }, "grace_period": { "description": "Once an alert is triggered, how long, in seconds, before Superset nags you again. (in seconds)", "example": 14400, @@ -5271,6 +6039,601 @@ }, "timezone": { "description": "A timezone string that represents the location of the timezone.", + "enum": [ + "Africa/Abidjan", + "Africa/Accra", + "Africa/Addis_Ababa", + "Africa/Algiers", + "Africa/Asmara", + "Africa/Asmera", + "Africa/Bamako", + "Africa/Bangui", + "Africa/Banjul", + "Africa/Bissau", + "Africa/Blantyre", + "Africa/Brazzaville", + "Africa/Bujumbura", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Ceuta", + "Africa/Conakry", + "Africa/Dakar", + "Africa/Dar_es_Salaam", + "Africa/Djibouti", + "Africa/Douala", + "Africa/El_Aaiun", + "Africa/Freetown", + "Africa/Gaborone", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Juba", + "Africa/Kampala", + "Africa/Khartoum", + "Africa/Kigali", + "Africa/Kinshasa", + "Africa/Lagos", + "Africa/Libreville", + "Africa/Lome", + "Africa/Luanda", + "Africa/Lubumbashi", + "Africa/Lusaka", + "Africa/Malabo", + "Africa/Maputo", + "Africa/Maseru", + "Africa/Mbabane", + "Africa/Mogadishu", + "Africa/Monrovia", + "Africa/Nairobi", + "Africa/Ndjamena", + "Africa/Niamey", + "Africa/Nouakchott", + "Africa/Ouagadougou", + "Africa/Porto-Novo", + "Africa/Sao_Tome", + "Africa/Timbuktu", + "Africa/Tripoli", + "Africa/Tunis", + "Africa/Windhoek", + "America/Adak", + "America/Anchorage", + "America/Anguilla", + "America/Antigua", + "America/Araguaina", + "America/Argentina/Buenos_Aires", + "America/Argentina/Catamarca", + "America/Argentina/ComodRivadavia", + "America/Argentina/Cordoba", + "America/Argentina/Jujuy", + "America/Argentina/La_Rioja", + "America/Argentina/Mendoza", + "America/Argentina/Rio_Gallegos", + "America/Argentina/Salta", + "America/Argentina/San_Juan", + "America/Argentina/San_Luis", + "America/Argentina/Tucuman", + "America/Argentina/Ushuaia", + "America/Aruba", + "America/Asuncion", + "America/Atikokan", + "America/Atka", + "America/Bahia", + "America/Bahia_Banderas", + "America/Barbados", + "America/Belem", + "America/Belize", + "America/Blanc-Sablon", + "America/Boa_Vista", + "America/Bogota", + "America/Boise", + "America/Buenos_Aires", + "America/Cambridge_Bay", + "America/Campo_Grande", + "America/Cancun", + "America/Caracas", + "America/Catamarca", + "America/Cayenne", + "America/Cayman", + "America/Chicago", + "America/Chihuahua", + "America/Coral_Harbour", + "America/Cordoba", + "America/Costa_Rica", + "America/Creston", + "America/Cuiaba", + "America/Curacao", + "America/Danmarkshavn", + "America/Dawson", + "America/Dawson_Creek", + "America/Denver", + "America/Detroit", + "America/Dominica", + "America/Edmonton", + "America/Eirunepe", + "America/El_Salvador", + "America/Ensenada", + "America/Fort_Nelson", + "America/Fort_Wayne", + "America/Fortaleza", + "America/Glace_Bay", + "America/Godthab", + "America/Goose_Bay", + "America/Grand_Turk", + "America/Grenada", + "America/Guadeloupe", + "America/Guatemala", + "America/Guayaquil", + "America/Guyana", + "America/Halifax", + "America/Havana", + "America/Hermosillo", + "America/Indiana/Indianapolis", + "America/Indiana/Knox", + "America/Indiana/Marengo", + "America/Indiana/Petersburg", + "America/Indiana/Tell_City", + "America/Indiana/Vevay", + "America/Indiana/Vincennes", + "America/Indiana/Winamac", + "America/Indianapolis", + "America/Inuvik", + "America/Iqaluit", + "America/Jamaica", + "America/Jujuy", + "America/Juneau", + "America/Kentucky/Louisville", + "America/Kentucky/Monticello", + "America/Knox_IN", + "America/Kralendijk", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Louisville", + "America/Lower_Princes", + "America/Maceio", + "America/Managua", + "America/Manaus", + "America/Marigot", + "America/Martinique", + "America/Matamoros", + "America/Mazatlan", + "America/Mendoza", + "America/Menominee", + "America/Merida", + "America/Metlakatla", + "America/Mexico_City", + "America/Miquelon", + "America/Moncton", + "America/Monterrey", + "America/Montevideo", + "America/Montreal", + "America/Montserrat", + "America/Nassau", + "America/New_York", + "America/Nipigon", + "America/Nome", + "America/Noronha", + "America/North_Dakota/Beulah", + "America/North_Dakota/Center", + "America/North_Dakota/New_Salem", + "America/Nuuk", + "America/Ojinaga", + "America/Panama", + "America/Pangnirtung", + "America/Paramaribo", + "America/Phoenix", + "America/Port-au-Prince", + "America/Port_of_Spain", + "America/Porto_Acre", + "America/Porto_Velho", + "America/Puerto_Rico", + "America/Punta_Arenas", + "America/Rainy_River", + "America/Rankin_Inlet", + "America/Recife", + "America/Regina", + "America/Resolute", + "America/Rio_Branco", + "America/Rosario", + "America/Santa_Isabel", + "America/Santarem", + "America/Santiago", + "America/Santo_Domingo", + "America/Sao_Paulo", + "America/Scoresbysund", + "America/Shiprock", + "America/Sitka", + "America/St_Barthelemy", + "America/St_Johns", + "America/St_Kitts", + "America/St_Lucia", + "America/St_Thomas", + "America/St_Vincent", + "America/Swift_Current", + "America/Tegucigalpa", + "America/Thule", + "America/Thunder_Bay", + "America/Tijuana", + "America/Toronto", + "America/Tortola", + "America/Vancouver", + "America/Virgin", + "America/Whitehorse", + "America/Winnipeg", + "America/Yakutat", + "America/Yellowknife", + "Antarctica/Casey", + "Antarctica/Davis", + "Antarctica/DumontDUrville", + "Antarctica/Macquarie", + "Antarctica/Mawson", + "Antarctica/McMurdo", + "Antarctica/Palmer", + "Antarctica/Rothera", + "Antarctica/South_Pole", + "Antarctica/Syowa", + "Antarctica/Troll", + "Antarctica/Vostok", + "Arctic/Longyearbyen", + "Asia/Aden", + "Asia/Almaty", + "Asia/Amman", + "Asia/Anadyr", + "Asia/Aqtau", + "Asia/Aqtobe", + "Asia/Ashgabat", + "Asia/Ashkhabad", + "Asia/Atyrau", + "Asia/Baghdad", + "Asia/Bahrain", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Barnaul", + "Asia/Beirut", + "Asia/Bishkek", + "Asia/Brunei", + "Asia/Calcutta", + "Asia/Chita", + "Asia/Choibalsan", + "Asia/Chongqing", + "Asia/Chungking", + "Asia/Colombo", + "Asia/Dacca", + "Asia/Damascus", + "Asia/Dhaka", + "Asia/Dili", + "Asia/Dubai", + "Asia/Dushanbe", + "Asia/Famagusta", + "Asia/Gaza", + "Asia/Harbin", + "Asia/Hebron", + "Asia/Ho_Chi_Minh", + "Asia/Hong_Kong", + "Asia/Hovd", + "Asia/Irkutsk", + "Asia/Istanbul", + "Asia/Jakarta", + "Asia/Jayapura", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kashgar", + "Asia/Kathmandu", + "Asia/Katmandu", + "Asia/Khandyga", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuching", + "Asia/Kuwait", + "Asia/Macao", + "Asia/Macau", + "Asia/Magadan", + "Asia/Makassar", + "Asia/Manila", + "Asia/Muscat", + "Asia/Nicosia", + "Asia/Novokuznetsk", + "Asia/Novosibirsk", + "Asia/Omsk", + "Asia/Oral", + "Asia/Phnom_Penh", + "Asia/Pontianak", + "Asia/Pyongyang", + "Asia/Qatar", + "Asia/Qostanay", + "Asia/Qyzylorda", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Saigon", + "Asia/Sakhalin", + "Asia/Samarkand", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tel_Aviv", + "Asia/Thimbu", + "Asia/Thimphu", + "Asia/Tokyo", + "Asia/Tomsk", + "Asia/Ujung_Pandang", + "Asia/Ulaanbaatar", + "Asia/Ulan_Bator", + "Asia/Urumqi", + "Asia/Ust-Nera", + "Asia/Vientiane", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yangon", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Atlantic/Azores", + "Atlantic/Bermuda", + "Atlantic/Canary", + "Atlantic/Cape_Verde", + "Atlantic/Faeroe", + "Atlantic/Faroe", + "Atlantic/Jan_Mayen", + "Atlantic/Madeira", + "Atlantic/Reykjavik", + "Atlantic/South_Georgia", + "Atlantic/St_Helena", + "Atlantic/Stanley", + "Australia/ACT", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Broken_Hill", + "Australia/Canberra", + "Australia/Currie", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lindeman", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/NSW", + "Australia/North", + "Australia/Perth", + "Australia/Queensland", + "Australia/South", + "Australia/Sydney", + "Australia/Tasmania", + "Australia/Victoria", + "Australia/West", + "Australia/Yancowinna", + "Brazil/Acre", + "Brazil/DeNoronha", + "Brazil/East", + "Brazil/West", + "CET", + "CST6CDT", + "Canada/Atlantic", + "Canada/Central", + "Canada/Eastern", + "Canada/Mountain", + "Canada/Newfoundland", + "Canada/Pacific", + "Canada/Saskatchewan", + "Canada/Yukon", + "Chile/Continental", + "Chile/EasterIsland", + "Cuba", + "EET", + "EST", + "EST5EDT", + "Egypt", + "Eire", + "Etc/GMT", + "Etc/GMT+0", + "Etc/GMT+1", + "Etc/GMT+10", + "Etc/GMT+11", + "Etc/GMT+12", + "Etc/GMT+2", + "Etc/GMT+3", + "Etc/GMT+4", + "Etc/GMT+5", + "Etc/GMT+6", + "Etc/GMT+7", + "Etc/GMT+8", + "Etc/GMT+9", + "Etc/GMT-0", + "Etc/GMT-1", + "Etc/GMT-10", + "Etc/GMT-11", + "Etc/GMT-12", + "Etc/GMT-13", + "Etc/GMT-14", + "Etc/GMT-2", + "Etc/GMT-3", + "Etc/GMT-4", + "Etc/GMT-5", + "Etc/GMT-6", + "Etc/GMT-7", + "Etc/GMT-8", + "Etc/GMT-9", + "Etc/GMT0", + "Etc/Greenwich", + "Etc/UCT", + "Etc/UTC", + "Etc/Universal", + "Etc/Zulu", + "Europe/Amsterdam", + "Europe/Andorra", + "Europe/Astrakhan", + "Europe/Athens", + "Europe/Belfast", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Busingen", + "Europe/Chisinau", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Gibraltar", + "Europe/Guernsey", + "Europe/Helsinki", + "Europe/Isle_of_Man", + "Europe/Istanbul", + "Europe/Jersey", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Kirov", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Luxembourg", + "Europe/Madrid", + "Europe/Malta", + "Europe/Mariehamn", + "Europe/Minsk", + "Europe/Monaco", + "Europe/Moscow", + "Europe/Nicosia", + "Europe/Oslo", + "Europe/Paris", + "Europe/Podgorica", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/San_Marino", + "Europe/Sarajevo", + "Europe/Saratov", + "Europe/Simferopol", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Tirane", + "Europe/Tiraspol", + "Europe/Ulyanovsk", + "Europe/Uzhgorod", + "Europe/Vaduz", + "Europe/Vatican", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zaporozhye", + "Europe/Zurich", + "GB", + "GB-Eire", + "GMT", + "GMT+0", + "GMT-0", + "GMT0", + "Greenwich", + "HST", + "Hongkong", + "Iceland", + "Indian/Antananarivo", + "Indian/Chagos", + "Indian/Christmas", + "Indian/Cocos", + "Indian/Comoro", + "Indian/Kerguelen", + "Indian/Mahe", + "Indian/Maldives", + "Indian/Mauritius", + "Indian/Mayotte", + "Indian/Reunion", + "Iran", + "Israel", + "Jamaica", + "Japan", + "Kwajalein", + "Libya", + "MET", + "MST", + "MST7MDT", + "Mexico/BajaNorte", + "Mexico/BajaSur", + "Mexico/General", + "NZ", + "NZ-CHAT", + "Navajo", + "PRC", + "PST8PDT", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Bougainville", + "Pacific/Chatham", + "Pacific/Chuuk", + "Pacific/Easter", + "Pacific/Efate", + "Pacific/Enderbury", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Funafuti", + "Pacific/Galapagos", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Johnston", + "Pacific/Kiritimati", + "Pacific/Kosrae", + "Pacific/Kwajalein", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Nauru", + "Pacific/Niue", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Palau", + "Pacific/Pitcairn", + "Pacific/Pohnpei", + "Pacific/Ponape", + "Pacific/Port_Moresby", + "Pacific/Rarotonga", + "Pacific/Saipan", + "Pacific/Samoa", + "Pacific/Tahiti", + "Pacific/Tarawa", + "Pacific/Tongatapu", + "Pacific/Truk", + "Pacific/Wake", + "Pacific/Wallis", + "Pacific/Yap", + "Poland", + "Portugal", + "ROC", + "ROK", + "Singapore", + "Turkey", + "UCT", + "US/Alaska", + "US/Aleutian", + "US/Arizona", + "US/Central", + "US/East-Indiana", + "US/Eastern", + "US/Hawaii", + "US/Indiana-Starke", + "US/Michigan", + "US/Mountain", + "US/Pacific", + "US/Samoa", + "UTC", + "Universal", + "W-SU", + "WET", + "Zulu" + ], "type": "string" }, "type": { @@ -5347,6 +6710,9 @@ "nullable": true, "type": "string" }, + "force_screenshot": { + "type": "boolean" + }, "grace_period": { "description": "Once an alert is triggered, how long, in seconds, before Superset nags you again. (in seconds)", "example": 14400, @@ -5397,6 +6763,601 @@ }, "timezone": { "description": "A timezone string that represents the location of the timezone.", + "enum": [ + "Africa/Abidjan", + "Africa/Accra", + "Africa/Addis_Ababa", + "Africa/Algiers", + "Africa/Asmara", + "Africa/Asmera", + "Africa/Bamako", + "Africa/Bangui", + "Africa/Banjul", + "Africa/Bissau", + "Africa/Blantyre", + "Africa/Brazzaville", + "Africa/Bujumbura", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Ceuta", + "Africa/Conakry", + "Africa/Dakar", + "Africa/Dar_es_Salaam", + "Africa/Djibouti", + "Africa/Douala", + "Africa/El_Aaiun", + "Africa/Freetown", + "Africa/Gaborone", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Juba", + "Africa/Kampala", + "Africa/Khartoum", + "Africa/Kigali", + "Africa/Kinshasa", + "Africa/Lagos", + "Africa/Libreville", + "Africa/Lome", + "Africa/Luanda", + "Africa/Lubumbashi", + "Africa/Lusaka", + "Africa/Malabo", + "Africa/Maputo", + "Africa/Maseru", + "Africa/Mbabane", + "Africa/Mogadishu", + "Africa/Monrovia", + "Africa/Nairobi", + "Africa/Ndjamena", + "Africa/Niamey", + "Africa/Nouakchott", + "Africa/Ouagadougou", + "Africa/Porto-Novo", + "Africa/Sao_Tome", + "Africa/Timbuktu", + "Africa/Tripoli", + "Africa/Tunis", + "Africa/Windhoek", + "America/Adak", + "America/Anchorage", + "America/Anguilla", + "America/Antigua", + "America/Araguaina", + "America/Argentina/Buenos_Aires", + "America/Argentina/Catamarca", + "America/Argentina/ComodRivadavia", + "America/Argentina/Cordoba", + "America/Argentina/Jujuy", + "America/Argentina/La_Rioja", + "America/Argentina/Mendoza", + "America/Argentina/Rio_Gallegos", + "America/Argentina/Salta", + "America/Argentina/San_Juan", + "America/Argentina/San_Luis", + "America/Argentina/Tucuman", + "America/Argentina/Ushuaia", + "America/Aruba", + "America/Asuncion", + "America/Atikokan", + "America/Atka", + "America/Bahia", + "America/Bahia_Banderas", + "America/Barbados", + "America/Belem", + "America/Belize", + "America/Blanc-Sablon", + "America/Boa_Vista", + "America/Bogota", + "America/Boise", + "America/Buenos_Aires", + "America/Cambridge_Bay", + "America/Campo_Grande", + "America/Cancun", + "America/Caracas", + "America/Catamarca", + "America/Cayenne", + "America/Cayman", + "America/Chicago", + "America/Chihuahua", + "America/Coral_Harbour", + "America/Cordoba", + "America/Costa_Rica", + "America/Creston", + "America/Cuiaba", + "America/Curacao", + "America/Danmarkshavn", + "America/Dawson", + "America/Dawson_Creek", + "America/Denver", + "America/Detroit", + "America/Dominica", + "America/Edmonton", + "America/Eirunepe", + "America/El_Salvador", + "America/Ensenada", + "America/Fort_Nelson", + "America/Fort_Wayne", + "America/Fortaleza", + "America/Glace_Bay", + "America/Godthab", + "America/Goose_Bay", + "America/Grand_Turk", + "America/Grenada", + "America/Guadeloupe", + "America/Guatemala", + "America/Guayaquil", + "America/Guyana", + "America/Halifax", + "America/Havana", + "America/Hermosillo", + "America/Indiana/Indianapolis", + "America/Indiana/Knox", + "America/Indiana/Marengo", + "America/Indiana/Petersburg", + "America/Indiana/Tell_City", + "America/Indiana/Vevay", + "America/Indiana/Vincennes", + "America/Indiana/Winamac", + "America/Indianapolis", + "America/Inuvik", + "America/Iqaluit", + "America/Jamaica", + "America/Jujuy", + "America/Juneau", + "America/Kentucky/Louisville", + "America/Kentucky/Monticello", + "America/Knox_IN", + "America/Kralendijk", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Louisville", + "America/Lower_Princes", + "America/Maceio", + "America/Managua", + "America/Manaus", + "America/Marigot", + "America/Martinique", + "America/Matamoros", + "America/Mazatlan", + "America/Mendoza", + "America/Menominee", + "America/Merida", + "America/Metlakatla", + "America/Mexico_City", + "America/Miquelon", + "America/Moncton", + "America/Monterrey", + "America/Montevideo", + "America/Montreal", + "America/Montserrat", + "America/Nassau", + "America/New_York", + "America/Nipigon", + "America/Nome", + "America/Noronha", + "America/North_Dakota/Beulah", + "America/North_Dakota/Center", + "America/North_Dakota/New_Salem", + "America/Nuuk", + "America/Ojinaga", + "America/Panama", + "America/Pangnirtung", + "America/Paramaribo", + "America/Phoenix", + "America/Port-au-Prince", + "America/Port_of_Spain", + "America/Porto_Acre", + "America/Porto_Velho", + "America/Puerto_Rico", + "America/Punta_Arenas", + "America/Rainy_River", + "America/Rankin_Inlet", + "America/Recife", + "America/Regina", + "America/Resolute", + "America/Rio_Branco", + "America/Rosario", + "America/Santa_Isabel", + "America/Santarem", + "America/Santiago", + "America/Santo_Domingo", + "America/Sao_Paulo", + "America/Scoresbysund", + "America/Shiprock", + "America/Sitka", + "America/St_Barthelemy", + "America/St_Johns", + "America/St_Kitts", + "America/St_Lucia", + "America/St_Thomas", + "America/St_Vincent", + "America/Swift_Current", + "America/Tegucigalpa", + "America/Thule", + "America/Thunder_Bay", + "America/Tijuana", + "America/Toronto", + "America/Tortola", + "America/Vancouver", + "America/Virgin", + "America/Whitehorse", + "America/Winnipeg", + "America/Yakutat", + "America/Yellowknife", + "Antarctica/Casey", + "Antarctica/Davis", + "Antarctica/DumontDUrville", + "Antarctica/Macquarie", + "Antarctica/Mawson", + "Antarctica/McMurdo", + "Antarctica/Palmer", + "Antarctica/Rothera", + "Antarctica/South_Pole", + "Antarctica/Syowa", + "Antarctica/Troll", + "Antarctica/Vostok", + "Arctic/Longyearbyen", + "Asia/Aden", + "Asia/Almaty", + "Asia/Amman", + "Asia/Anadyr", + "Asia/Aqtau", + "Asia/Aqtobe", + "Asia/Ashgabat", + "Asia/Ashkhabad", + "Asia/Atyrau", + "Asia/Baghdad", + "Asia/Bahrain", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Barnaul", + "Asia/Beirut", + "Asia/Bishkek", + "Asia/Brunei", + "Asia/Calcutta", + "Asia/Chita", + "Asia/Choibalsan", + "Asia/Chongqing", + "Asia/Chungking", + "Asia/Colombo", + "Asia/Dacca", + "Asia/Damascus", + "Asia/Dhaka", + "Asia/Dili", + "Asia/Dubai", + "Asia/Dushanbe", + "Asia/Famagusta", + "Asia/Gaza", + "Asia/Harbin", + "Asia/Hebron", + "Asia/Ho_Chi_Minh", + "Asia/Hong_Kong", + "Asia/Hovd", + "Asia/Irkutsk", + "Asia/Istanbul", + "Asia/Jakarta", + "Asia/Jayapura", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kashgar", + "Asia/Kathmandu", + "Asia/Katmandu", + "Asia/Khandyga", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuching", + "Asia/Kuwait", + "Asia/Macao", + "Asia/Macau", + "Asia/Magadan", + "Asia/Makassar", + "Asia/Manila", + "Asia/Muscat", + "Asia/Nicosia", + "Asia/Novokuznetsk", + "Asia/Novosibirsk", + "Asia/Omsk", + "Asia/Oral", + "Asia/Phnom_Penh", + "Asia/Pontianak", + "Asia/Pyongyang", + "Asia/Qatar", + "Asia/Qostanay", + "Asia/Qyzylorda", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Saigon", + "Asia/Sakhalin", + "Asia/Samarkand", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tel_Aviv", + "Asia/Thimbu", + "Asia/Thimphu", + "Asia/Tokyo", + "Asia/Tomsk", + "Asia/Ujung_Pandang", + "Asia/Ulaanbaatar", + "Asia/Ulan_Bator", + "Asia/Urumqi", + "Asia/Ust-Nera", + "Asia/Vientiane", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yangon", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Atlantic/Azores", + "Atlantic/Bermuda", + "Atlantic/Canary", + "Atlantic/Cape_Verde", + "Atlantic/Faeroe", + "Atlantic/Faroe", + "Atlantic/Jan_Mayen", + "Atlantic/Madeira", + "Atlantic/Reykjavik", + "Atlantic/South_Georgia", + "Atlantic/St_Helena", + "Atlantic/Stanley", + "Australia/ACT", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Broken_Hill", + "Australia/Canberra", + "Australia/Currie", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lindeman", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/NSW", + "Australia/North", + "Australia/Perth", + "Australia/Queensland", + "Australia/South", + "Australia/Sydney", + "Australia/Tasmania", + "Australia/Victoria", + "Australia/West", + "Australia/Yancowinna", + "Brazil/Acre", + "Brazil/DeNoronha", + "Brazil/East", + "Brazil/West", + "CET", + "CST6CDT", + "Canada/Atlantic", + "Canada/Central", + "Canada/Eastern", + "Canada/Mountain", + "Canada/Newfoundland", + "Canada/Pacific", + "Canada/Saskatchewan", + "Canada/Yukon", + "Chile/Continental", + "Chile/EasterIsland", + "Cuba", + "EET", + "EST", + "EST5EDT", + "Egypt", + "Eire", + "Etc/GMT", + "Etc/GMT+0", + "Etc/GMT+1", + "Etc/GMT+10", + "Etc/GMT+11", + "Etc/GMT+12", + "Etc/GMT+2", + "Etc/GMT+3", + "Etc/GMT+4", + "Etc/GMT+5", + "Etc/GMT+6", + "Etc/GMT+7", + "Etc/GMT+8", + "Etc/GMT+9", + "Etc/GMT-0", + "Etc/GMT-1", + "Etc/GMT-10", + "Etc/GMT-11", + "Etc/GMT-12", + "Etc/GMT-13", + "Etc/GMT-14", + "Etc/GMT-2", + "Etc/GMT-3", + "Etc/GMT-4", + "Etc/GMT-5", + "Etc/GMT-6", + "Etc/GMT-7", + "Etc/GMT-8", + "Etc/GMT-9", + "Etc/GMT0", + "Etc/Greenwich", + "Etc/UCT", + "Etc/UTC", + "Etc/Universal", + "Etc/Zulu", + "Europe/Amsterdam", + "Europe/Andorra", + "Europe/Astrakhan", + "Europe/Athens", + "Europe/Belfast", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Busingen", + "Europe/Chisinau", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Gibraltar", + "Europe/Guernsey", + "Europe/Helsinki", + "Europe/Isle_of_Man", + "Europe/Istanbul", + "Europe/Jersey", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Kirov", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Luxembourg", + "Europe/Madrid", + "Europe/Malta", + "Europe/Mariehamn", + "Europe/Minsk", + "Europe/Monaco", + "Europe/Moscow", + "Europe/Nicosia", + "Europe/Oslo", + "Europe/Paris", + "Europe/Podgorica", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/San_Marino", + "Europe/Sarajevo", + "Europe/Saratov", + "Europe/Simferopol", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Tirane", + "Europe/Tiraspol", + "Europe/Ulyanovsk", + "Europe/Uzhgorod", + "Europe/Vaduz", + "Europe/Vatican", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zaporozhye", + "Europe/Zurich", + "GB", + "GB-Eire", + "GMT", + "GMT+0", + "GMT-0", + "GMT0", + "Greenwich", + "HST", + "Hongkong", + "Iceland", + "Indian/Antananarivo", + "Indian/Chagos", + "Indian/Christmas", + "Indian/Cocos", + "Indian/Comoro", + "Indian/Kerguelen", + "Indian/Mahe", + "Indian/Maldives", + "Indian/Mauritius", + "Indian/Mayotte", + "Indian/Reunion", + "Iran", + "Israel", + "Jamaica", + "Japan", + "Kwajalein", + "Libya", + "MET", + "MST", + "MST7MDT", + "Mexico/BajaNorte", + "Mexico/BajaSur", + "Mexico/General", + "NZ", + "NZ-CHAT", + "Navajo", + "PRC", + "PST8PDT", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Bougainville", + "Pacific/Chatham", + "Pacific/Chuuk", + "Pacific/Easter", + "Pacific/Efate", + "Pacific/Enderbury", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Funafuti", + "Pacific/Galapagos", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Johnston", + "Pacific/Kiritimati", + "Pacific/Kosrae", + "Pacific/Kwajalein", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Nauru", + "Pacific/Niue", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Palau", + "Pacific/Pitcairn", + "Pacific/Pohnpei", + "Pacific/Ponape", + "Pacific/Port_Moresby", + "Pacific/Rarotonga", + "Pacific/Saipan", + "Pacific/Samoa", + "Pacific/Tahiti", + "Pacific/Tarawa", + "Pacific/Tongatapu", + "Pacific/Truk", + "Pacific/Wake", + "Pacific/Wallis", + "Pacific/Yap", + "Poland", + "Portugal", + "ROC", + "ROK", + "Singapore", + "Turkey", + "UCT", + "US/Alaska", + "US/Aleutian", + "US/Arizona", + "US/Central", + "US/East-Indiana", + "US/Eastern", + "US/Hawaii", + "US/Indiana-Starke", + "US/Michigan", + "US/Mountain", + "US/Pacific", + "US/Samoa", + "UTC", + "Universal", + "W-SU", + "WET", + "Zulu" + ], "type": "string" }, "type": { @@ -5445,10 +7406,10 @@ "SavedQueryRestApi.get": { "properties": { "created_by": { - "$ref": "#/components/schemas/Meta31" + "$ref": "#/components/schemas/SavedQueryRestApi.get.User" }, "database": { - "$ref": "#/components/schemas/Meta32" + "$ref": "#/components/schemas/SavedQueryRestApi.get.Database" }, "description": { "nullable": true, @@ -5468,14 +7429,51 @@ "nullable": true, "type": "string" }, - "sql": { - "nullable": true, - "type": "string" + "sql": { + "nullable": true, + "type": "string" + }, + "sql_tables": { + "readOnly": true + } + }, + "type": "object" + }, + "SavedQueryRestApi.get.Database": { + "properties": { + "database_name": { + "maxLength": 250, + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "database_name" + ], + "type": "object" + }, + "SavedQueryRestApi.get.User": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" }, - "sql_tables": { - "readOnly": true + "last_name": { + "maxLength": 64, + "type": "string" } }, + "required": [ + "first_name", + "last_name" + ], "type": "object" }, "SavedQueryRestApi.get_list": { @@ -5484,7 +7482,7 @@ "readOnly": true }, "created_by": { - "$ref": "#/components/schemas/Meta29" + "$ref": "#/components/schemas/SavedQueryRestApi.get_list.User" }, "created_on": { "format": "date-time", @@ -5492,7 +7490,7 @@ "type": "string" }, "database": { - "$ref": "#/components/schemas/Meta30" + "$ref": "#/components/schemas/SavedQueryRestApi.get_list.Database" }, "db_id": { "format": "int32", @@ -5538,6 +7536,43 @@ }, "type": "object" }, + "SavedQueryRestApi.get_list.Database": { + "properties": { + "database_name": { + "maxLength": 250, + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "database_name" + ], + "type": "object" + }, + "SavedQueryRestApi.get_list.User": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "last_name": { + "maxLength": 64, + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "type": "object" + }, "SavedQueryRestApi.post": { "properties": { "db_id": { @@ -5790,8 +7825,8 @@ "type": "string" }, "threshold": { - "format": "int32", - "type": "integer" + "format": "float", + "type": "number" } }, "type": "object" @@ -6039,7 +8074,7 @@ }, "openapi": "3.0.2", "paths": { - "/annotation_layer/": { + "/api/v1/annotation_layer/": { "delete": { "description": "Deletes multiple annotation layers in a bulk operation.", "parameters": [ @@ -6255,7 +8290,7 @@ ] } }, - "/annotation_layer/_info": { + "/api/v1/annotation_layer/_info": { "get": { "description": "Get metadata information about this API resource", "parameters": [ @@ -6341,7 +8376,7 @@ ] } }, - "/annotation_layer/related/{column_name}": { + "/api/v1/annotation_layer/related/{column_name}": { "get": { "parameters": [ { @@ -6398,7 +8433,7 @@ ] } }, - "/annotation_layer/{pk}": { + "/api/v1/annotation_layer/{pk}": { "delete": { "description": "Delete Annotation layer", "parameters": [ @@ -6613,7 +8648,7 @@ ] } }, - "/annotation_layer/{pk}/annotation/": { + "/api/v1/annotation_layer/{pk}/annotation/": { "delete": { "description": "Deletes multiple annotation in a bulk operation.", "parameters": [ @@ -6770,7 +8805,218 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnotationRestApi.post" + "$ref": "#/components/schemas/AnnotationRestApi.post" + } + } + }, + "description": "Annotation schema", + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "type": "number" + }, + "result": { + "$ref": "#/components/schemas/AnnotationRestApi.post" + } + }, + "type": "object" + } + } + }, + "description": "Annotation added" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Annotation Layers" + ] + } + }, + "/api/v1/annotation_layer/{pk}/annotation/{annotation_id}": { + "delete": { + "description": "Delete Annotation layer", + "parameters": [ + { + "description": "The annotation layer pk for this annotation", + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The annotation pk for this annotation", + "in": "path", + "name": "annotation_id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Item deleted" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Annotation Layers" + ] + }, + "get": { + "description": "Get an Annotation layer", + "parameters": [ + { + "description": "The annotation layer pk for this annotation", + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The annotation pk", + "in": "path", + "name": "annotation_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_item_schema" + } + } + }, + "in": "query", + "name": "q" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "description": "The item id", + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/AnnotationRestApi.get" + } + }, + "type": "object" + } + } + }, + "description": "Item from Model" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Annotation Layers" + ] + }, + "put": { + "description": "Update an Annotation layer", + "parameters": [ + { + "description": "The annotation layer pk for this annotation", + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The annotation pk for this annotation", + "in": "path", + "name": "annotation_id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationRestApi.put" } } }, @@ -6778,7 +9024,7 @@ "required": true }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { @@ -6787,14 +9033,14 @@ "type": "number" }, "result": { - "$ref": "#/components/schemas/AnnotationRestApi.post" + "$ref": "#/components/schemas/AnnotationRestApi.put" } }, "type": "object" } } }, - "description": "Annotation added" + "description": "Annotation changed" }, "400": { "$ref": "#/components/responses/400" @@ -6819,26 +9065,16 @@ ] } }, - "/annotation_layer/{pk}/annotation/{annotation_id}": { - "delete": { - "description": "Delete Annotation layer", + "/api/v1/async_event/": { + "get": { + "description": "Reads off of the Redis events stream, using the user's JWT token and optional query params for last event received.", "parameters": [ { - "description": "The annotation layer pk for this annotation", - "in": "path", - "name": "pk", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "description": "The annotation pk for this annotation", - "in": "path", - "name": "annotation_id", - "required": true, + "description": "Last ID received by the client", + "in": "query", + "name": "last_id", "schema": { - "type": "integer" + "type": "string" } } ], @@ -6848,21 +9084,47 @@ "application/json": { "schema": { "properties": { - "message": { - "type": "string" + "result": { + "items": { + "properties": { + "channel_id": { + "type": "string" + }, + "errors": { + "items": { + "type": "object" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "job_id": { + "type": "string" + }, + "result_url": { + "type": "string" + }, + "status": { + "type": "string" + }, + "user_id": { + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" } }, "type": "object" } } }, - "description": "Item deleted" - }, - "404": { - "$ref": "#/components/responses/404" + "description": "Async event results" }, - "422": { - "$ref": "#/components/responses/422" + "401": { + "$ref": "#/components/responses/401" }, "500": { "$ref": "#/components/responses/500" @@ -6874,35 +9136,54 @@ } ], "tags": [ - "Annotation Layers" + "AsyncEventsRestApi" ] - }, - "get": { - "description": "Get an Annotation layer", - "parameters": [ - { - "description": "The annotation layer pk for this annotation", - "in": "path", - "name": "pk", - "required": true, - "schema": { - "type": "integer" + } + }, + "/api/v1/cachekey/invalidate": { + "post": { + "description": "Takes a list of datasources, finds the associated cache records and invalidates them and removes the database records", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CacheInvalidationRequestSchema" + } } }, - { - "description": "The annotation pk", - "in": "path", - "name": "annotation_id", - "required": true, - "schema": { - "type": "integer" - } + "description": "A list of datasources uuid or the tuples of database and datasource names", + "required": true + }, + "responses": { + "201": { + "description": "cache was successfully invalidated" + }, + "400": { + "$ref": "#/components/responses/400" }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "CacheRestApi" + ] + } + }, + "/api/v1/chart/": { + "delete": { + "description": "Deletes multiple Charts in a bulk operation.", + "parameters": [ { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/get_item_schema" + "$ref": "#/components/schemas/get_delete_ids_schema" } } }, @@ -6916,26 +9197,22 @@ "application/json": { "schema": { "properties": { - "id": { - "description": "The item id", + "message": { "type": "string" - }, - "result": { - "$ref": "#/components/schemas/AnnotationRestApi.get" } }, "type": "object" } } }, - "description": "Item from Model" - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Charts bulk delete" }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "$ref": "#/components/responses/403" + }, "404": { "$ref": "#/components/responses/404" }, @@ -6952,44 +9229,131 @@ } ], "tags": [ - "Annotation Layers" + "Charts" ] }, - "put": { - "description": "Update an Annotation layer", + "get": { + "description": "Get a list of charts, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", "parameters": [ { - "description": "The annotation layer pk for this annotation", - "in": "path", - "name": "pk", - "required": true, - "schema": { - "type": "integer" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_list_schema" + } + } + }, + "in": "query", + "name": "q" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "description": "The total record count on the backend", + "type": "number" + }, + "description_columns": { + "properties": { + "column_name": { + "description": "The description for the column name. Will be translated by babel", + "example": "A Nice description for the column", + "type": "string" + } + }, + "type": "object" + }, + "ids": { + "description": "A list of item ids, useful when you don't know the column id", + "items": { + "type": "string" + }, + "type": "array" + }, + "label_columns": { + "properties": { + "column_name": { + "description": "The label for the column name. Will be translated by babel", + "example": "A Nice label for the column", + "type": "string" + } + }, + "type": "object" + }, + "list_columns": { + "description": "A list of columns", + "items": { + "type": "string" + }, + "type": "array" + }, + "list_title": { + "description": "A title to render. Will be translated by babel", + "example": "List Items", + "type": "string" + }, + "order_columns": { + "description": "A list of allowed columns to sort", + "items": { + "type": "string" + }, + "type": "array" + }, + "result": { + "description": "The result from the get list query", + "items": { + "$ref": "#/components/schemas/ChartRestApi.get_list" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Items from Model" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "422": { + "$ref": "#/components/responses/422" }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ { - "description": "The annotation pk for this annotation", - "in": "path", - "name": "annotation_id", - "required": true, - "schema": { - "type": "integer" - } + "jwt": [] } ], + "tags": [ + "Charts" + ] + }, + "post": { + "description": "Create a new Chart.", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AnnotationRestApi.put" + "$ref": "#/components/schemas/ChartRestApi.post" } } }, - "description": "Annotation schema", + "description": "Chart schema", "required": true }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { @@ -6998,14 +9362,14 @@ "type": "number" }, "result": { - "$ref": "#/components/schemas/AnnotationRestApi.put" + "$ref": "#/components/schemas/ChartRestApi.post" } }, "type": "object" } } }, - "description": "Annotation changed" + "description": "Chart added" }, "400": { "$ref": "#/components/responses/400" @@ -7013,8 +9377,8 @@ "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "422": { + "$ref": "#/components/responses/422" }, "500": { "$ref": "#/components/responses/500" @@ -7026,21 +9390,24 @@ } ], "tags": [ - "Annotation Layers" + "Charts" ] } }, - "/async_event/": { + "/api/v1/chart/_info": { "get": { - "description": "Reads off of the Redis events stream, using the user's JWT token and optional query params for last event received.", + "description": "Several metadata information about chart API endpoints.", "parameters": [ { - "description": "Last ID received by the client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_info_schema" + } + } + }, "in": "query", - "name": "last_id", - "schema": { - "type": "string" - } + "name": "q" } ], "responses": { @@ -7049,35 +9416,37 @@ "application/json": { "schema": { "properties": { - "result": { - "items": { - "properties": { - "channel_id": { - "type": "string" - }, - "errors": { - "items": { - "type": "object" + "add_columns": { + "type": "object" + }, + "edit_columns": { + "type": "object" + }, + "filters": { + "properties": { + "column_name": { + "items": { + "properties": { + "name": { + "description": "The filter name. Will be translated by babel", + "type": "string" + }, + "operator": { + "description": "The filter operation key to use on list filters", + "type": "string" + } }, - "type": "array" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_url": { - "type": "string" - }, - "status": { - "type": "string" + "type": "object" }, - "user_id": { - "type": "integer" - } - }, - "type": "object" + "type": "array" + } + }, + "type": "object" + }, + "permissions": { + "description": "The user permissions for this API resource", + "items": { + "type": "string" }, "type": "array" } @@ -7086,11 +9455,17 @@ } } }, - "description": "Async event results" + "description": "Item from Model" + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, + "422": { + "$ref": "#/components/responses/422" + }, "500": { "$ref": "#/components/responses/500" } @@ -7101,31 +9476,51 @@ } ], "tags": [ - "AsyncEventsRestApi" + "Charts" ] } }, - "/cachekey/invalidate": { + "/api/v1/chart/data": { "post": { - "description": "Takes a list of datasources, finds the associated cache records and invalidates them and removes the database records", + "description": "Takes a query context constructed in the client and returns payload data response for the given query.", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CacheInvalidationRequestSchema" + "$ref": "#/components/schemas/ChartDataQueryContextSchema" } } }, - "description": "A list of datasources uuid or the tuples of database and datasource names", + "description": "A query context consists of a datasource from which to fetch data and one or many query objects.", "required": true }, "responses": { - "201": { - "description": "cache was successfully invalidated" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartDataResponseSchema" + } + } + }, + "description": "Query result" + }, + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartDataAsyncResponseSchema" + } + } + }, + "description": "Async job details" }, "400": { "$ref": "#/components/responses/400" }, + "401": { + "$ref": "#/components/responses/401" + }, "500": { "$ref": "#/components/responses/500" } @@ -7136,24 +9531,21 @@ } ], "tags": [ - "CacheRestApi" + "Charts" ] } }, - "/chart/": { - "delete": { - "description": "Deletes multiple Charts in a bulk operation.", + "/api/v1/chart/data/{cache_key}": { + "get": { + "description": "Takes a query context cache key and returns payload data response for the given query.", "parameters": [ { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/get_delete_ids_schema" - } - } - }, - "in": "query", - "name": "q" + "in": "path", + "name": "cache_key", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -7161,23 +9553,18 @@ "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/ChartDataResponseSchema" } } }, - "description": "Charts bulk delete" + "description": "Query result" + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "$ref": "#/components/responses/403" - }, "404": { "$ref": "#/components/responses/404" }, @@ -7196,15 +9583,17 @@ "tags": [ "Charts" ] - }, + } + }, + "/api/v1/chart/export/": { "get": { - "description": "Get a list of charts, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", + "description": "Exports multiple charts and downloads them as YAML files", "parameters": [ { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/get_list_schema" + "$ref": "#/components/schemas/get_export_ids_schema" } } }, @@ -7215,72 +9604,64 @@ "responses": { "200": { "content": { - "application/json": { + "application/zip": { "schema": { - "properties": { - "count": { - "description": "The total record count on the backend", - "type": "number" - }, - "description_columns": { - "properties": { - "column_name": { - "description": "The description for the column name. Will be translated by babel", - "example": "A Nice description for the column", - "type": "string" - } - }, - "type": "object" - }, - "ids": { - "description": "A list of item ids, useful when you don't know the column id", - "items": { - "type": "string" - }, - "type": "array" - }, - "label_columns": { - "properties": { - "column_name": { - "description": "The label for the column name. Will be translated by babel", - "example": "A Nice label for the column", - "type": "string" - } - }, - "type": "object" - }, - "list_columns": { - "description": "A list of columns", - "items": { - "type": "string" - }, - "type": "array" - }, - "list_title": { - "description": "A title to render. Will be translated by babel", - "example": "List Items", - "type": "string" - }, - "order_columns": { - "description": "A list of allowed columns to sort", - "items": { - "type": "string" - }, - "type": "array" - }, - "result": { - "description": "The result from the get list query", - "items": { - "$ref": "#/components/schemas/ChartRestApi.get_list" - }, - "type": "array" - } - }, - "type": "object" + "format": "binary", + "type": "string" + } + } + }, + "description": "A zip file with chart(s), dataset(s) and database(s) as YAML" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Charts" + ] + } + }, + "/api/v1/chart/favorite_status/": { + "get": { + "description": "Check favorited dashboards for current user", + "parameters": [ + { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_fav_star_ids_schema" } } }, - "description": "Items from Model" + "in": "query", + "name": "q" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetFavStarIdsSchema" + } + } + }, + "description": "None" }, "400": { "$ref": "#/components/responses/400" @@ -7288,8 +9669,8 @@ "401": { "$ref": "#/components/responses/401" }, - "422": { - "$ref": "#/components/responses/422" + "404": { + "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" @@ -7303,38 +9684,50 @@ "tags": [ "Charts" ] - }, + } + }, + "/api/v1/chart/import/": { "post": { - "description": "Create a new Chart.", "requestBody": { "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/ChartRestApi.post" + "properties": { + "formData": { + "description": "upload file (ZIP)", + "format": "binary", + "type": "string" + }, + "overwrite": { + "description": "overwrite existing databases?", + "type": "boolean" + }, + "passwords": { + "description": "JSON map of passwords for each file", + "type": "string" + } + }, + "type": "object" } } }, - "description": "Chart schema", "required": true }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { "properties": { - "id": { - "type": "number" - }, - "result": { - "$ref": "#/components/schemas/ChartRestApi.post" + "message": { + "type": "string" } }, "type": "object" } } }, - "description": "Chart added" + "description": "Chart import result" }, "400": { "$ref": "#/components/responses/400" @@ -7359,15 +9752,23 @@ ] } }, - "/chart/_info": { + "/api/v1/chart/related/{column_name}": { "get": { - "description": "Several metadata information about chart API endpoints.", + "description": "Get a list of all possible owners for a chart. Use `owners` has the `column_name` parameter", "parameters": [ + { + "in": "path", + "name": "column_name", + "required": true, + "schema": { + "type": "string" + } + }, { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/get_info_schema" + "$ref": "#/components/schemas/get_related_schema" } } }, @@ -7380,47 +9781,11 @@ "content": { "application/json": { "schema": { - "properties": { - "add_columns": { - "type": "object" - }, - "edit_columns": { - "type": "object" - }, - "filters": { - "properties": { - "column_name": { - "items": { - "properties": { - "name": { - "description": "The filter name. Will be translated by babel", - "type": "string" - }, - "operator": { - "description": "The filter operation key to use on list filters", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "permissions": { - "description": "The user permissions for this API resource", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" + "$ref": "#/components/schemas/RelatedResponseSchema" } } }, - "description": "Item from Model" + "description": "Related column data" }, "400": { "$ref": "#/components/responses/400" @@ -7428,8 +9793,8 @@ "401": { "$ref": "#/components/responses/401" }, - "422": { - "$ref": "#/components/responses/422" + "404": { + "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" @@ -7445,40 +9810,134 @@ ] } }, - "/chart/data": { - "post": { - "description": "Takes a query context constructed in the client and returns payload data response for the given query.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChartDataQueryContextSchema" - } + "/api/v1/chart/{pk}": { + "delete": { + "description": "Deletes a Chart.", + "parameters": [ + { + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" } - }, - "description": "A query context consists of a datasource from which to fetch data and one or many query objects.", - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChartDataResponseSchema" + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" } } }, - "description": "Query result" + "description": "Chart delete" }, - "202": { + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Charts" + ] + }, + "get": { + "description": "Get a chart detail information.", + "parameters": [ + { + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" + } + }, + { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChartDataAsyncResponseSchema" + "$ref": "#/components/schemas/get_item_schema" + } + } + }, + "in": "query", + "name": "q" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "description_columns": { + "properties": { + "column_name": { + "description": "The description for the column name. Will be translated by babel", + "example": "A Nice description for the column", + "type": "string" + } + }, + "type": "object" + }, + "id": { + "description": "The item id", + "type": "string" + }, + "label_columns": { + "properties": { + "column_name": { + "description": "The label for the column name. Will be translated by babel", + "example": "A Nice label for the column", + "type": "string" + } + }, + "type": "object" + }, + "result": { + "$ref": "#/components/schemas/ChartRestApi.get" + }, + "show_columns": { + "description": "A list of columns", + "items": { + "type": "string" + }, + "type": "array" + }, + "show_title": { + "description": "A title to render. Will be translated by babel", + "example": "Show Item Details", + "type": "string" + } + }, + "type": "object" } } }, - "description": "Async job details" + "description": "Item from Model" }, "400": { "$ref": "#/components/responses/400" @@ -7486,6 +9945,12 @@ "401": { "$ref": "#/components/responses/401" }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + }, "500": { "$ref": "#/components/responses/500" } @@ -7498,31 +9963,48 @@ "tags": [ "Charts" ] - } - }, - "/chart/data/{cache_key}": { - "get": { - "description": "Takes a query context cache key and returns payload data response for the given query.", + }, + "put": { + "description": "Changes a Chart.", "parameters": [ { "in": "path", - "name": "cache_key", + "name": "pk", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChartRestApi.put" + } + } + }, + "description": "Chart schema", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChartDataResponseSchema" + "properties": { + "id": { + "type": "number" + }, + "result": { + "$ref": "#/components/schemas/ChartRestApi.put" + } + }, + "type": "object" } } }, - "description": "Query result" + "description": "Chart changed" }, "400": { "$ref": "#/components/responses/400" @@ -7530,6 +10012,9 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "$ref": "#/components/responses/403" + }, "404": { "$ref": "#/components/responses/404" }, @@ -7550,15 +10035,23 @@ ] } }, - "/chart/export/": { + "/api/v1/chart/{pk}/cache_screenshot/": { "get": { - "description": "Exports multiple charts and downloads them as YAML files", + "description": "Compute and cache a screenshot.", "parameters": [ + { + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" + } + }, { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/get_export_ids_schema" + "$ref": "#/components/schemas/screenshot_query_schema" } } }, @@ -7569,14 +10062,16 @@ "responses": { "200": { "content": { - "application/zip": { + "application/json": { "schema": { - "format": "binary", - "type": "string" + "$ref": "#/components/schemas/ChartCacheScreenshotResponseSchema" } } }, - "description": "A zip file with chart(s), dataset(s) and database(s) as YAML" + "description": "Chart async result" + }, + "302": { + "description": "Redirects to the current digest" }, "400": { "$ref": "#/components/responses/400" @@ -7601,32 +10096,56 @@ ] } }, - "/chart/favorite_status/": { + "/api/v1/chart/{pk}/data/": { "get": { - "description": "Check favorited dashboards for current user", + "description": "Takes a chart ID and uses the query context stored when the chart was saved to return payload data response.", "parameters": [ { + "description": "The chart ID", + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The format in which the data should be returned", + "in": "query", + "name": "format", + "schema": { + "type": "string" + } + }, + { + "description": "The type in which the data should be returned", + "in": "query", + "name": "type", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/get_fav_star_ids_schema" + "$ref": "#/components/schemas/ChartDataResponseSchema" } } }, - "in": "query", - "name": "q" - } - ], - "responses": { - "200": { + "description": "Query result" + }, + "202": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetFavStarIdsSchema" + "$ref": "#/components/schemas/ChartDataAsyncResponseSchema" } } }, - "description": "None" + "description": "Async job details" }, "400": { "$ref": "#/components/responses/400" @@ -7634,9 +10153,6 @@ "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" - }, "500": { "$ref": "#/components/responses/500" } @@ -7651,48 +10167,41 @@ ] } }, - "/chart/import/": { - "post": { - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "properties": { - "formData": { - "description": "upload file (ZIP)", - "format": "binary", - "type": "string" - }, - "overwrite": { - "description": "overwrite existing databases?", - "type": "boolean" - }, - "passwords": { - "description": "JSON map of passwords for each file", - "type": "string" - } - }, - "type": "object" - } + "/api/v1/chart/{pk}/screenshot/{digest}/": { + "get": { + "description": "Get a computed screenshot from cache.", + "parameters": [ + { + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" } }, - "required": true - }, + { + "in": "path", + "name": "digest", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { - "application/json": { + "image/*": { "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "type": "object" + "format": "binary", + "type": "string" } } }, - "description": "Chart import result" + "description": "Chart thumbnail image" + }, + "302": { + "description": "Redirects to the current digest" }, "400": { "$ref": "#/components/responses/400" @@ -7700,8 +10209,8 @@ "401": { "$ref": "#/components/responses/401" }, - "422": { - "$ref": "#/components/responses/422" + "404": { + "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" @@ -7717,40 +10226,41 @@ ] } }, - "/chart/related/{column_name}": { + "/api/v1/chart/{pk}/thumbnail/{digest}/": { "get": { - "description": "Get a list of all possible owners for a chart. Use `owners` has the `column_name` parameter", + "description": "Compute or get already computed chart thumbnail from cache.", "parameters": [ { "in": "path", - "name": "column_name", + "name": "pk", "required": true, "schema": { - "type": "string" + "type": "integer" } }, { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/get_related_schema" - } - } - }, - "in": "query", - "name": "q" + "in": "path", + "name": "digest", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { "content": { - "application/json": { + "image/*": { "schema": { - "$ref": "#/components/schemas/RelatedResponseSchema" + "format": "binary", + "type": "string" } } }, - "description": "Related column data" + "description": "Chart thumbnail image" + }, + "302": { + "description": "Redirects to the current digest" }, "400": { "$ref": "#/components/responses/400" @@ -7775,17 +10285,20 @@ ] } }, - "/chart/{pk}": { + "/api/v1/css_template/": { "delete": { - "description": "Deletes a Chart.", + "description": "Deletes multiple css templates in a bulk operation.", "parameters": [ { - "in": "path", - "name": "pk", - "required": true, - "schema": { - "type": "integer" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_delete_ids_schema" + } + } + }, + "in": "query", + "name": "q" } ], "responses": { @@ -7802,14 +10315,11 @@ } } }, - "description": "Chart delete" + "description": "CSS templates bulk delete" }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "$ref": "#/components/responses/403" - }, "404": { "$ref": "#/components/responses/404" }, @@ -7826,25 +10336,17 @@ } ], "tags": [ - "Charts" + "CSS Templates" ] }, "get": { - "description": "Get a chart detail information.", + "description": "Get a list of CSS templates, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", "parameters": [ - { - "in": "path", - "name": "pk", - "required": true, - "schema": { - "type": "integer" - } - }, { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/get_item_schema" + "$ref": "#/components/schemas/get_list_schema" } } }, @@ -7858,6 +10360,10 @@ "application/json": { "schema": { "properties": { + "count": { + "description": "The total record count on the backend", + "type": "number" + }, "description_columns": { "properties": { "column_name": { @@ -7868,9 +10374,12 @@ }, "type": "object" }, - "id": { - "description": "The item id", - "type": "string" + "ids": { + "description": "A list of item ids, useful when you don't know the column id", + "items": { + "type": "string" + }, + "type": "array" }, "label_columns": { "properties": { @@ -7882,27 +10391,38 @@ }, "type": "object" }, - "result": { - "$ref": "#/components/schemas/ChartRestApi.get" - }, - "show_columns": { + "list_columns": { "description": "A list of columns", "items": { "type": "string" }, "type": "array" }, - "show_title": { + "list_title": { "description": "A title to render. Will be translated by babel", - "example": "Show Item Details", + "example": "List Items", "type": "string" + }, + "order_columns": { + "description": "A list of allowed columns to sort", + "items": { + "type": "string" + }, + "type": "array" + }, + "result": { + "description": "The result from the get list query", + "items": { + "$ref": "#/components/schemas/CssTemplateRestApi.get_list" + }, + "type": "array" } }, "type": "object" } } }, - "description": "Item from Model" + "description": "Items from Model" }, "400": { "$ref": "#/components/responses/400" @@ -7910,9 +10430,6 @@ "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { "$ref": "#/components/responses/422" }, @@ -7926,50 +10443,40 @@ } ], "tags": [ - "Charts" + "CSS Templates" ] }, - "put": { - "description": "Changes a Chart.", - "parameters": [ - { - "in": "path", - "name": "pk", - "required": true, - "schema": { - "type": "integer" - } - } - ], + "post": { + "description": "Create a CSS template", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChartRestApi.put" + "$ref": "#/components/schemas/CssTemplateRestApi.post" } } }, - "description": "Chart schema", + "description": "Model schema", "required": true }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { "properties": { "id": { - "type": "number" + "type": "string" }, "result": { - "$ref": "#/components/schemas/ChartRestApi.put" + "$ref": "#/components/schemas/CssTemplateRestApi.post" } }, "type": "object" } } }, - "description": "Chart changed" + "description": "Item inserted" }, "400": { "$ref": "#/components/responses/400" @@ -7977,12 +10484,6 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { "$ref": "#/components/responses/422" }, @@ -7996,27 +10497,19 @@ } ], "tags": [ - "Charts" + "CSS Templates" ] } }, - "/chart/{pk}/cache_screenshot/": { + "/api/v1/css_template/_info": { "get": { - "description": "Compute and cache a screenshot.", + "description": "Get metadata information about this API resource", "parameters": [ - { - "in": "path", - "name": "pk", - "required": true, - "schema": { - "type": "integer" - } - }, { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/screenshot_query_schema" + "$ref": "#/components/schemas/get_info_schema" } } }, @@ -8029,14 +10522,47 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChartCacheScreenshotResponseSchema" + "properties": { + "add_columns": { + "type": "object" + }, + "edit_columns": { + "type": "object" + }, + "filters": { + "properties": { + "column_name": { + "items": { + "properties": { + "name": { + "description": "The filter name. Will be translated by babel", + "type": "string" + }, + "operator": { + "description": "The filter operation key to use on list filters", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "permissions": { + "description": "The user permissions for this API resource", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" } } }, - "description": "Chart async result" - }, - "302": { - "description": "Redirects to the current digest" + "description": "Item from Model" }, "400": { "$ref": "#/components/responses/400" @@ -8044,8 +10570,8 @@ "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "422": { + "$ref": "#/components/responses/422" }, "500": { "$ref": "#/components/responses/500" @@ -8057,60 +10583,43 @@ } ], "tags": [ - "Charts" + "CSS Templates" ] } }, - "/chart/{pk}/data/": { + "/api/v1/css_template/related/{column_name}": { "get": { - "description": "Takes a chart ID and uses the query context stored when the chart was saved to return payload data response.", "parameters": [ { - "description": "The chart ID", "in": "path", - "name": "pk", + "name": "column_name", "required": true, - "schema": { - "type": "integer" - } - }, - { - "description": "The format in which the data should be returned", - "in": "query", - "name": "format", "schema": { "type": "string" } }, { - "description": "The type in which the data should be returned", - "in": "query", - "name": "type", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChartDataResponseSchema" + "$ref": "#/components/schemas/get_related_schema" } } }, - "description": "Query result" - }, - "202": { + "in": "query", + "name": "q" + } + ], + "responses": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChartDataAsyncResponseSchema" + "$ref": "#/components/schemas/RelatedResponseSchema" } } }, - "description": "Async job details" + "description": "Related column data" }, "400": { "$ref": "#/components/responses/400" @@ -8118,6 +10627,9 @@ "401": { "$ref": "#/components/responses/401" }, + "404": { + "$ref": "#/components/responses/404" + }, "500": { "$ref": "#/components/responses/500" } @@ -8128,13 +10640,13 @@ } ], "tags": [ - "Charts" + "CSS Templates" ] } }, - "/chart/{pk}/screenshot/{digest}/": { - "get": { - "description": "Get a computed screenshot from cache.", + "/api/v1/css_template/{pk}": { + "delete": { + "description": "Delete CSS template", "parameters": [ { "in": "path", @@ -8143,30 +10655,117 @@ "schema": { "type": "integer" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Item deleted" }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "CSS Templates" + ] + }, + "get": { + "description": "Get a CSS template", + "parameters": [ { "in": "path", - "name": "digest", + "name": "pk", "required": true, "schema": { - "type": "string" + "type": "integer" } + }, + { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/get_item_schema" + } + } + }, + "in": "query", + "name": "q" } ], "responses": { "200": { "content": { - "image/*": { + "application/json": { "schema": { - "format": "binary", - "type": "string" + "properties": { + "description_columns": { + "properties": { + "column_name": { + "description": "The description for the column name. Will be translated by babel", + "example": "A Nice description for the column", + "type": "string" + } + }, + "type": "object" + }, + "id": { + "description": "The item id", + "type": "string" + }, + "label_columns": { + "properties": { + "column_name": { + "description": "The label for the column name. Will be translated by babel", + "example": "A Nice label for the column", + "type": "string" + } + }, + "type": "object" + }, + "result": { + "$ref": "#/components/schemas/CssTemplateRestApi.get" + }, + "show_columns": { + "description": "A list of columns", + "items": { + "type": "string" + }, + "type": "array" + }, + "show_title": { + "description": "A title to render. Will be translated by babel", + "example": "Show Item Details", + "type": "string" + } + }, + "type": "object" } } }, - "description": "Chart thumbnail image" - }, - "302": { - "description": "Redirects to the current digest" + "description": "Item from Model" }, "400": { "$ref": "#/components/responses/400" @@ -8177,6 +10776,9 @@ "404": { "$ref": "#/components/responses/404" }, + "422": { + "$ref": "#/components/responses/422" + }, "500": { "$ref": "#/components/responses/500" } @@ -8187,13 +10789,11 @@ } ], "tags": [ - "Charts" + "CSS Templates" ] - } - }, - "/chart/{pk}/thumbnail/{digest}/": { - "get": { - "description": "Compute or get already computed chart thumbnail from cache.", + }, + "put": { + "description": "Update a CSS template", "parameters": [ { "in": "path", @@ -8202,30 +10802,34 @@ "schema": { "type": "integer" } - }, - { - "in": "path", - "name": "digest", - "required": true, - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CssTemplateRestApi.put" + } + } + }, + "description": "Model schema", + "required": true + }, "responses": { "200": { "content": { - "image/*": { + "application/json": { "schema": { - "format": "binary", - "type": "string" + "properties": { + "result": { + "$ref": "#/components/schemas/CssTemplateRestApi.put" + } + }, + "type": "object" } } }, - "description": "Chart thumbnail image" - }, - "302": { - "description": "Redirects to the current digest" + "description": "Item changed" }, "400": { "$ref": "#/components/responses/400" @@ -8236,6 +10840,9 @@ "404": { "$ref": "#/components/responses/404" }, + "422": { + "$ref": "#/components/responses/422" + }, "500": { "$ref": "#/components/responses/500" } @@ -8246,13 +10853,13 @@ } ], "tags": [ - "Charts" + "CSS Templates" ] } }, - "/css_template/": { + "/api/v1/dashboard/": { "delete": { - "description": "Deletes multiple css templates in a bulk operation.", + "description": "Deletes multiple Dashboards in a bulk operation.", "parameters": [ { "content": { @@ -8280,11 +10887,14 @@ } } }, - "description": "CSS templates bulk delete" + "description": "Dashboard bulk delete" }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "$ref": "#/components/responses/403" + }, "404": { "$ref": "#/components/responses/404" }, @@ -8301,11 +10911,11 @@ } ], "tags": [ - "CSS Templates" + "Dashboards" ] }, "get": { - "description": "Get a list of CSS templates, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", + "description": "Get a list of dashboards, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", "parameters": [ { "content": { @@ -8378,7 +10988,7 @@ "result": { "description": "The result from the get list query", "items": { - "$ref": "#/components/schemas/CssTemplateRestApi.get_list" + "$ref": "#/components/schemas/DashboardRestApi.get_list" }, "type": "array" } @@ -8408,20 +11018,20 @@ } ], "tags": [ - "CSS Templates" + "Dashboards" ] }, "post": { - "description": "Create a CSS template", + "description": "Create a new Dashboard.", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CssTemplateRestApi.post" + "$ref": "#/components/schemas/DashboardRestApi.post" } } }, - "description": "Model schema", + "description": "Dashboard schema", "required": true }, "responses": { @@ -8431,17 +11041,20 @@ "schema": { "properties": { "id": { - "type": "string" + "type": "number" }, "result": { - "$ref": "#/components/schemas/CssTemplateRestApi.post" + "$ref": "#/components/schemas/DashboardRestApi.post" } }, "type": "object" } } }, - "description": "Item inserted" + "description": "Dashboard added" + }, + "302": { + "description": "Redirects to the current digest" }, "400": { "$ref": "#/components/responses/400" @@ -8449,8 +11062,8 @@ "401": { "$ref": "#/components/responses/401" }, - "422": { - "$ref": "#/components/responses/422" + "404": { + "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" @@ -8462,13 +11075,13 @@ } ], "tags": [ - "CSS Templates" + "Dashboards" ] } }, - "/css_template/_info": { + "/api/v1/dashboard/_info": { "get": { - "description": "Get metadata information about this API resource", + "description": "Several metadata information about dashboard API endpoints.", "parameters": [ { "content": { @@ -8548,26 +11161,19 @@ } ], "tags": [ - "CSS Templates" + "Dashboards" ] } }, - "/css_template/related/{column_name}": { + "/api/v1/dashboard/export/": { "get": { + "description": "Exports multiple Dashboards and downloads them as YAML files.", "parameters": [ - { - "in": "path", - "name": "column_name", - "required": true, - "schema": { - "type": "string" - } - }, { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/get_related_schema" + "$ref": "#/components/schemas/get_export_ids_schema" } } }, @@ -8578,13 +11184,13 @@ "responses": { "200": { "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/RelatedResponseSchema" + "type": "string" } } }, - "description": "Related column data" + "description": "Dashboard export" }, "400": { "$ref": "#/components/responses/400" @@ -8595,52 +11201,6 @@ "404": { "$ref": "#/components/responses/404" }, - "500": { - "$ref": "#/components/responses/500" - } - }, - "security": [ - { - "jwt": [] - } - ], - "tags": [ - "CSS Templates" - ] - } - }, - "/css_template/{pk}": { - "delete": { - "description": "Delete CSS template", - "parameters": [ - { - "in": "path", - "name": "pk", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "Item deleted" - }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { "$ref": "#/components/responses/422" }, @@ -8654,83 +11214,36 @@ } ], "tags": [ - "CSS Templates" + "Dashboards" ] - }, + } + }, + "/api/v1/dashboard/favorite_status/": { "get": { - "description": "Get a CSS template", + "description": "Check favorited dashboards for current user", "parameters": [ { - "in": "path", - "name": "pk", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/get_item_schema" - } - } - }, - "in": "query", - "name": "q" - } - ], - "responses": { - "200": { "content": { "application/json": { "schema": { - "properties": { - "description_columns": { - "properties": { - "column_name": { - "description": "The description for the column name. Will be translated by babel", - "example": "A Nice description for the column", - "type": "string" - } - }, - "type": "object" - }, - "id": { - "description": "The item id", - "type": "string" - }, - "label_columns": { - "properties": { - "column_name": { - "description": "The label for the column name. Will be translated by babel", - "example": "A Nice label for the column", - "type": "string" - } - }, - "type": "object" - }, - "result": { - "$ref": "#/components/schemas/CssTemplateRestApi.get" - }, - "show_columns": { - "description": "A list of columns", - "items": { - "type": "string" - }, - "type": "array" - }, - "show_title": { - "description": "A title to render. Will be translated by babel", - "example": "Show Item Details", - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/get_fav_star_ids_schema" } } }, - "description": "Item from Model" + "in": "query", + "name": "q" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetFavStarIdsSchema" + } + } + }, + "description": "None" }, "400": { "$ref": "#/components/responses/400" @@ -8741,9 +11254,6 @@ "404": { "$ref": "#/components/responses/404" }, - "422": { - "$ref": "#/components/responses/422" - }, "500": { "$ref": "#/components/responses/500" } @@ -8754,30 +11264,35 @@ } ], "tags": [ - "CSS Templates" + "Dashboards" ] - }, - "put": { - "description": "Update a CSS template", - "parameters": [ - { - "in": "path", - "name": "pk", - "required": true, - "schema": { - "type": "integer" - } - } - ], + } + }, + "/api/v1/dashboard/import/": { + "post": { "requestBody": { "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/CssTemplateRestApi.put" + "properties": { + "formData": { + "description": "upload file (ZIP or JSON)", + "format": "binary", + "type": "string" + }, + "overwrite": { + "description": "overwrite existing databases?", + "type": "boolean" + }, + "passwords": { + "description": "JSON map of passwords for each file", + "type": "string" + } + }, + "type": "object" } } }, - "description": "Model schema", "required": true }, "responses": { @@ -8786,15 +11301,15 @@ "application/json": { "schema": { "properties": { - "result": { - "$ref": "#/components/schemas/CssTemplateRestApi.put" + "message": { + "type": "string" } }, "type": "object" } } }, - "description": "Item changed" + "description": "Dashboard import result" }, "400": { "$ref": "#/components/responses/400" @@ -8802,9 +11317,6 @@ "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { "$ref": "#/components/responses/422" }, @@ -8818,19 +11330,27 @@ } ], "tags": [ - "CSS Templates" + "Dashboards" ] } }, - "/dashboard/": { - "delete": { - "description": "Deletes multiple Dashboards in a bulk operation.", + "/api/v1/dashboard/related/{column_name}": { + "get": { + "description": "Get a list of all possible owners for a dashboard.", "parameters": [ + { + "in": "path", + "name": "column_name", + "required": true, + "schema": { + "type": "string" + } + }, { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/get_delete_ids_schema" + "$ref": "#/components/schemas/get_related_schema" } } }, @@ -8843,29 +11363,21 @@ "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/RelatedResponseSchema" } } }, - "description": "Dashboard bulk delete" + "description": "Related column data" + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "$ref": "#/components/responses/403" - }, "404": { "$ref": "#/components/responses/404" }, - "422": { - "$ref": "#/components/responses/422" - }, "500": { "$ref": "#/components/responses/500" } @@ -8878,20 +11390,20 @@ "tags": [ "Dashboards" ] - }, + } + }, + "/api/v1/dashboard/{dashboard_id}/filtersets": { "get": { - "description": "Get a list of dashboards, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", + "description": "Get a dashboard's list of filter sets", "parameters": [ { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/get_list_schema" - } - } - }, - "in": "query", - "name": "q" + "description": "The id of the dashboard", + "in": "path", + "name": "dashboard_id", + "required": true, + "schema": { + "type": "integer" + } } ], "responses": { @@ -8899,70 +11411,42 @@ "content": { "application/json": { "schema": { - "properties": { - "count": { - "description": "The total record count on the backend", - "type": "number" - }, - "description_columns": { - "properties": { - "column_name": { - "description": "The description for the column name. Will be translated by babel", - "example": "A Nice description for the column", - "type": "string" - } - }, - "type": "object" - }, - "ids": { - "description": "A list of item ids, useful when you don't know the column id", - "items": { + "items": { + "properties": { + "description": { + "description": "A description field of the filter set", "type": "string" }, - "type": "array" - }, - "label_columns": { - "properties": { - "column_name": { - "description": "The label for the column name. Will be translated by babel", - "example": "A Nice label for the column", - "type": "string" - } - }, - "type": "object" - }, - "list_columns": { - "description": "A list of columns", - "items": { + "json_metadata": { + "description": "metadata of the filter set", "type": "string" }, - "type": "array" - }, - "list_title": { - "description": "A title to render. Will be translated by babel", - "example": "List Items", - "type": "string" - }, - "order_columns": { - "description": "A list of allowed columns to sort", - "items": { + "name": { + "description": "Name of the Filter set", "type": "string" }, - "type": "array" - }, - "result": { - "description": "The result from the get list query", - "items": { - "$ref": "#/components/schemas/DashboardRestApi.get_list" + "owner_id": { + "description": "A description field of the filter set", + "type": "integer" }, - "type": "array" - } + "owner_type": { + "description": "the Type of the owner ( Dashboard/User)", + "type": "integer" + }, + "parameters": { + "description": "JSON schema defining the needed parameters" + } + }, + "type": "object" }, - "type": "object" + "type": "array" } } }, - "description": "Items from Model" + "description": "FilterSets" + }, + "302": { + "description": "Redirects to the current digest" }, "400": { "$ref": "#/components/responses/400" @@ -8970,11 +11454,8 @@ "401": { "$ref": "#/components/responses/401" }, - "422": { - "$ref": "#/components/responses/422" - }, - "500": { - "$ref": "#/components/responses/500" + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -8983,20 +11464,31 @@ } ], "tags": [ - "Dashboards" + "FilterSetRestApi" ] }, "post": { - "description": "Create a new Dashboard.", + "description": "Create a new Dashboard's Filter Set.", + "parameters": [ + { + "description": "The id of the dashboard", + "in": "path", + "name": "dashboard_id", + "required": true, + "schema": { + "type": "integer" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DashboardRestApi.post" + "$ref": "#/components/schemas/FilterSetRestApi.post" } } }, - "description": "Dashboard schema", + "description": "Filter set schema", "required": true }, "responses": { @@ -9009,14 +11501,14 @@ "type": "number" }, "result": { - "$ref": "#/components/schemas/DashboardRestApi.post" + "$ref": "#/components/schemas/FilterSetRestApi.post" } }, "type": "object" } } }, - "description": "Dashboard added" + "description": "Filter set added" }, "302": { "description": "Redirects to the current digest" @@ -9040,72 +11532,121 @@ } ], "tags": [ - "Dashboards" + "FilterSetRestApi" ] } }, - "/dashboard/_info": { - "get": { - "description": "Several metadata information about dashboard API endpoints.", + "/api/v1/dashboard/{dashboard_id}/filtersets/{pk}": { + "delete": { + "description": "Deletes a Dashboard.", + "parameters": [ + { + "in": "path", + "name": "dashboard_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Filter set deleted" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "FilterSetRestApi" + ] + }, + "put": { + "description": "Changes a Dashboard's Filter set.", "parameters": [ { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/get_info_schema" - } - } - }, - "in": "query", - "name": "q" + "in": "path", + "name": "dashboard_id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterSetRestApi.put" + } + } + }, + "description": "Filter set schema", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { "properties": { - "add_columns": { - "type": "object" - }, - "edit_columns": { - "type": "object" - }, - "filters": { - "properties": { - "column_name": { - "items": { - "properties": { - "name": { - "description": "The filter name. Will be translated by babel", - "type": "string" - }, - "operator": { - "description": "The filter operation key to use on list filters", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" + "id": { + "type": "number" }, - "permissions": { - "description": "The user permissions for this API resource", - "items": { - "type": "string" - }, - "type": "array" + "result": { + "$ref": "#/components/schemas/FilterSetRestApi.put" } }, "type": "object" } } }, - "description": "Item from Model" + "description": "Filter set changed" }, "400": { "$ref": "#/components/responses/400" @@ -9113,6 +11654,12 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { "$ref": "#/components/responses/422" }, @@ -9126,36 +11673,42 @@ } ], "tags": [ - "Dashboards" + "FilterSetRestApi" ] } }, - "/dashboard/export/": { + "/api/v1/dashboard/{id_or_slug}": { "get": { - "description": "Exports multiple Dashboards and downloads them as YAML files.", + "description": "Get a dashboard detail information.", "parameters": [ { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/get_export_ids_schema" - } - } - }, - "in": "query", - "name": "q" + "description": "Either the id of the dashboard, or its slug", + "in": "path", + "name": "id_or_slug", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "properties": { + "result": { + "$ref": "#/components/schemas/DashboardGetResponseSchema" + } + }, + "type": "object" } } }, - "description": "Dashboard export" + "description": "Dashboard" + }, + "302": { + "description": "Redirects to the current digest" }, "400": { "$ref": "#/components/responses/400" @@ -9163,14 +11716,11 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "$ref": "#/components/responses/403" + }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "500": { - "$ref": "#/components/responses/500" } }, "security": [ @@ -9183,20 +11733,17 @@ ] } }, - "/dashboard/favorite_status/": { + "/api/v1/dashboard/{id_or_slug}/charts": { "get": { - "description": "Check favorited dashboards for current user", + "description": "Get the chart definitions for a given dashboard", "parameters": [ { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/get_fav_star_ids_schema" - } - } - }, - "in": "query", - "name": "q" + "in": "path", + "name": "id_or_slug", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -9204,11 +11751,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetFavStarIdsSchema" + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/ChartEntityResponseSchema" + }, + "type": "array" + } + }, + "type": "object" } } }, - "description": "None" + "description": "Dashboard chart definitions" + }, + "302": { + "description": "Redirects to the current digest" }, "400": { "$ref": "#/components/responses/400" @@ -9216,11 +11774,11 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "$ref": "#/components/responses/403" + }, "404": { "$ref": "#/components/responses/404" - }, - "500": { - "$ref": "#/components/responses/500" } }, "security": [ @@ -9233,48 +11791,41 @@ ] } }, - "/dashboard/import/": { - "post": { - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "properties": { - "formData": { - "description": "upload file (ZIP or JSON)", - "format": "binary", - "type": "string" - }, - "overwrite": { - "description": "overwrite existing databases?", - "type": "boolean" - }, - "passwords": { - "description": "JSON map of passwords for each file", - "type": "string" - } - }, - "type": "object" - } + "/api/v1/dashboard/{id_or_slug}/datasets": { + "get": { + "description": "Returns a list of a dashboard's datasets. Each dataset includes only the information necessary to render the dashboard's charts.", + "parameters": [ + { + "description": "Either the id of the dashboard, or its slug", + "in": "path", + "name": "id_or_slug", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "schema": { "properties": { - "message": { - "type": "string" + "result": { + "items": { + "$ref": "#/components/schemas/DashboardDatasetSchema" + }, + "type": "array" } }, "type": "object" } } }, - "description": "Dashboard import result" + "description": "Dashboard dataset definitions" + }, + "302": { + "description": "Redirects to the current digest" }, "400": { "$ref": "#/components/responses/400" @@ -9282,11 +11833,11 @@ "401": { "$ref": "#/components/responses/401" }, - "422": { - "$ref": "#/components/responses/422" + "403": { + "$ref": "#/components/responses/403" }, - "500": { - "$ref": "#/components/responses/500" + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -9299,28 +11850,17 @@ ] } }, - "/dashboard/related/{column_name}": { - "get": { - "description": "Get a list of all possible owners for a dashboard.", + "/api/v1/dashboard/{pk}": { + "delete": { + "description": "Deletes a Dashboard.", "parameters": [ { "in": "path", - "name": "column_name", + "name": "pk", "required": true, "schema": { - "type": "string" + "type": "integer" } - }, - { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/get_related_schema" - } - } - }, - "in": "query", - "name": "q" } ], "responses": { @@ -9328,21 +11868,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RelatedResponseSchema" + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" } } }, - "description": "Related column data" - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Dashboard deleted" }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "$ref": "#/components/responses/403" + }, "404": { "$ref": "#/components/responses/404" }, + "422": { + "$ref": "#/components/responses/422" + }, "500": { "$ref": "#/components/responses/500" } @@ -9355,40 +11903,51 @@ "tags": [ "Dashboards" ] - } - }, - "/dashboard/{id_or_slug}": { - "get": { - "description": "Get a dashboard detail information.", + }, + "put": { + "description": "Changes a Dashboard.", "parameters": [ { - "description": "Either the id of the dashboard, or its slug", "in": "path", - "name": "id_or_slug", + "name": "pk", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DashboardRestApi.put" + } + } + }, + "description": "Dashboard schema", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { "properties": { + "id": { + "type": "number" + }, + "last_modified_time": { + "type": "number" + }, "result": { - "$ref": "#/components/schemas/DashboardGetResponseSchema" + "$ref": "#/components/schemas/DashboardRestApi.put" } }, "type": "object" } } }, - "description": "Dashboard" - }, - "302": { - "description": "Redirects to the current digest" + "description": "Dashboard changed" }, "400": { "$ref": "#/components/responses/400" @@ -9396,8 +11955,17 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "$ref": "#/components/responses/403" + }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + }, + "500": { + "$ref": "#/components/responses/500" } }, "security": [ @@ -9410,40 +11978,45 @@ ] } }, - "/dashboard/{id_or_slug}/charts": { - "get": { - "description": "Get the chart definitions for a given dashboard", + "/api/v1/dashboard/{pk}/filter_state": { + "post": { + "description": "Stores a new value.", "parameters": [ { "in": "path", - "name": "id_or_slug", + "name": "pk", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeyValuePostSchema" + } + } + }, + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { "properties": { - "result": { - "items": { - "$ref": "#/components/schemas/ChartEntityResponseSchema" - }, - "type": "array" + "key": { + "description": "The key to retrieve the value.", + "type": "string" } }, "type": "object" } } }, - "description": "Dashboard chart definitions" - }, - "302": { - "description": "Redirects to the current digest" + "description": "The value was stored successfully." }, "400": { "$ref": "#/components/responses/400" @@ -9451,8 +12024,11 @@ "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "422": { + "$ref": "#/components/responses/422" + }, + "500": { + "$ref": "#/components/responses/500" } }, "security": [ @@ -9461,18 +12037,26 @@ } ], "tags": [ - "Dashboards" + "Filter State" ] } }, - "/dashboard/{id_or_slug}/datasets": { - "get": { - "description": "Returns a list of a dashboard's datasets. Each dataset includes only the information necessary to render the dashboard's charts.", + "/api/v1/dashboard/{pk}/filter_state/{key}/": { + "delete": { + "description": "Deletes a value.", "parameters": [ { - "description": "Either the id of the dashboard, or its slug", "in": "path", - "name": "id_or_slug", + "name": "pk", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The value key.", + "in": "path", + "name": "key", "required": true, "schema": { "type": "string" @@ -9485,21 +12069,16 @@ "application/json": { "schema": { "properties": { - "result": { - "items": { - "$ref": "#/components/schemas/DashboardDatasetSchema" - }, - "type": "array" + "message": { + "description": "The result of the operation", + "type": "string" } }, "type": "object" } } }, - "description": "Dashboard dataset definitions" - }, - "302": { - "description": "Redirects to the current digest" + "description": "Deleted the stored value." }, "400": { "$ref": "#/components/responses/400" @@ -9509,6 +12088,12 @@ }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + }, + "500": { + "$ref": "#/components/responses/500" } }, "security": [ @@ -9517,13 +12102,11 @@ } ], "tags": [ - "Dashboards" + "Filter State" ] - } - }, - "/dashboard/{pk}": { - "delete": { - "description": "Deletes a Dashboard.", + }, + "get": { + "description": "Retrives a value.", "parameters": [ { "in": "path", @@ -9532,6 +12115,14 @@ "schema": { "type": "integer" } + }, + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -9540,7 +12131,8 @@ "application/json": { "schema": { "properties": { - "message": { + "value": { + "description": "The stored value", "type": "string" } }, @@ -9548,14 +12140,14 @@ } } }, - "description": "Dashboard deleted" + "description": "Returns the stored value." + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "$ref": "#/components/responses/403" - }, "404": { "$ref": "#/components/responses/404" }, @@ -9572,11 +12164,11 @@ } ], "tags": [ - "Dashboards" + "Filter State" ] }, "put": { - "description": "Changes a Dashboard.", + "description": "Updates an existing value.", "parameters": [ { "in": "path", @@ -9585,17 +12177,24 @@ "schema": { "type": "integer" } + }, + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DashboardRestApi.put" + "$ref": "#/components/schemas/KeyValuePutSchema" } } }, - "description": "Dashboard schema", "required": true }, "responses": { @@ -9604,18 +12203,16 @@ "application/json": { "schema": { "properties": { - "id": { - "type": "number" - }, - "result": { - "$ref": "#/components/schemas/DashboardRestApi.put" + "message": { + "description": "The result of the operation", + "type": "string" } }, "type": "object" } } }, - "description": "Dashboard changed" + "description": "The value was stored successfully." }, "400": { "$ref": "#/components/responses/400" @@ -9623,9 +12220,6 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "$ref": "#/components/responses/403" - }, "404": { "$ref": "#/components/responses/404" }, @@ -9642,11 +12236,11 @@ } ], "tags": [ - "Dashboards" + "Filter State" ] } }, - "/dashboard/{pk}/thumbnail/{digest}/": { + "/api/v1/dashboard/{pk}/thumbnail/{digest}/": { "get": { "description": "Compute async or get already computed dashboard thumbnail from cache.", "parameters": [ @@ -9729,7 +12323,7 @@ ] } }, - "/database/": { + "/api/v1/database/": { "get": { "description": "Get a list of models", "parameters": [ @@ -9895,7 +12489,7 @@ ] } }, - "/database/_info": { + "/api/v1/database/_info": { "get": { "description": "Get metadata information about this API resource", "parameters": [ @@ -9981,7 +12575,7 @@ ] } }, - "/database/available/": { + "/api/v1/database/available/": { "get": { "description": "Get names of databases currently available", "responses": { @@ -9989,45 +12583,43 @@ "content": { "application/json": { "schema": { - "databases": { - "items": { - "properties": { - "available_drivers": { - "description": "Installed drivers for the engine", - "items": { - "type": "string" - }, - "type": "array" - }, - "default_driver": { - "description": "Default driver for the engine", - "type": "string" - }, - "engine": { - "description": "Name of the SQLAlchemy engine", - "type": "string" - }, - "name": { - "description": "Name of the database", + "items": { + "properties": { + "available_drivers": { + "description": "Installed drivers for the engine", + "items": { "type": "string" }, - "parameters": { - "description": "JSON schema defining the needed parameters", - "type": "object" - }, - "preferred": { - "description": "Is the database preferred?", - "type": "boolean" - }, - "sqlalchemy_uri_placeholder": { - "description": "Example placeholder for the SQLAlchemy URI", - "type": "string" - } + "type": "array" }, - "type": "object" + "default_driver": { + "description": "Default driver for the engine", + "type": "string" + }, + "engine": { + "description": "Name of the SQLAlchemy engine", + "type": "string" + }, + "name": { + "description": "Name of the database", + "type": "string" + }, + "parameters": { + "description": "JSON schema defining the needed parameters", + "type": "object" + }, + "preferred": { + "description": "Is the database preferred?", + "type": "boolean" + }, + "sqlalchemy_uri_placeholder": { + "description": "Example placeholder for the SQLAlchemy URI", + "type": "string" + } }, - "type": "array" - } + "type": "object" + }, + "type": "array" } } }, @@ -10050,7 +12642,7 @@ ] } }, - "/database/export/": { + "/api/v1/database/export/": { "get": { "description": "Download database(s) and associated dataset(s) as a zip file", "parameters": [ @@ -10098,7 +12690,7 @@ ] } }, - "/database/import/": { + "/api/v1/database/import/": { "post": { "requestBody": { "content": { @@ -10164,7 +12756,7 @@ ] } }, - "/database/test_connection": { + "/api/v1/database/test_connection": { "post": { "description": "Tests a database connection", "requestBody": { @@ -10214,7 +12806,7 @@ ] } }, - "/database/validate_parameters": { + "/api/v1/database/validate_parameters": { "post": { "description": "Validates parameters used to connect to a database", "requestBody": { @@ -10264,7 +12856,7 @@ ] } }, - "/database/{pk}": { + "/api/v1/database/{pk}": { "delete": { "description": "Deletes a Database.", "parameters": [ @@ -10489,7 +13081,7 @@ ] } }, - "/database/{pk}/function_names/": { + "/api/v1/database/{pk}/function_names/": { "get": { "description": "Get function names supported by a database", "parameters": [ @@ -10533,7 +13125,7 @@ ] } }, - "/database/{pk}/related_objects/": { + "/api/v1/database/{pk}/related_objects/": { "get": { "description": "Get charts and dashboards count associated to a database", "parameters": [ @@ -10577,7 +13169,7 @@ ] } }, - "/database/{pk}/schemas/": { + "/api/v1/database/{pk}/schemas/": { "get": { "description": "Get all schemas from a database", "parameters": [ @@ -10636,7 +13228,7 @@ ] } }, - "/database/{pk}/select_star/{table_name}/": { + "/api/v1/database/{pk}/select_star/{table_name}/": { "get": { "description": "Get database select star for table", "parameters": [ @@ -10705,7 +13297,7 @@ ] } }, - "/database/{pk}/select_star/{table_name}/{schema_name}/": { + "/api/v1/database/{pk}/select_star/{table_name}/{schema_name}/": { "get": { "description": "Get database select star for table", "parameters": [ @@ -10774,7 +13366,7 @@ ] } }, - "/database/{pk}/table/{table_name}/{schema_name}/": { + "/api/v1/database/{pk}/table/{table_name}/{schema_name}/": { "get": { "description": "Get database table metadata", "parameters": [ @@ -10843,7 +13435,7 @@ ] } }, - "/dataset/": { + "/api/v1/dataset/": { "delete": { "description": "Deletes multiple Datasets in a bulk operation.", "parameters": [ @@ -11065,7 +13657,7 @@ ] } }, - "/dataset/_info": { + "/api/v1/dataset/_info": { "get": { "description": "Get metadata information about this API resource", "parameters": [ @@ -11151,7 +13743,7 @@ ] } }, - "/dataset/distinct/{column_name}": { + "/api/v1/dataset/distinct/{column_name}": { "get": { "parameters": [ { @@ -11208,7 +13800,7 @@ ] } }, - "/dataset/export/": { + "/api/v1/dataset/export/": { "get": { "description": "Exports multiple datasets and downloads them as YAML files", "parameters": [ @@ -11258,7 +13850,7 @@ ] } }, - "/dataset/import/": { + "/api/v1/dataset/import/": { "post": { "requestBody": { "content": { @@ -11324,7 +13916,7 @@ ] } }, - "/dataset/related/{column_name}": { + "/api/v1/dataset/related/{column_name}": { "get": { "parameters": [ { @@ -11381,7 +13973,7 @@ ] } }, - "/dataset/{pk}": { + "/api/v1/dataset/{pk}": { "delete": { "description": "Deletes a Dataset", "parameters": [ @@ -11613,7 +14205,7 @@ ] } }, - "/dataset/{pk}/column/{column_id}": { + "/api/v1/dataset/{pk}/column/{column_id}": { "delete": { "description": "Delete a Dataset column", "parameters": [ @@ -11678,7 +14270,7 @@ ] } }, - "/dataset/{pk}/metric/{metric_id}": { + "/api/v1/dataset/{pk}/metric/{metric_id}": { "delete": { "description": "Delete a Dataset metric", "parameters": [ @@ -11743,7 +14335,7 @@ ] } }, - "/dataset/{pk}/refresh": { + "/api/v1/dataset/{pk}/refresh": { "put": { "description": "Refreshes and updates columns of a dataset", "parameters": [ @@ -11798,7 +14390,7 @@ ] } }, - "/dataset/{pk}/related_objects": { + "/api/v1/dataset/{pk}/related_objects": { "get": { "description": "Get charts and dashboards count associated to a dataset", "parameters": [ @@ -11842,7 +14434,7 @@ ] } }, - "/log/": { + "/api/v1/log/": { "get": { "description": "Get a list of models", "parameters": [ @@ -12004,7 +14596,7 @@ ] } }, - "/log/{pk}": { + "/api/v1/log/{pk}": { "get": { "description": "Get an item model", "parameters": [ @@ -12106,7 +14698,7 @@ ] } }, - "/menu/": { + "/api/v1/menu/": { "get": { "description": "Get the menu data structure. Returns a forest like structure with the menu the user has access to", "responses": { @@ -12167,48 +14759,7 @@ ] } }, - "/openapi/{version}/_openapi": { - "get": { - "description": "Get the OpenAPI spec for a specific API version", - "parameters": [ - { - "in": "path", - "name": "version", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - }, - "description": "The OpenAPI spec" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "500": { - "$ref": "#/components/responses/500" - } - }, - "security": [ - { - "jwt": [] - } - ], - "tags": [ - "OpenApi" - ] - } - }, - "/query/": { + "/api/v1/query/": { "get": { "description": "Get a list of queries, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", "parameters": [ @@ -12317,7 +14868,7 @@ ] } }, - "/query/distinct/{column_name}": { + "/api/v1/query/distinct/{column_name}": { "get": { "parameters": [ { @@ -12374,7 +14925,7 @@ ] } }, - "/query/related/{column_name}": { + "/api/v1/query/related/{column_name}": { "get": { "parameters": [ { @@ -12431,7 +14982,7 @@ ] } }, - "/query/{pk}": { + "/api/v1/query/{pk}": { "get": { "description": "Get query detail information.", "parameters": [ @@ -12533,7 +15084,7 @@ ] } }, - "/report/": { + "/api/v1/report/": { "delete": { "description": "Deletes multiple report schedules in a bulk operation.", "parameters": [ @@ -12752,7 +15303,7 @@ ] } }, - "/report/_info": { + "/api/v1/report/_info": { "get": { "description": "Get metadata information about this API resource", "parameters": [ @@ -12838,7 +15389,7 @@ ] } }, - "/report/related/{column_name}": { + "/api/v1/report/related/{column_name}": { "get": { "parameters": [ { @@ -12895,7 +15446,7 @@ ] } }, - "/report/{pk}": { + "/api/v1/report/{pk}": { "delete": { "description": "Delete a report schedule", "parameters": [ @@ -13116,7 +15667,7 @@ ] } }, - "/report/{pk}/log/": { + "/api/v1/report/{pk}/log/": { "get": { "description": "Get a list of report schedule logs, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", "parameters": [ @@ -13195,7 +15746,7 @@ ] } }, - "/report/{pk}/log/{log_id}": { + "/api/v1/report/{pk}/log/{log_id}": { "get": { "description": "Get a report schedule log", "parameters": [ @@ -13275,7 +15826,7 @@ ] } }, - "/saved_query/": { + "/api/v1/saved_query/": { "delete": { "description": "Deletes multiple saved queries in a bulk operation.", "parameters": [ @@ -13491,7 +16042,7 @@ ] } }, - "/saved_query/_info": { + "/api/v1/saved_query/_info": { "get": { "description": "Get metadata information about this API resource", "parameters": [ @@ -13577,7 +16128,7 @@ ] } }, - "/saved_query/distinct/{column_name}": { + "/api/v1/saved_query/distinct/{column_name}": { "get": { "parameters": [ { @@ -13634,7 +16185,7 @@ ] } }, - "/saved_query/export/": { + "/api/v1/saved_query/export/": { "get": { "description": "Exports multiple saved queries and downloads them as YAML files", "parameters": [ @@ -13685,7 +16236,7 @@ ] } }, - "/saved_query/import/": { + "/api/v1/saved_query/import/": { "post": { "requestBody": { "content": { @@ -13751,7 +16302,7 @@ ] } }, - "/saved_query/related/{column_name}": { + "/api/v1/saved_query/related/{column_name}": { "get": { "parameters": [ { @@ -13808,7 +16359,7 @@ ] } }, - "/saved_query/{pk}": { + "/api/v1/saved_query/{pk}": { "delete": { "description": "Delete saved query", "parameters": [ @@ -14021,7 +16572,7 @@ ] } }, - "/security/csrf_token/": { + "/api/v1/security/csrf_token/": { "get": { "description": "Fetch the CSRF token", "responses": { @@ -14057,7 +16608,7 @@ ] } }, - "/security/login": { + "/api/v1/security/login": { "post": { "description": "Authenticate and get a JWT access and refresh token", "requestBody": { @@ -14130,7 +16681,7 @@ ] } }, - "/security/refresh": { + "/api/v1/security/refresh": { "post": { "description": "Use the refresh token to get a new JWT access token", "responses": { @@ -14166,11 +16717,52 @@ "Security" ] } + }, + "/api/{version}/_openapi": { + "get": { + "description": "Get the OpenAPI spec for a specific API version", + "parameters": [ + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "The OpenAPI spec" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "OpenApi" + ] + } } }, "servers": [ { - "url": "/api/v1" + "url": "http://localhost:8088" } ] } diff --git a/superset/cli.py b/superset/cli.py index bef7dd04cb02b..5da126e560c0d 100755 --- a/superset/cli.py +++ b/superset/cli.py @@ -35,6 +35,7 @@ from flask.cli import FlaskGroup, with_appcontext from flask_appbuilder import Model from flask_appbuilder.api import BaseApi +from flask_appbuilder.api.manager import resolver from superset import app, appbuilder, config, security_manager from superset.extensions import celery_app, db @@ -857,8 +858,8 @@ def update_api_docs() -> None: version=api_version, openapi_version="3.0.2", info=dict(description=current_app.appbuilder.app_name), - plugins=[MarshmallowPlugin()], - servers=[{"url": "/api/{}".format(api_version)}], + plugins=[MarshmallowPlugin(schema_name_resolver=resolver)], + servers=[{"url": "http://localhost:8088"}], ) for base_api in current_app.appbuilder.baseviews: if isinstance(base_api, BaseApi) and base_api.version == api_version: diff --git a/superset/dashboards/filter_state/api.py b/superset/dashboards/filter_state/api.py index afc7616d9cf0c..2a3e405f0a74b 100644 --- a/superset/dashboards/filter_state/api.py +++ b/superset/dashboards/filter_state/api.py @@ -70,8 +70,7 @@ def post(self, pk: int) -> Response: content: application/json: schema: - type: object - $ref: '#/components/schemas/KeyValuePostSchema' + $ref: '#/components/schemas/KeyValuePostSchema' responses: 201: description: The value was stored successfully. @@ -121,8 +120,7 @@ def put(self, pk: int, key: str) -> Response: content: application/json: schema: - type: object - $ref: '#/components/schemas/KeyValuePutSchema' + $ref: '#/components/schemas/KeyValuePutSchema' responses: 200: description: The value was stored successfully. diff --git a/superset/views/base_api.py b/superset/views/base_api.py index e80134605f54b..8193a283b7dbb 100644 --- a/superset/views/base_api.py +++ b/superset/views/base_api.py @@ -18,8 +18,6 @@ import logging from typing import Any, Callable, cast, Dict, List, Optional, Set, Tuple, Type, Union -from apispec import APISpec -from apispec.exceptions import DuplicateComponentNameError from flask import Blueprint, g, Response from flask_appbuilder import AppBuilder, Model, ModelRestApi from flask_appbuilder.api import expose, protect, rison, safe @@ -197,8 +195,6 @@ class BaseSupersetModelRestApi(ModelRestApi): allowed_distinct_fields: Set[str] = set() - openapi_spec_component_schemas: Tuple[Type[Schema], ...] = tuple() - # Add extra schemas to the OpenAPI component schemas section. add_columns: List[str] edit_columns: List[str] list_columns: List[str] @@ -217,33 +213,19 @@ class BaseSupersetModelRestApi(ModelRestApi): } def __init__(self) -> None: + super().__init__() # Setup statsd self.stats_logger = BaseStatsLogger() # Add base API spec base query parameter schemas if self.apispec_parameter_schemas is None: # type: ignore self.apispec_parameter_schemas = {} self.apispec_parameter_schemas["get_related_schema"] = get_related_schema - if self.openapi_spec_component_schemas is None: - self.openapi_spec_component_schemas = () - self.openapi_spec_component_schemas = self.openapi_spec_component_schemas + ( + self.openapi_spec_component_schemas: Tuple[ + Type[Schema], ... + ] = self.openapi_spec_component_schemas + ( RelatedResponseSchema, DistincResponseSchema, ) - super().__init__() - - def add_apispec_components(self, api_spec: APISpec) -> None: - """ - Adds extra OpenApi schema spec components, these are declared - on the `openapi_spec_component_schemas` class property - """ - for schema in self.openapi_spec_component_schemas: - try: - api_spec.components.schema( - schema.__name__, schema=schema, - ) - except DuplicateComponentNameError: - pass - super().add_apispec_components(api_spec) def create_blueprint( self, appbuilder: AppBuilder, *args: Any, **kwargs: Any @@ -252,6 +234,11 @@ def create_blueprint( return super().create_blueprint(appbuilder, *args, **kwargs) def _init_properties(self) -> None: + """ + Lock down initial not configured REST API columns. We want to just expose + model ids, if something is misconfigured. By default FAB exposes all available + columns on a Model + """ model_id = self.datamodel.get_pk_name() if self.list_columns is None and not self.list_model_schema: self.list_columns = [model_id]