diff --git a/docs/src/resources/openapi.json b/docs/src/resources/openapi.json index a86724ead9..3158a056de 100644 --- a/docs/src/resources/openapi.json +++ b/docs/src/resources/openapi.json @@ -724,12 +724,15 @@ "description": "To what level of granularity should the temporal column be aggregated. Supports [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) durations.", "enum": [ "PT1S", + "PT5S", + "PT30S", "PT1M", "PT5M", "PT10M", "PT15M", "PT0.5H", "PT1H", + "PT6H", "P1D", "P1W", "P1M", @@ -738,22 +741,19 @@ "1969-12-28T00:00:00Z/P1W", "1969-12-29T00:00:00Z/P1W", "P1W/1970-01-03T00:00:00Z", - "P1W/1970-01-04T00:00:00Z" + "P1W/1970-01-04T00:00:00Z", + "PT2H", + "PT4H", + "PT8H", + "PT10H", + "PT12H" ], "example": "P1D", "nullable": true, "type": "string" }, "time_range_endpoints": { - "items": { - "description": "A list with two values, stating if start/end should be inclusive/exclusive.", - "enum": [ - "unknown", - "inclusive", - "exclusive" - ], - "type": "string" - }, + "items": {}, "type": "array" }, "where": { @@ -780,11 +780,14 @@ ">=", "<=", "LIKE", + "ILIKE", "IS NULL", "IS NOT NULL", "IN", "NOT IN", - "REGEX" + "REGEX", + "IS TRUE", + "IS FALSE" ], "example": "IN", "type": "string" @@ -935,7 +938,9 @@ "prophet", "rolling", "select", - "sort" + "sort", + "diff", + "compare" ], "example": "aggregate", "type": "string" @@ -992,12 +997,15 @@ "description": "Time grain used to specify time period increments in prediction. Supports [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) durations.", "enum": [ "PT1S", + "PT5S", + "PT30S", "PT1M", "PT5M", "PT10M", "PT15M", "PT0.5H", "PT1H", + "PT6H", "P1D", "P1W", "P1M", @@ -1006,7 +1014,12 @@ "1969-12-28T00:00:00Z/P1W", "1969-12-29T00:00:00Z/P1W", "P1W/1970-01-03T00:00:00Z", - "P1W/1970-01-04T00:00:00Z" + "P1W/1970-01-04T00:00:00Z", + "PT2H", + "PT4H", + "PT8H", + "PT10H", + "PT12H" ], "example": "P1D", "type": "string" @@ -1042,24 +1055,8 @@ }, "type": "array" }, - "result_format": { - "description": "Format of result payload", - "enum": [ - "json", - "csv" - ], - "type": "string" - }, - "result_type": { - "description": "Type of results to return", - "enum": [ - "full", - "query", - "results", - "samples" - ], - "type": "string" - } + "result_format": {}, + "result_type": {} }, "type": "object" }, @@ -1078,8 +1075,14 @@ "example": { "__time_range": "1 year ago : now" }, + "nullable": true, "type": "object" }, + "apply_fetch_values_predicate": { + "description": "Add fetch values predicate (where clause) to query if defined in datasource", + "nullable": true, + "type": "boolean" + }, "columns": { "description": "Columns which to select in the query.", "items": { @@ -1088,6 +1091,14 @@ "nullable": true, "type": "array" }, + "datasource": { + "allOf": [ + { + "$ref": "#/components/schemas/ChartDataDatasource" + } + ], + "nullable": true + }, "druid_time_origin": { "description": "Starting point for time grain counting on legacy Druid datasources. Used to change e.g. Monday/Sunday first-day-of-week. This field is deprecated and should be passed to `extras` as `druid_time_origin`.", "nullable": true, @@ -1099,20 +1110,24 @@ "$ref": "#/components/schemas/ChartDataExtras" } ], - "description": "Extra parameters to add to the query." + "description": "Extra parameters to add to the query.", + "nullable": true }, "filters": { "items": { "$ref": "#/components/schemas/ChartDataFilter" }, + "nullable": true, "type": "array" }, "granularity": { "description": "Name of temporal column used for time filtering. For legacy Druid datasources this defines the time grain.", + "nullable": true, "type": "string" }, "granularity_sqla": { "description": "Name of temporal column used for time filtering for SQL datasources. This field is deprecated, use `granularity` instead.", + "nullable": true, "type": "string" }, "groupby": { @@ -1125,6 +1140,7 @@ }, "having": { "description": "HAVING clause to be added to aggregate queries using AND operator. This field is deprecated and should be passed to `extras`.", + "nullable": true, "type": "string" }, "having_filters": { @@ -1132,19 +1148,28 @@ "items": { "$ref": "#/components/schemas/ChartDataFilter" }, + "nullable": true, "type": "array" }, + "is_rowcount": { + "description": "Should the rowcount of the actual query be returned", + "nullable": true, + "type": "boolean" + }, "is_timeseries": { "description": "Is the `query_object` a timeseries.", + "nullable": true, "type": "boolean" }, "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" }, "order_desc": { "description": "Reverse order. Default: `false`", + "nullable": true, "type": "boolean" }, "orderby": { @@ -1159,10 +1184,8 @@ true ] ], - "items": { - "items": {}, - "type": "array" - }, + "items": {}, + "nullable": true, "type": "array" }, "post_processing": { @@ -1175,32 +1198,48 @@ ], "nullable": true }, + "nullable": true, "type": "array" }, + "result_type": { + "nullable": true + }, "row_limit": { - "description": "Maximum row count. Default: `config[\"ROW_LIMIT\"]`", + "description": "Maximum row count (0=disabled). Default: `config[\"ROW_LIMIT\"]`", "format": "int32", - "minimum": 1, + "minimum": 0, + "nullable": true, "type": "integer" }, "row_offset": { "description": "Number of rows to skip. Default: `0`", "format": "int32", "minimum": 0, + "nullable": true, "type": "integer" }, + "time_offsets": { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + }, "time_range": { "description": "A time rage, either expressed as a colon separated string `since : until` or human readable freeform. Valid formats for `since` and `until` are: \n- ISO 8601\n- X days/years/hours/day/year/weeks\n- X days/years/hours/day/year/weeks ago\n- X days/years/hours/day/year/weeks from now\n\nAdditionally, the following freeform can be used:\n\n- Last day\n- Last week\n- Last month\n- Last quarter\n- Last year\n- No filter\n- Last X seconds/minutes/hours/days/weeks/months/years\n- Next X seconds/minutes/hours/days/weeks/months/years\n", "example": "Last week", + "nullable": true, "type": "string" }, "time_shift": { "description": "A human-readable date/time string. Please refer to [parsdatetime](https://github.com/bear/parsedatetime) documentation for details on valid values.", + "nullable": true, "type": "string" }, "timeseries_limit": { "description": "Maximum row count for timeseries queries. Default: `0`", "format": "int32", + "nullable": true, "type": "integer" }, "timeseries_limit_metric": { @@ -1218,6 +1257,7 @@ }, "where": { "description": "WHERE clause to be added to queries using AND operator.This field is deprecated and should be passed to `extras`.", + "nullable": true, "type": "string" } }, @@ -1477,6 +1517,51 @@ ], "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": { @@ -1539,19 +1624,23 @@ "type": "integer" }, "dashboards": { - "$ref": "#/components/schemas/Meta9" + "$ref": "#/components/schemas/Meta10" }, "description": { "nullable": true, "type": "string" }, "owners": { - "$ref": "#/components/schemas/Meta10" + "$ref": "#/components/schemas/Meta9" }, "params": { "nullable": true, "type": "string" }, + "query_context": { + "nullable": true, + "type": "string" + }, "slice_name": { "maxLength": 250, "nullable": true, @@ -1621,7 +1710,7 @@ "type": "integer" }, "owners": { - "$ref": "#/components/schemas/Meta7" + "$ref": "#/components/schemas/Meta8" }, "params": { "nullable": true, @@ -1633,7 +1722,7 @@ "type": "string" }, "table": { - "$ref": "#/components/schemas/Meta8" + "$ref": "#/components/schemas/Meta7" }, "thumbnail_url": { "readOnly": true @@ -1702,6 +1791,11 @@ "nullable": true, "type": "string" }, + "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" + }, "slice_name": { "description": "The name of the chart.", "maxLength": 250, @@ -1778,6 +1872,11 @@ "nullable": true, "type": "string" }, + "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" + }, "slice_name": { "description": "The name of the chart.", "maxLength": 250, @@ -1882,32 +1981,176 @@ }, "type": "object" }, - "DashboardRestApi.get": { + "DashboardDatasetSchema": { + "properties": { + "cache_timeout": { + "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" + }, + "datasource_name": { + "type": "string" + }, + "default_endpoint": { + "type": "string" + }, + "edit_url": { + "type": "string" + }, + "fetch_values_predicate": { + "type": "string" + }, + "filter_select": { + "type": "boolean" + }, + "filter_select_enabled": { + "type": "boolean" + }, + "granularity_sqla": { + "items": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": "array" + }, + "health_check_message": { + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "is_sqllab_view": { + "type": "boolean" + }, + "main_dttm_col": { + "type": "string" + }, + "metrics": { + "items": { + "type": "object" + }, + "type": "array" + }, + "name": { + "type": "string" + }, + "offset": { + "format": "int32", + "type": "integer" + }, + "order_by_choices": { + "items": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": "array" + }, + "owners": { + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "params": { + "type": "string" + }, + "perm": { + "type": "string" + }, + "schema": { + "type": "string" + }, + "select_star": { + "type": "string" + }, + "sql": { + "type": "string" + }, + "table_name": { + "type": "string" + }, + "template_params": { + "type": "string" + }, + "time_grain_sqla": { + "items": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "verbose_map": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + }, + "DashboardGetResponseSchema": { "properties": { "changed_by": { - "$ref": "#/components/schemas/Meta17" + "$ref": "#/components/schemas/User" }, "changed_by_name": { - "readOnly": true + "type": "string" }, "changed_by_url": { - "readOnly": true + "type": "string" }, "changed_on": { "format": "date-time", - "nullable": true, + "type": "string" + }, + "changed_on_delta_humanized": { "type": "string" }, "charts": { - "readOnly": true + "items": { + "description": "The names of the dashboard's charts. Names are used for legacy reasons.", + "type": "string" + }, + "type": "array" }, "css": { - "nullable": true, + "description": "Override CSS for the dashboard.", "type": "string" }, "dashboard_title": { - "maxLength": 500, - "nullable": true, + "description": "A title for the dashboard.", "type": "string" }, "id": { @@ -1915,33 +2158,48 @@ "type": "integer" }, "json_metadata": { - "nullable": true, + "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": { - "$ref": "#/components/schemas/Meta18" + "items": { + "$ref": "#/components/schemas/User" + }, + "type": "array" }, "position_json": { - "nullable": true, + "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": { - "nullable": true, "type": "boolean" }, + "roles": { + "items": { + "$ref": "#/components/schemas/Roles" + }, + "type": "array" + }, "slug": { - "maxLength": 255, - "nullable": true, "type": "string" }, "table_names": { - "readOnly": true + "type": "string" }, "thumbnail_url": { - "readOnly": true + "type": "string" }, "url": { - "readOnly": true + "type": "string" + } + }, + "type": "object" + }, + "DashboardRestApi.get": { + "properties": { + "id": { + "format": "int32", + "type": "integer" } }, "type": "object" @@ -1949,7 +2207,7 @@ "DashboardRestApi.get_list": { "properties": { "changed_by": { - "$ref": "#/components/schemas/Meta15" + "$ref": "#/components/schemas/Meta16" }, "changed_by_name": { "readOnly": true @@ -1984,7 +2242,7 @@ "type": "string" }, "owners": { - "$ref": "#/components/schemas/Meta16" + "$ref": "#/components/schemas/Meta15" }, "position_json": { "nullable": true, @@ -1994,11 +2252,17 @@ "nullable": true, "type": "boolean" }, + "roles": { + "$ref": "#/components/schemas/Meta17" + }, "slug": { "maxLength": 255, "nullable": true, "type": "string" }, + "status": { + "readOnly": true + }, "thumbnail_url": { "readOnly": true }, @@ -2040,6 +2304,14 @@ "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, @@ -2088,6 +2360,15 @@ "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, @@ -2098,6 +2379,48 @@ }, "type": "object" }, + "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": { @@ -2202,11 +2525,19 @@ "nullable": true, "type": "boolean" }, + "backend": { + "readOnly": true + }, "cache_timeout": { "format": "int32", "nullable": true, "type": "integer" }, + "configuration_method": { + "maxLength": 255, + "nullable": true, + "type": "string" + }, "database_name": { "maxLength": 250, "type": "string" @@ -2236,6 +2567,9 @@ "nullable": true, "type": "boolean" }, + "parameters": { + "readOnly": true + }, "server_cert": { "nullable": true, "type": "string" @@ -2298,7 +2632,7 @@ "readOnly": true }, "created_by": { - "$ref": "#/components/schemas/Meta19" + "$ref": "#/components/schemas/Meta18" }, "database_name": { "maxLength": 250, @@ -2311,14 +2645,15 @@ "nullable": true, "type": "boolean" }, + "extra": { + "nullable": true, + "type": "string" + }, "force_ctas_schema": { "maxLength": 250, "nullable": true, "type": "string" }, - "function_names": { - "readOnly": true - }, "id": { "format": "int32", "type": "integer" @@ -2361,6 +2696,10 @@ "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, @@ -2372,6 +2711,11 @@ "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" @@ -2391,6 +2735,11 @@ "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, @@ -2404,8 +2753,7 @@ } }, "required": [ - "database_name", - "sqlalchemy_uri" + "database_name" ], "type": "object" }, @@ -2441,6 +2789,10 @@ "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, @@ -2453,6 +2805,11 @@ "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" @@ -2472,6 +2829,11 @@ "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, @@ -2481,7 +2843,6 @@ "description": "

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

", "maxLength": 1024, "minLength": 0, - "nullable": true, "type": "string" } }, @@ -2489,6 +2850,10 @@ }, "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, @@ -2501,6 +2866,11 @@ "nullable": true, "type": "string" }, + "engine": { + "description": "SQLAlchemy engine to use", + "nullable": true, + "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.

", "type": "string" @@ -2509,6 +2879,11 @@ "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, @@ -2521,8 +2896,53 @@ "type": "string" } }, + "type": "object" + }, + "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": "A database name to identify this connection.", + "maxLength": 250, + "minLength": 1, + "nullable": true, + "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, + "type": "string" + }, + "engine": { + "description": "SQLAlchemy engine to use", + "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.

", + "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": { + "nullable": true + }, + "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": [ - "sqlalchemy_uri" + "configuration_method", + "engine" ], "type": "object" }, @@ -2582,6 +3002,78 @@ ], "type": "object" }, + "DatasetColumnsRestApi.get": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DatasetColumnsRestApi.get_list": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DatasetColumnsRestApi.post": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DatasetColumnsRestApi.put": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DatasetMetricRestApi.get": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DatasetMetricRestApi.get_list": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DatasetMetricRestApi.post": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DatasetMetricRestApi.put": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "DatasetMetricsPut": { "properties": { "d3format": { @@ -2709,10 +3201,10 @@ "type": "integer" }, "columns": { - "$ref": "#/components/schemas/Meta23" + "$ref": "#/components/schemas/Meta24" }, "database": { - "$ref": "#/components/schemas/Meta26" + "$ref": "#/components/schemas/Meta22" }, "datasource_type": { "readOnly": true @@ -2752,7 +3244,7 @@ "type": "string" }, "metrics": { - "$ref": "#/components/schemas/Meta25" + "$ref": "#/components/schemas/Meta23" }, "offset": { "format": "int32", @@ -2760,7 +3252,7 @@ "type": "integer" }, "owners": { - "$ref": "#/components/schemas/Meta24" + "$ref": "#/components/schemas/Meta25" }, "schema": { "maxLength": 255, @@ -2794,7 +3286,7 @@ "DatasetRestApi.get_list": { "properties": { "changed_by": { - "$ref": "#/components/schemas/Meta21" + "$ref": "#/components/schemas/Meta20" }, "changed_by_name": { "readOnly": true @@ -2809,7 +3301,7 @@ "readOnly": true }, "database": { - "$ref": "#/components/schemas/Meta22" + "$ref": "#/components/schemas/Meta21" }, "default_endpoint": { "nullable": true, @@ -2830,7 +3322,7 @@ "readOnly": true }, "owners": { - "$ref": "#/components/schemas/Meta20" + "$ref": "#/components/schemas/Meta19" }, "schema": { "maxLength": 255, @@ -3073,7 +3565,7 @@ "type": "integer" }, "user": { - "$ref": "#/components/schemas/Meta44" + "$ref": "#/components/schemas/Meta43" }, "user_id": { "format": "int32", @@ -3120,7 +3612,7 @@ "type": "integer" }, "user": { - "$ref": "#/components/schemas/Meta43" + "$ref": "#/components/schemas/Meta42" }, "user_id": { "format": "int32", @@ -3195,28 +3687,16 @@ }, "Meta10": { "properties": { - "first_name": { - "maxLength": 64, + "dashboard_title": { + "maxLength": 500, + "nullable": true, "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": { @@ -3401,17 +3881,38 @@ }, "Meta17": { "properties": { - "username": { + "id": { + "format": "int32", + "type": "integer" + }, + "name": { "maxLength": 64, "type": "string" } }, "required": [ - "username" + "name" ], "type": "object" }, "Meta18": { + "properties": { + "first_name": { + "maxLength": 64, + "type": "string" + }, + "last_name": { + "maxLength": 64, + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "type": "object" + }, + "Meta19": { "properties": { "first_name": { "maxLength": 64, @@ -3437,23 +3938,6 @@ ], "type": "object" }, - "Meta19": { - "properties": { - "first_name": { - "maxLength": 64, - "type": "string" - }, - "last_name": { - "maxLength": 64, - "type": "string" - } - }, - "required": [ - "first_name", - "last_name" - ], - "type": "object" - }, "Meta2": { "properties": { "id": { @@ -3474,14 +3958,6 @@ "maxLength": 64, "type": "string" }, - "id": { - "format": "int32", - "type": "integer" - }, - "last_name": { - "maxLength": 64, - "type": "string" - }, "username": { "maxLength": 64, "type": "string" @@ -3489,25 +3965,23 @@ }, "required": [ "first_name", - "last_name", "username" ], "type": "object" }, "Meta21": { "properties": { - "first_name": { - "maxLength": 64, + "database_name": { + "maxLength": 250, "type": "string" }, - "username": { - "maxLength": 64, - "type": "string" + "id": { + "format": "int32", + "type": "integer" } }, "required": [ - "first_name", - "username" + "database_name" ], "type": "object" }, @@ -3528,102 +4002,6 @@ "type": "object" }, "Meta23": { - "properties": { - "changed_on": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "column_name": { - "maxLength": 255, - "type": "string" - }, - "created_on": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "description": { - "nullable": true, - "type": "string" - }, - "expression": { - "nullable": true, - "type": "string" - }, - "filterable": { - "nullable": true, - "type": "boolean" - }, - "groupby": { - "nullable": true, - "type": "boolean" - }, - "id": { - "format": "int32", - "type": "integer" - }, - "is_active": { - "nullable": true, - "type": "boolean" - }, - "is_dttm": { - "nullable": true, - "type": "boolean" - }, - "python_date_format": { - "maxLength": 255, - "nullable": true, - "type": "string" - }, - "type": { - "maxLength": 32, - "nullable": true, - "type": "string" - }, - "uuid": { - "format": "uuid", - "nullable": true, - "type": "string" - }, - "verbose_name": { - "maxLength": 1024, - "nullable": true, - "type": "string" - } - }, - "required": [ - "column_name" - ], - "type": "object" - }, - "Meta24": { - "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" - }, - "Meta25": { "properties": { "changed_on": { "format": "date-time", @@ -3685,23 +4063,80 @@ ], "type": "object" }, - "Meta26": { + "Meta24": { "properties": { - "database_name": { - "maxLength": 250, + "changed_on": { + "format": "date-time", + "nullable": true, "type": "string" }, + "column_name": { + "maxLength": 255, + "type": "string" + }, + "created_on": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "description": { + "nullable": true, + "type": "string" + }, + "expression": { + "nullable": true, + "type": "string" + }, + "filterable": { + "nullable": true, + "type": "boolean" + }, + "groupby": { + "nullable": true, + "type": "boolean" + }, "id": { "format": "int32", "type": "integer" + }, + "is_active": { + "nullable": true, + "type": "boolean" + }, + "is_dttm": { + "nullable": true, + "type": "boolean" + }, + "python_date_format": { + "maxLength": 255, + "nullable": true, + "type": "string" + }, + "type": { + "maxLength": 32, + "nullable": true, + "type": "string" + }, + "type_generic": { + "readOnly": true + }, + "uuid": { + "format": "uuid", + "nullable": true, + "type": "string" + }, + "verbose_name": { + "maxLength": 1024, + "nullable": true, + "type": "string" } }, "required": [ - "database_name" + "column_name" ], "type": "object" }, - "Meta27": { + "Meta25": { "properties": { "first_name": { "maxLength": 64, @@ -3727,7 +4162,33 @@ ], "type": "object" }, - "Meta28": { + "Meta26": { + "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" + }, + "Meta27": { "properties": { "database_name": { "maxLength": 250, @@ -3739,7 +4200,7 @@ ], "type": "object" }, - "Meta29": { + "Meta28": { "properties": { "id": { "format": "int32", @@ -3748,6 +4209,27 @@ }, "type": "object" }, + "Meta29": { + "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" + }, "Meta3": { "properties": { "first_name": { @@ -3767,42 +4249,21 @@ }, "Meta30": { "properties": { - "first_name": { - "maxLength": 64, + "database_name": { + "maxLength": 250, "type": "string" }, "id": { "format": "int32", "type": "integer" - }, - "last_name": { - "maxLength": 64, - "type": "string" } }, "required": [ - "first_name", - "last_name" + "database_name" ], "type": "object" }, "Meta31": { - "properties": { - "database_name": { - "maxLength": 250, - "type": "string" - }, - "id": { - "format": "int32", - "type": "integer" - } - }, - "required": [ - "database_name" - ], - "type": "object" - }, - "Meta32": { "properties": { "first_name": { "maxLength": 64, @@ -3823,7 +4284,7 @@ ], "type": "object" }, - "Meta33": { + "Meta32": { "properties": { "database_name": { "maxLength": 250, @@ -3839,19 +4300,41 @@ ], "type": "object" }, - "Meta34": { + "Meta33": { "properties": { - "id": { - "format": "int32", - "type": "integer" + "first_name": { + "maxLength": 64, + "type": "string" }, - "type": { - "maxLength": 50, + "last_name": { + "maxLength": 64, "type": "string" } }, "required": [ - "type" + "first_name", + "last_name" + ], + "type": "object" + }, + "Meta34": { + "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" }, @@ -3874,49 +4357,48 @@ }, "Meta36": { "properties": { - "first_name": { - "maxLength": 64, - "type": "string" + "id": { + "format": "int32", + "type": "integer" }, - "last_name": { - "maxLength": 64, + "type": { + "maxLength": 50, "type": "string" } }, "required": [ - "first_name", - "last_name" + "type" ], "type": "object" }, "Meta37": { "properties": { - "first_name": { - "maxLength": 64, + "dashboard_title": { + "maxLength": 500, + "nullable": true, "type": "string" }, "id": { "format": "int32", "type": "integer" - }, - "last_name": { - "maxLength": 64, - "type": "string" } }, - "required": [ - "first_name", - "last_name" - ], "type": "object" }, "Meta38": { "properties": { + "database_name": { + "maxLength": 250, + "type": "string" + }, "id": { "format": "int32", "type": "integer" } }, + "required": [ + "database_name" + ], "type": "object" }, "Meta39": { @@ -3924,6 +4406,16 @@ "id": { "format": "int32", "type": "integer" + }, + "slice_name": { + "maxLength": 250, + "nullable": true, + "type": "string" + }, + "viz_type": { + "maxLength": 250, + "nullable": true, + "type": "string" } }, "type": "object" @@ -3946,26 +4438,6 @@ "type": "object" }, "Meta40": { - "properties": { - "id": { - "format": "int32", - "type": "integer" - }, - "recipient_config_json": { - "nullable": true, - "type": "string" - }, - "type": { - "maxLength": 50, - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, - "Meta41": { "properties": { "first_name": { "maxLength": 64, @@ -3986,16 +4458,27 @@ ], "type": "object" }, - "Meta42": { + "Meta41": { "properties": { "id": { "format": "int32", "type": "integer" + }, + "recipient_config_json": { + "nullable": true, + "type": "string" + }, + "type": { + "maxLength": 50, + "type": "string" } }, + "required": [ + "type" + ], "type": "object" }, - "Meta43": { + "Meta42": { "properties": { "username": { "maxLength": 64, @@ -4007,7 +4490,7 @@ ], "type": "object" }, - "Meta44": { + "Meta43": { "properties": { "username": { "maxLength": 64, @@ -4058,6 +4541,22 @@ "type": "object" }, "Meta7": { + "properties": { + "default_endpoint": { + "nullable": true, + "type": "string" + }, + "table_name": { + "maxLength": 250, + "type": "string" + } + }, + "required": [ + "table_name" + ], + "type": "object" + }, + "Meta8": { "properties": { "first_name": { "maxLength": 64, @@ -4083,34 +4582,30 @@ ], "type": "object" }, - "Meta8": { - "properties": { - "default_endpoint": { - "nullable": true, - "type": "string" - }, - "table_name": { - "maxLength": 250, - "type": "string" - } - }, - "required": [ - "table_name" - ], - "type": "object" - }, "Meta9": { "properties": { - "dashboard_title": { - "maxLength": 500, - "nullable": true, + "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.get": { @@ -4125,7 +4620,7 @@ "type": "string" }, "database": { - "$ref": "#/components/schemas/Meta29" + "$ref": "#/components/schemas/Meta28" }, "end_result_backend_time": { "nullable": true, @@ -4240,7 +4735,7 @@ "type": "string" }, "database": { - "$ref": "#/components/schemas/Meta28" + "$ref": "#/components/schemas/Meta27" }, "end_time": { "nullable": true, @@ -4295,7 +4790,7 @@ "type": "string" }, "user": { - "$ref": "#/components/schemas/Meta27" + "$ref": "#/components/schemas/Meta26" } }, "required": [ @@ -4379,6 +4874,11 @@ "maxLength": 50, "type": "string" }, + "uuid": { + "format": "uuid", + "nullable": true, + "type": "string" + }, "value": { "format": "float", "nullable": true, @@ -4423,6 +4923,11 @@ "maxLength": 50, "type": "string" }, + "uuid": { + "format": "uuid", + "nullable": true, + "type": "string" + }, "value": { "format": "float", "nullable": true, @@ -4497,15 +5002,20 @@ "nullable": true, "type": "string" }, + "creation_method": { + "maxLength": 255, + "nullable": true, + "type": "string" + }, "crontab": { "maxLength": 1000, "type": "string" }, "dashboard": { - "$ref": "#/components/schemas/Meta38" + "$ref": "#/components/schemas/Meta37" }, "database": { - "$ref": "#/components/schemas/Meta42" + "$ref": "#/components/schemas/Meta38" }, "description": { "nullable": true, @@ -4549,15 +5059,24 @@ "type": "string" }, "owners": { - "$ref": "#/components/schemas/Meta41" + "$ref": "#/components/schemas/Meta40" }, "recipients": { - "$ref": "#/components/schemas/Meta40" + "$ref": "#/components/schemas/Meta41" + }, + "report_format": { + "maxLength": 50, + "nullable": true, + "type": "string" }, "sql": { "nullable": true, "type": "string" }, + "timezone": { + "maxLength": 100, + "type": "string" + }, "type": { "maxLength": 50, "type": "string" @@ -4592,7 +5111,7 @@ "type": "boolean" }, "changed_by": { - "$ref": "#/components/schemas/Meta36" + "$ref": "#/components/schemas/Meta35" }, "changed_on": { "format": "date-time", @@ -4603,13 +5122,18 @@ "readOnly": true }, "created_by": { - "$ref": "#/components/schemas/Meta35" + "$ref": "#/components/schemas/Meta33" }, "created_on": { "format": "date-time", "nullable": true, "type": "string" }, + "creation_method": { + "maxLength": 255, + "nullable": true, + "type": "string" + }, "crontab": { "maxLength": 1000, "type": "string" @@ -4636,10 +5160,14 @@ "type": "string" }, "owners": { - "$ref": "#/components/schemas/Meta37" + "$ref": "#/components/schemas/Meta34" }, "recipients": { - "$ref": "#/components/schemas/Meta34" + "$ref": "#/components/schemas/Meta36" + }, + "timezone": { + "maxLength": 100, + "type": "string" }, "type": { "maxLength": 50, @@ -4661,6 +5189,7 @@ }, "chart": { "format": "int32", + "nullable": true, "type": "integer" }, "context_markdown": { @@ -4668,6 +5197,9 @@ "nullable": true, "type": "string" }, + "creation_method": { + "description": "Creation method is used to inform the frontend whether the report/alert was created in the dashboard, chart, or alerts and reports UI." + }, "crontab": { "description": "A CRON expression.[Crontab Guru](https://crontab.guru/) is a helpful resource that can help you craft a CRON expression.", "example": "*/5 * * * *", @@ -4677,6 +5209,7 @@ }, "dashboard": { "format": "int32", + "nullable": true, "type": "integer" }, "database": { @@ -4693,12 +5226,14 @@ "description": "Once an alert is triggered, how long, in seconds, before Superset nags you again. (in seconds)", "example": 14400, "format": "int32", + "minimum": 1, "type": "integer" }, "log_retention": { "description": "How long to keep the logs around for this report (in days)", "example": 90, "format": "int32", + "minimum": 1, "type": "integer" }, "name": { @@ -4722,11 +5257,23 @@ }, "type": "array" }, + "report_format": { + "enum": [ + "PNG", + "CSV", + "TEXT" + ], + "type": "string" + }, "sql": { "description": "A SQL statement that defines whether the alert should get triggered or not. The query is expected to return either NULL or a number value.", "example": "SELECT value FROM time_series_table", "type": "string" }, + "timezone": { + "description": "A timezone string that represents the location of the timezone.", + "type": "string" + }, "type": { "description": "The report schedule type", "enum": [ @@ -4750,6 +5297,7 @@ "description": "If an alert is staled at a working state, how long until it's state is reseted to error", "example": 3600, "format": "int32", + "minimum": 1, "type": "integer" } }, @@ -4767,6 +5315,7 @@ }, "chart": { "format": "int32", + "nullable": true, "type": "integer" }, "context_markdown": { @@ -4774,6 +5323,10 @@ "nullable": true, "type": "string" }, + "creation_method": { + "description": "Creation method is used to inform the frontend whether the report/alert was created in the dashboard, chart, or alerts and reports UI.", + "nullable": true + }, "crontab": { "description": "A CRON expression.[Crontab Guru](https://crontab.guru/) is a helpful resource that can help you craft a CRON expression.", "maxLength": 1000, @@ -4782,6 +5335,7 @@ }, "dashboard": { "format": "int32", + "nullable": true, "type": "integer" }, "database": { @@ -4798,12 +5352,14 @@ "description": "Once an alert is triggered, how long, in seconds, before Superset nags you again. (in seconds)", "example": 14400, "format": "int32", + "minimum": 1, "type": "integer" }, "log_retention": { "description": "How long to keep the logs around for this report (in days)", "example": 90, "format": "int32", + "minimum": 1, "type": "integer" }, "name": { @@ -4826,12 +5382,24 @@ }, "type": "array" }, + "report_format": { + "enum": [ + "PNG", + "CSV", + "TEXT" + ], + "type": "string" + }, "sql": { "description": "A SQL statement that defines whether the alert should get triggered or not. The query is expected to return either NULL or a number value.", "example": "SELECT value FROM time_series_table", "nullable": true, "type": "string" }, + "timezone": { + "description": "A timezone string that represents the location of the timezone.", + "type": "string" + }, "type": { "description": "The report schedule type", "enum": [ @@ -4856,19 +5424,32 @@ "description": "If an alert is staled at a working state, how long until it's state is reseted to error", "example": 3600, "format": "int32", + "minimum": 1, "nullable": true, "type": "integer" } }, "type": "object" }, + "Roles": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, "SavedQueryRestApi.get": { "properties": { "created_by": { - "$ref": "#/components/schemas/Meta32" + "$ref": "#/components/schemas/Meta31" }, "database": { - "$ref": "#/components/schemas/Meta33" + "$ref": "#/components/schemas/Meta32" }, "description": { "nullable": true, @@ -4904,7 +5485,7 @@ "readOnly": true }, "created_by": { - "$ref": "#/components/schemas/Meta30" + "$ref": "#/components/schemas/Meta29" }, "created_on": { "format": "date-time", @@ -4912,7 +5493,7 @@ "type": "string" }, "database": { - "$ref": "#/components/schemas/Meta31" + "$ref": "#/components/schemas/Meta30" }, "db_id": { "format": "int32", @@ -4923,6 +5504,9 @@ "nullable": true, "type": "string" }, + "extra": { + "readOnly": true + }, "id": { "format": "int32", "type": "integer" @@ -5174,6 +5758,24 @@ }, "type": "object" }, + "User": { + "properties": { + "first_name": { + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "last_name": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "type": "object" + }, "ValidatorConfigJSON": { "properties": { "op": { @@ -5374,6 +5976,12 @@ "filter": { "type": "string" }, + "include_ids": { + "items": { + "type": "integer" + }, + "type": "array" + }, "page": { "type": "integer" }, @@ -5411,18 +6019,6 @@ }, "type": "object" } - }, - "securitySchemes": { - "jwt": { - "bearerFormat": "JWT", - "scheme": "bearer", - "type": "http" - }, - "jwt_refresh": { - "bearerFormat": "JWT", - "scheme": "bearer", - "type": "http" - } } }, "info": { @@ -7052,13 +7648,16 @@ "schema": { "properties": { "formData": { + "description": "upload file (ZIP)", "format": "binary", "type": "string" }, "overwrite": { - "type": "bool" + "description": "overwrite existing databases?", + "type": "boolean" }, "passwords": { + "description": "JSON map of passwords for each file", "type": "string" } }, @@ -7109,7 +7708,7 @@ }, "/chart/related/{column_name}": { "get": { - "description": "Get a list of all possible owners for a chart.", + "description": "Get a list of all possible owners for a chart. Use `owners` has the `column_name` parameter", "parameters": [ { "in": "path", @@ -7451,6 +8050,77 @@ ] } }, + "/chart/{pk}/data/": { + "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", + "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" + } + } + }, + "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" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Charts" + ] + } + }, "/chart/{pk}/screenshot/{digest}/": { "get": { "description": "Get a computed screenshot from cache.", @@ -8560,13 +9230,16 @@ "schema": { "properties": { "formData": { + "description": "upload file (ZIP or JSON)", "format": "binary", "type": "string" }, "overwrite": { - "type": "bool" + "description": "overwrite existing databases?", + "type": "boolean" }, "passwords": { + "description": "JSON map of passwords for each file", "type": "string" } }, @@ -8673,6 +9346,170 @@ ] } }, + "/dashboard/{id_or_slug}": { + "get": { + "description": "Get a dashboard detail information.", + "parameters": [ + { + "description": "Either the id of the dashboard, or its slug", + "in": "path", + "name": "id_or_slug", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/DashboardGetResponseSchema" + } + }, + "type": "object" + } + } + }, + "description": "Dashboard" + }, + "302": { + "description": "Redirects to the current digest" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Dashboards" + ] + } + }, + "/dashboard/{id_or_slug}/charts": { + "get": { + "description": "Get the chart definitions for a given dashboard", + "parameters": [ + { + "in": "path", + "name": "id_or_slug", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/ChartEntityResponseSchema" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Dashboard chart definitions" + }, + "302": { + "description": "Redirects to the current digest" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Dashboards" + ] + } + }, + "/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" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/DashboardDatasetSchema" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Dashboard dataset definitions" + }, + "302": { + "description": "Redirects to the current digest" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Dashboards" + ] + } + }, "/dashboard/{pk}": { "delete": { "description": "Deletes a Dashboard.", @@ -8727,106 +9564,6 @@ "Dashboards" ] }, - "get": { - "description": "Get a dashboard detail information.", - "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/DashboardRestApi.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": "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": [ - "Dashboards" - ] - }, "put": { "description": "Changes a Dashboard.", "parameters": [ @@ -9233,6 +9970,73 @@ ] } }, + "/database/available/": { + "get": { + "description": "Get names of databases currently available", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "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", + "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": "object" + }, + "type": "array" + } + } + }, + "description": "Database names" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Database" + ] + } + }, "/database/export/": { "get": { "description": "Download database(s) and associated dataset(s) as a zip file", @@ -9289,13 +10093,16 @@ "schema": { "properties": { "formData": { + "description": "upload file (ZIP)", "format": "binary", "type": "string" }, "overwrite": { - "type": "bool" + "description": "overwrite existing databases?", + "type": "boolean" }, "passwords": { + "description": "JSON map of passwords for each file", "type": "string" } }, @@ -9394,6 +10201,56 @@ ] } }, + "/database/validate_parameters": { + "post": { + "description": "Validates parameters used to connect to a database", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatabaseValidateParametersSchema" + } + } + }, + "description": "DB-specific parameters", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Database Test Connection" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "422": { + "$ref": "#/components/responses/422" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Database" + ] + } + }, "/database/{pk}": { "delete": { "description": "Deletes a Database.", @@ -9619,6 +10476,50 @@ ] } }, + "/database/{pk}/function_names/": { + "get": { + "description": "Get function names supported by a database", + "parameters": [ + { + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatabaseFunctionNamesResponse" + } + } + }, + "description": "Query result" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Database" + ] + } + }, "/database/{pk}/related_objects/": { "get": { "description": "Get charts and dashboards count associated to a database", @@ -10352,13 +11253,16 @@ "schema": { "properties": { "formData": { + "description": "upload file (ZIP or YAML)", "format": "binary", "type": "string" }, "overwrite": { - "type": "bool" + "description": "overwrite existing datasets?", + "type": "boolean" }, "passwords": { + "description": "JSON map of passwords for each file", "type": "string" } }, @@ -10630,11 +11534,10 @@ } }, { - "in": "path", + "in": "query", "name": "override_columns", - "required": true, "schema": { - "type": "bool" + "type": "boolean" } } ], @@ -10697,6 +11600,136 @@ ] } }, + "/dataset/{pk}/column/{column_id}": { + "delete": { + "description": "Delete a Dataset column", + "parameters": [ + { + "description": "The dataset pk for this column", + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The column id for this dataset", + "in": "path", + "name": "column_id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Column 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": [ + "Datasets" + ] + } + }, + "/dataset/{pk}/metric/{metric_id}": { + "delete": { + "description": "Delete a Dataset metric", + "parameters": [ + { + "description": "The dataset pk for this column", + "in": "path", + "name": "pk", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "description": "The metric id for this dataset", + "in": "path", + "name": "metric_id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Metric 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": [ + "Datasets" + ] + } + }, "/dataset/{pk}/refresh": { "put": { "description": "Refreshes and updates columns of a dataset", @@ -11121,47 +12154,6 @@ ] } }, - "/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/": { "get": { "description": "Get a list of queries, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.", @@ -12639,6 +13631,72 @@ ] } }, + "/saved_query/import/": { + "post": { + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "formData": { + "description": "upload file (ZIP)", + "format": "binary", + "type": "string" + }, + "overwrite": { + "description": "overwrite existing saved queries?", + "type": "boolean" + }, + "passwords": { + "description": "JSON map of passwords for each file", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Saved Query import result" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "422": { + "$ref": "#/components/responses/422" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "jwt": [] + } + ], + "tags": [ + "Queries" + ] + } + }, "/saved_query/related/{column_name}": { "get": { "parameters": [ @@ -12909,55 +13967,16 @@ ] } }, - "/security/login": { - "post": { - "description": "Authenticate and get a JWT access and refresh token", - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "password": { - "description": "The password for authentication", - "example": "complex-password", - "type": "string" - }, - "provider": { - "description": "Choose an authentication provider", - "enum": [ - "db", - "ldap" - ], - "example": "db", - "type": "string" - }, - "refresh": { - "description": "If true a refresh token is provided also", - "example": true, - "type": "boolean" - }, - "username": { - "description": "The username for authentication", - "example": "admin", - "type": "string" - } - }, - "type": "object" - } - } - }, - "required": true - }, + "/security/csrf_token/": { + "get": { + "description": "Fetch the CSRF token", "responses": { "200": { "content": { "application/json": { "schema": { "properties": { - "access_token": { - "type": "string" - }, - "refresh_token": { + "result": { "type": "string" } }, @@ -12965,42 +13984,7 @@ } } }, - "description": "Authentication Successful" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "500": { - "$ref": "#/components/responses/500" - } - }, - "tags": [ - "Security" - ] - } - }, - "/security/refresh": { - "post": { - "description": "Use the refresh token to get a new JWT access token", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "access_token": { - "description": "A new refreshed access token", - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "Refresh Successful" + "description": "Result contains the CSRF token" }, "401": { "$ref": "#/components/responses/401" @@ -13011,7 +13995,7 @@ }, "security": [ { - "jwt_refresh": [] + "jwt": [] } ], "tags": [