You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by dp...@apache.org on 2021/01/06 10:29:47 UTC
[superset] branch master updated: fix(database): OpenAPI spec for
test_connection (#12274)
This is an automated email from the ASF dual-hosted git repository.
dpgaspar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 2b6a587 fix(database): OpenAPI spec for test_connection (#12274)
2b6a587 is described below
commit 2b6a58780a8e29b8e9a054118b4776ea25ad1f6e
Author: Daniel Vaz Gaspar <da...@gmail.com>
AuthorDate: Wed Jan 6 10:29:05 2021 +0000
fix(database): OpenAPI spec for test_connection (#12274)
* fix(database): OpenAPI spec for test_connection
* updated OpenAPI spec on superset docs
* EOL
---
docs/src/resources/openapi.json | 6674 ++++++++++++++++++++++++---------------
superset/databases/api.py | 12 +-
2 files changed, 4058 insertions(+), 2628 deletions(-)
diff --git a/docs/src/resources/openapi.json b/docs/src/resources/openapi.json
index f6caec9..a86724e 100644
--- a/docs/src/resources/openapi.json
+++ b/docs/src/resources/openapi.json
@@ -1539,14 +1539,14 @@
"type": "integer"
},
"dashboards": {
- "$ref": "#/components/schemas/Meta10"
+ "$ref": "#/components/schemas/Meta9"
},
"description": {
"nullable": true,
"type": "string"
},
"owners": {
- "$ref": "#/components/schemas/Meta9"
+ "$ref": "#/components/schemas/Meta10"
},
"params": {
"nullable": true,
@@ -1573,7 +1573,7 @@
"type": "integer"
},
"changed_by": {
- "$ref": "#/components/schemas/Meta6"
+ "$ref": "#/components/schemas/Meta5"
},
"changed_by_name": {
"readOnly": true
@@ -1588,7 +1588,7 @@
"readOnly": true
},
"created_by": {
- "$ref": "#/components/schemas/Meta5"
+ "$ref": "#/components/schemas/Meta6"
},
"datasource_id": {
"format": "int32",
@@ -1621,7 +1621,7 @@
"type": "integer"
},
"owners": {
- "$ref": "#/components/schemas/Meta8"
+ "$ref": "#/components/schemas/Meta7"
},
"params": {
"nullable": true,
@@ -1633,7 +1633,7 @@
"type": "string"
},
"table": {
- "$ref": "#/components/schemas/Meta7"
+ "$ref": "#/components/schemas/Meta8"
},
"thumbnail_url": {
"readOnly": true
@@ -1885,7 +1885,7 @@
"DashboardRestApi.get": {
"properties": {
"changed_by": {
- "$ref": "#/components/schemas/Meta18"
+ "$ref": "#/components/schemas/Meta17"
},
"changed_by_name": {
"readOnly": true
@@ -1919,7 +1919,7 @@
"type": "string"
},
"owners": {
- "$ref": "#/components/schemas/Meta17"
+ "$ref": "#/components/schemas/Meta18"
},
"position_json": {
"nullable": true,
@@ -1949,7 +1949,7 @@
"DashboardRestApi.get_list": {
"properties": {
"changed_by": {
- "$ref": "#/components/schemas/Meta16"
+ "$ref": "#/components/schemas/Meta15"
},
"changed_by_name": {
"readOnly": true
@@ -1984,7 +1984,7 @@
"type": "string"
},
"owners": {
- "$ref": "#/components/schemas/Meta15"
+ "$ref": "#/components/schemas/Meta16"
},
"position_json": {
"nullable": true,
@@ -2487,6 +2487,45 @@
},
"type": "object"
},
+ "DatabaseTestConnectionSchema": {
+ "properties": {
+ "database_name": {
+ "description": "A database name to identify this connection.",
+ "maxLength": 250,
+ "minLength": 1,
+ "nullable": true,
+ "type": "string"
+ },
+ "encrypted_extra": {
+ "description": "<p>JSON string containing additional connection configuration.<br>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.</p>",
+ "nullable": true,
+ "type": "string"
+ },
+ "extra": {
+ "description": "<p>JSON string containing extra configuration elements.<br>1. The <code>engine_params</code> object gets unpacked into the <a href=\"https://docs.sqlalchemy.org/en/latest/core/engines.html#sqlalchemy.create_engine\">sqlalchemy.create_engine</a> call, while the <code>metadata_params</code> gets unpacked into the <a href=\"https://docs.sqlalchemy.org/en/rel_1_0/core/metadata.html#sqlalchemy.schema.MetaData\">sqlalchemy.MetaData</a> call.<br>2. The <code>metadata [...]
+ "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.<br/>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"
+ },
+ "server_cert": {
+ "description": "<p>Optional CA_BUNDLE contents to validate HTTPS requests. Only available on certain database engines.</p>",
+ "nullable": true,
+ "type": "string"
+ },
+ "sqlalchemy_uri": {
+ "description": "<p>Refer to the <a href=\"https://docs.sqlalchemy.org/en/rel_1_2/core/engines.html#database-urls\">SqlAlchemy docs</a> for more information on how to structure your URI.</p>",
+ "maxLength": 1024,
+ "minLength": 1,
+ "type": "string"
+ }
+ },
+ "required": [
+ "sqlalchemy_uri"
+ ],
+ "type": "object"
+ },
"DatasetColumnsPut": {
"properties": {
"column_name": {
@@ -2670,7 +2709,7 @@
"type": "integer"
},
"columns": {
- "$ref": "#/components/schemas/Meta25"
+ "$ref": "#/components/schemas/Meta23"
},
"database": {
"$ref": "#/components/schemas/Meta26"
@@ -2713,7 +2752,7 @@
"type": "string"
},
"metrics": {
- "$ref": "#/components/schemas/Meta23"
+ "$ref": "#/components/schemas/Meta25"
},
"offset": {
"format": "int32",
@@ -3034,7 +3073,7 @@
"type": "integer"
},
"user": {
- "$ref": "#/components/schemas/Meta35"
+ "$ref": "#/components/schemas/Meta44"
},
"user_id": {
"format": "int32",
@@ -3081,7 +3120,7 @@
"type": "integer"
},
"user": {
- "$ref": "#/components/schemas/Meta34"
+ "$ref": "#/components/schemas/Meta43"
},
"user_id": {
"format": "int32",
@@ -3156,16 +3195,28 @@
},
"Meta10": {
"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"
},
"Meta11": {
@@ -3350,6 +3401,18 @@
},
"Meta17": {
"properties": {
+ "username": {
+ "maxLength": 64,
+ "type": "string"
+ }
+ },
+ "required": [
+ "username"
+ ],
+ "type": "object"
+ },
+ "Meta18": {
+ "properties": {
"first_name": {
"maxLength": 64,
"type": "string"
@@ -3374,18 +3437,6 @@
],
"type": "object"
},
- "Meta18": {
- "properties": {
- "username": {
- "maxLength": 64,
- "type": "string"
- }
- },
- "required": [
- "username"
- ],
- "type": "object"
- },
"Meta19": {
"properties": {
"first_name": {
@@ -3483,13 +3534,12 @@
"nullable": true,
"type": "string"
},
- "created_on": {
- "format": "date-time",
- "nullable": true,
+ "column_name": {
+ "maxLength": 255,
"type": "string"
},
- "d3format": {
- "maxLength": 128,
+ "created_on": {
+ "format": "date-time",
"nullable": true,
"type": "string"
},
@@ -3498,21 +3548,35 @@
"type": "string"
},
"expression": {
+ "nullable": true,
"type": "string"
},
- "extra": {
+ "filterable": {
"nullable": true,
- "type": "string"
+ "type": "boolean"
+ },
+ "groupby": {
+ "nullable": true,
+ "type": "boolean"
},
"id": {
"format": "int32",
"type": "integer"
},
- "metric_name": {
+ "is_active": {
+ "nullable": true,
+ "type": "boolean"
+ },
+ "is_dttm": {
+ "nullable": true,
+ "type": "boolean"
+ },
+ "python_date_format": {
"maxLength": 255,
+ "nullable": true,
"type": "string"
},
- "metric_type": {
+ "type": {
"maxLength": 32,
"nullable": true,
"type": "string"
@@ -3526,15 +3590,10 @@
"maxLength": 1024,
"nullable": true,
"type": "string"
- },
- "warning_text": {
- "nullable": true,
- "type": "string"
}
},
"required": [
- "expression",
- "metric_name"
+ "column_name"
],
"type": "object"
},
@@ -3571,49 +3630,36 @@
"nullable": true,
"type": "string"
},
- "column_name": {
- "maxLength": 255,
- "type": "string"
- },
"created_on": {
"format": "date-time",
"nullable": true,
"type": "string"
},
- "description": {
+ "d3format": {
+ "maxLength": 128,
"nullable": true,
"type": "string"
},
- "expression": {
+ "description": {
"nullable": true,
"type": "string"
},
- "filterable": {
- "nullable": true,
- "type": "boolean"
+ "expression": {
+ "type": "string"
},
- "groupby": {
+ "extra": {
"nullable": true,
- "type": "boolean"
+ "type": "string"
},
"id": {
"format": "int32",
"type": "integer"
},
- "is_active": {
- "nullable": true,
- "type": "boolean"
- },
- "is_dttm": {
- "nullable": true,
- "type": "boolean"
- },
- "python_date_format": {
+ "metric_name": {
"maxLength": 255,
- "nullable": true,
"type": "string"
},
- "type": {
+ "metric_type": {
"maxLength": 32,
"nullable": true,
"type": "string"
@@ -3627,10 +3673,15 @@
"maxLength": 1024,
"nullable": true,
"type": "string"
+ },
+ "warning_text": {
+ "nullable": true,
+ "type": "string"
}
},
"required": [
- "column_name"
+ "expression",
+ "metric_name"
],
"type": "object"
},
@@ -3652,18 +3703,6 @@
},
"Meta27": {
"properties": {
- "database_name": {
- "maxLength": 250,
- "type": "string"
- }
- },
- "required": [
- "database_name"
- ],
- "type": "object"
- },
- "Meta28": {
- "properties": {
"first_name": {
"maxLength": 64,
"type": "string"
@@ -3688,6 +3727,18 @@
],
"type": "object"
},
+ "Meta28": {
+ "properties": {
+ "database_name": {
+ "maxLength": 250,
+ "type": "string"
+ }
+ },
+ "required": [
+ "database_name"
+ ],
+ "type": "object"
+ },
"Meta29": {
"properties": {
"id": {
@@ -3790,29 +3841,38 @@
},
"Meta34": {
"properties": {
- "username": {
- "maxLength": 64,
+ "id": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": {
+ "maxLength": 50,
"type": "string"
}
},
"required": [
- "username"
+ "type"
],
"type": "object"
},
"Meta35": {
"properties": {
- "username": {
+ "first_name": {
+ "maxLength": 64,
+ "type": "string"
+ },
+ "last_name": {
"maxLength": 64,
"type": "string"
}
},
"required": [
- "username"
+ "first_name",
+ "last_name"
],
"type": "object"
},
- "Meta4": {
+ "Meta36": {
"properties": {
"first_name": {
"maxLength": 64,
@@ -3829,7 +3889,7 @@
],
"type": "object"
},
- "Meta5": {
+ "Meta37": {
"properties": {
"first_name": {
"maxLength": 64,
@@ -3850,7 +3910,25 @@
],
"type": "object"
},
- "Meta6": {
+ "Meta38": {
+ "properties": {
+ "id": {
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "Meta39": {
+ "properties": {
+ "id": {
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "Meta4": {
"properties": {
"first_name": {
"maxLength": 64,
@@ -3867,23 +3945,27 @@
],
"type": "object"
},
- "Meta7": {
+ "Meta40": {
"properties": {
- "default_endpoint": {
+ "id": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "recipient_config_json": {
"nullable": true,
"type": "string"
},
- "table_name": {
- "maxLength": 250,
+ "type": {
+ "maxLength": 50,
"type": "string"
}
},
"required": [
- "table_name"
+ "type"
],
"type": "object"
},
- "Meta8": {
+ "Meta41": {
"properties": {
"first_name": {
"maxLength": 64,
@@ -3896,20 +3978,86 @@
"last_name": {
"maxLength": 64,
"type": "string"
- },
- "username": {
+ }
+ },
+ "required": [
+ "first_name",
+ "last_name"
+ ],
+ "type": "object"
+ },
+ "Meta42": {
+ "properties": {
+ "id": {
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "Meta43": {
+ "properties": {
+ "username": {
"maxLength": 64,
"type": "string"
}
},
"required": [
- "first_name",
- "last_name",
"username"
],
"type": "object"
},
- "Meta9": {
+ "Meta44": {
+ "properties": {
+ "username": {
+ "maxLength": 64,
+ "type": "string"
+ }
+ },
+ "required": [
+ "username"
+ ],
+ "type": "object"
+ },
+ "Meta5": {
+ "properties": {
+ "first_name": {
+ "maxLength": 64,
+ "type": "string"
+ },
+ "last_name": {
+ "maxLength": 64,
+ "type": "string"
+ }
+ },
+ "required": [
+ "first_name",
+ "last_name"
+ ],
+ "type": "object"
+ },
+ "Meta6": {
+ "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"
+ },
+ "Meta7": {
"properties": {
"first_name": {
"maxLength": 64,
@@ -3935,6 +4083,36 @@
],
"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,
+ "type": "string"
+ },
+ "id": {
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
"QueryRestApi.get": {
"properties": {
"changed_on": {
@@ -4062,7 +4240,7 @@
"type": "string"
},
"database": {
- "$ref": "#/components/schemas/Meta27"
+ "$ref": "#/components/schemas/Meta28"
},
"end_time": {
"nullable": true,
@@ -4117,7 +4295,7 @@
"type": "string"
},
"user": {
- "$ref": "#/components/schemas/Meta28"
+ "$ref": "#/components/schemas/Meta27"
}
},
"required": [
@@ -4173,15 +4351,14 @@
},
"type": "object"
},
- "SavedQueryRestApi.get": {
+ "ReportExecutionLogRestApi.get": {
"properties": {
- "created_by": {
- "$ref": "#/components/schemas/Meta32"
- },
- "database": {
- "$ref": "#/components/schemas/Meta33"
+ "end_dttm": {
+ "format": "date-time",
+ "nullable": true,
+ "type": "string"
},
- "description": {
+ "error_message": {
"nullable": true,
"type": "string"
},
@@ -4189,48 +4366,43 @@
"format": "int32",
"type": "integer"
},
- "label": {
- "maxLength": 256,
- "nullable": true,
+ "scheduled_dttm": {
+ "format": "date-time",
"type": "string"
},
- "schema": {
- "maxLength": 128,
+ "start_dttm": {
+ "format": "date-time",
"nullable": true,
"type": "string"
},
- "sql": {
- "nullable": true,
+ "state": {
+ "maxLength": 50,
"type": "string"
},
- "sql_tables": {
- "readOnly": true
+ "value": {
+ "format": "float",
+ "nullable": true,
+ "type": "number"
+ },
+ "value_row_json": {
+ "nullable": true,
+ "type": "string"
}
},
+ "required": [
+ "scheduled_dttm",
+ "state"
+ ],
"type": "object"
},
- "SavedQueryRestApi.get_list": {
+ "ReportExecutionLogRestApi.get_list": {
"properties": {
- "changed_on_delta_humanized": {
- "readOnly": true
- },
- "created_by": {
- "$ref": "#/components/schemas/Meta30"
- },
- "created_on": {
+ "end_dttm": {
"format": "date-time",
"nullable": true,
"type": "string"
},
- "database": {
- "$ref": "#/components/schemas/Meta31"
- },
- "db_id": {
- "format": "int32",
- "nullable": true,
- "type": "integer"
- },
- "description": {
+ "error_message": {
"nullable": true,
"type": "string"
},
@@ -4238,366 +4410,904 @@
"format": "int32",
"type": "integer"
},
- "label": {
- "maxLength": 256,
- "nullable": true,
+ "scheduled_dttm": {
+ "format": "date-time",
"type": "string"
},
- "last_run_delta_humanized": {
- "readOnly": true
- },
- "rows": {
- "format": "int32",
+ "start_dttm": {
+ "format": "date-time",
"nullable": true,
- "type": "integer"
+ "type": "string"
},
- "schema": {
- "maxLength": 128,
- "nullable": true,
+ "state": {
+ "maxLength": 50,
"type": "string"
},
- "sql": {
+ "value": {
+ "format": "float",
"nullable": true,
- "type": "string"
+ "type": "number"
},
- "sql_tables": {
- "readOnly": true
+ "value_row_json": {
+ "nullable": true,
+ "type": "string"
}
},
+ "required": [
+ "scheduled_dttm",
+ "state"
+ ],
"type": "object"
},
- "SavedQueryRestApi.post": {
+ "ReportExecutionLogRestApi.post": {
"properties": {
- "db_id": {
+ "id": {
"format": "int32",
- "nullable": true,
"type": "integer"
- },
- "description": {
- "nullable": true,
- "type": "string"
- },
- "label": {
- "maxLength": 256,
- "nullable": true,
- "type": "string"
- },
- "schema": {
- "maxLength": 128,
- "nullable": true,
- "type": "string"
- },
- "sql": {
- "nullable": true,
- "type": "string"
}
},
"type": "object"
},
- "SavedQueryRestApi.put": {
+ "ReportExecutionLogRestApi.put": {
"properties": {
- "db_id": {
+ "id": {
"format": "int32",
- "nullable": true,
"type": "integer"
- },
- "description": {
- "nullable": true,
- "type": "string"
- },
- "label": {
- "maxLength": 256,
- "nullable": true,
- "type": "string"
- },
- "schema": {
- "maxLength": 128,
- "nullable": true,
- "type": "string"
- },
- "sql": {
- "nullable": true,
- "type": "string"
}
},
"type": "object"
},
- "SchemasResponseSchema": {
+ "ReportRecipient": {
"properties": {
- "result": {
- "items": {
- "description": "A database schema name",
- "type": "string"
- },
- "type": "array"
+ "recipient_config_json": {
+ "$ref": "#/components/schemas/ReportRecipientConfigJSON"
+ },
+ "type": {
+ "description": "The recipient type, check spec for valid options",
+ "enum": [
+ "Email",
+ "Slack"
+ ],
+ "type": "string"
}
},
+ "required": [
+ "type"
+ ],
"type": "object"
},
- "SelectStarResponseSchema": {
+ "ReportRecipientConfigJSON": {
"properties": {
- "result": {
- "description": "SQL select star",
+ "target": {
"type": "string"
}
},
"type": "object"
},
- "TableMetadataColumnsResponse": {
+ "ReportScheduleRestApi.get": {
"properties": {
- "duplicates_constraint": {
+ "active": {
+ "nullable": true,
+ "type": "boolean"
+ },
+ "chart": {
+ "$ref": "#/components/schemas/Meta39"
+ },
+ "context_markdown": {
+ "nullable": true,
"type": "string"
},
- "keys": {
- "description": "",
- "items": {
- "type": "string"
- },
- "type": "array"
+ "crontab": {
+ "maxLength": 1000,
+ "type": "string"
},
- "longType": {
- "description": "The actual backend long type for the column",
+ "dashboard": {
+ "$ref": "#/components/schemas/Meta38"
+ },
+ "database": {
+ "$ref": "#/components/schemas/Meta42"
+ },
+ "description": {
+ "nullable": true,
+ "type": "string"
+ },
+ "grace_period": {
+ "format": "int32",
+ "nullable": true,
+ "type": "integer"
+ },
+ "id": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "last_eval_dttm": {
+ "format": "date-time",
+ "nullable": true,
+ "type": "string"
+ },
+ "last_state": {
+ "maxLength": 50,
+ "nullable": true,
+ "type": "string"
+ },
+ "last_value": {
+ "format": "float",
+ "nullable": true,
+ "type": "number"
+ },
+ "last_value_row_json": {
+ "nullable": true,
"type": "string"
},
+ "log_retention": {
+ "format": "int32",
+ "nullable": true,
+ "type": "integer"
+ },
"name": {
- "description": "The column name",
+ "maxLength": 150,
+ "type": "string"
+ },
+ "owners": {
+ "$ref": "#/components/schemas/Meta41"
+ },
+ "recipients": {
+ "$ref": "#/components/schemas/Meta40"
+ },
+ "sql": {
+ "nullable": true,
"type": "string"
},
"type": {
- "description": "The column type",
+ "maxLength": 50,
+ "type": "string"
+ },
+ "validator_config_json": {
+ "nullable": true,
+ "type": "string"
+ },
+ "validator_type": {
+ "maxLength": 100,
+ "nullable": true,
"type": "string"
+ },
+ "working_timeout": {
+ "format": "int32",
+ "nullable": true,
+ "type": "integer"
}
},
+ "required": [
+ "crontab",
+ "name",
+ "recipients",
+ "type"
+ ],
"type": "object"
},
- "TableMetadataForeignKeysIndexesResponse": {
+ "ReportScheduleRestApi.get_list": {
"properties": {
- "column_names": {
- "items": {
- "description": "A list of column names that compose the foreign key or index",
- "type": "string"
- },
- "type": "array"
+ "active": {
+ "nullable": true,
+ "type": "boolean"
},
- "name": {
- "description": "The name of the foreign key or index",
+ "changed_by": {
+ "$ref": "#/components/schemas/Meta36"
+ },
+ "changed_on": {
+ "format": "date-time",
+ "nullable": true,
"type": "string"
},
- "options": {
- "$ref": "#/components/schemas/TableMetadataOptionsResponse"
+ "changed_on_delta_humanized": {
+ "readOnly": true
},
- "referred_columns": {
- "items": {
- "type": "string"
- },
- "type": "array"
+ "created_by": {
+ "$ref": "#/components/schemas/Meta35"
},
- "referred_schema": {
+ "created_on": {
+ "format": "date-time",
+ "nullable": true,
"type": "string"
},
- "referred_table": {
+ "crontab": {
+ "maxLength": 1000,
+ "type": "string"
+ },
+ "crontab_humanized": {
+ "readOnly": true
+ },
+ "id": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "last_eval_dttm": {
+ "format": "date-time",
+ "nullable": true,
"type": "string"
},
+ "last_state": {
+ "maxLength": 50,
+ "nullable": true,
+ "type": "string"
+ },
+ "name": {
+ "maxLength": 150,
+ "type": "string"
+ },
+ "owners": {
+ "$ref": "#/components/schemas/Meta37"
+ },
+ "recipients": {
+ "$ref": "#/components/schemas/Meta34"
+ },
"type": {
+ "maxLength": 50,
"type": "string"
}
},
+ "required": [
+ "crontab",
+ "name",
+ "recipients",
+ "type"
+ ],
"type": "object"
},
- "TableMetadataOptionsResponse": {
+ "ReportScheduleRestApi.post": {
"properties": {
- "deferrable": {
+ "active": {
"type": "boolean"
},
- "initially": {
- "type": "boolean"
+ "chart": {
+ "format": "int32",
+ "type": "integer"
},
- "match": {
- "type": "boolean"
+ "context_markdown": {
+ "description": "Markdown description",
+ "nullable": true,
+ "type": "string"
},
- "ondelete": {
- "type": "boolean"
+ "crontab": {
+ "description": "A CRON expression.[Crontab Guru](https://crontab.guru/) is a helpful resource that can help you craft a CRON expression.",
+ "example": "*/5 * * * *",
+ "maxLength": 1000,
+ "minLength": 1,
+ "type": "string"
},
- "onupdate": {
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "TableMetadataPrimaryKeyResponse": {
- "properties": {
- "column_names": {
+ "dashboard": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "database": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "description": {
+ "description": "Use a nice description to give context to this Alert/Report",
+ "example": "Daily sales dashboard to marketing",
+ "nullable": true,
+ "type": "string"
+ },
+ "grace_period": {
+ "description": "Once an alert is triggered, how long, in seconds, before Superset nags you again. (in seconds)",
+ "example": 14400,
+ "format": "int32",
+ "type": "integer"
+ },
+ "log_retention": {
+ "description": "How long to keep the logs around for this report (in days)",
+ "example": 90,
+ "format": "int32",
+ "type": "integer"
+ },
+ "name": {
+ "description": "The report schedule name.",
+ "example": "Daily dashboard email",
+ "maxLength": 150,
+ "minLength": 1,
+ "type": "string"
+ },
+ "owners": {
"items": {
- "description": "A list of column names that compose the primary key",
- "type": "string"
+ "description": "Owner are users ids allowed to delete or change this report. If left empty you will be one of the owners of the report.",
+ "format": "int32",
+ "type": "integer"
},
"type": "array"
},
- "name": {
- "description": "The primary key index name",
+ "recipients": {
+ "items": {
+ "$ref": "#/components/schemas/ReportRecipient"
+ },
+ "type": "array"
+ },
+ "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"
},
"type": {
+ "description": "The report schedule type",
+ "enum": [
+ "Alert",
+ "Report"
+ ],
+ "type": "string"
+ },
+ "validator_config_json": {
+ "$ref": "#/components/schemas/ValidatorConfigJSON"
+ },
+ "validator_type": {
+ "description": "Determines when to trigger alert based off value from alert query. Alerts will be triggered with these validator types:\n- Not Null - When the return value is Not NULL, Empty, or 0\n- Operator - When `sql_return_value comparison_operator threshold` is True e.g. `50 <= 75`<br>Supports the comparison operators <, <=, >, >=, ==, and !=",
+ "enum": [
+ "not null",
+ "operator"
+ ],
"type": "string"
+ },
+ "working_timeout": {
+ "description": "If an alert is staled at a working state, how long until it's state is reseted to error",
+ "example": 3600,
+ "format": "int32",
+ "type": "integer"
}
},
+ "required": [
+ "crontab",
+ "name",
+ "type"
+ ],
"type": "object"
},
- "TableMetadataResponseSchema": {
+ "ReportScheduleRestApi.put": {
"properties": {
- "columns": {
- "description": "A list of columns and their metadata",
- "items": {
- "$ref": "#/components/schemas/TableMetadataColumnsResponse"
- },
- "type": "array"
+ "active": {
+ "type": "boolean"
},
- "foreignKeys": {
- "description": "A list of foreign keys and their metadata",
+ "chart": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "context_markdown": {
+ "description": "Markdown description",
+ "nullable": true,
+ "type": "string"
+ },
+ "crontab": {
+ "description": "A CRON expression.[Crontab Guru](https://crontab.guru/) is a helpful resource that can help you craft a CRON expression.",
+ "maxLength": 1000,
+ "minLength": 1,
+ "type": "string"
+ },
+ "dashboard": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "database": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "description": {
+ "description": "Use a nice description to give context to this Alert/Report",
+ "example": "Daily sales dashboard to marketing",
+ "nullable": true,
+ "type": "string"
+ },
+ "grace_period": {
+ "description": "Once an alert is triggered, how long, in seconds, before Superset nags you again. (in seconds)",
+ "example": 14400,
+ "format": "int32",
+ "type": "integer"
+ },
+ "log_retention": {
+ "description": "How long to keep the logs around for this report (in days)",
+ "example": 90,
+ "format": "int32",
+ "type": "integer"
+ },
+ "name": {
+ "description": "The report schedule name.",
+ "maxLength": 150,
+ "minLength": 1,
+ "type": "string"
+ },
+ "owners": {
"items": {
- "$ref": "#/components/schemas/TableMetadataForeignKeysIndexesResponse"
+ "description": "Owner are users ids allowed to delete or change this report. If left empty you will be one of the owners of the report.",
+ "format": "int32",
+ "type": "integer"
},
"type": "array"
},
- "indexes": {
- "description": "A list of indexes and their metadata",
+ "recipients": {
"items": {
- "$ref": "#/components/schemas/TableMetadataForeignKeysIndexesResponse"
+ "$ref": "#/components/schemas/ReportRecipient"
},
"type": "array"
},
- "name": {
- "description": "The name of the table",
+ "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"
},
- "primaryKey": {
- "allOf": [
- {
- "$ref": "#/components/schemas/TableMetadataPrimaryKeyResponse"
- }
+ "type": {
+ "description": "The report schedule type",
+ "enum": [
+ "Alert",
+ "Report"
],
- "description": "Primary keys metadata"
+ "type": "string"
},
- "selectStar": {
- "description": "SQL select star",
+ "validator_config_json": {
+ "$ref": "#/components/schemas/ValidatorConfigJSON"
+ },
+ "validator_type": {
+ "description": "Determines when to trigger alert based off value from alert query. Alerts will be triggered with these validator types:\n- Not Null - When the return value is Not NULL, Empty, or 0\n- Operator - When `sql_return_value comparison_operator threshold` is True e.g. `50 <= 75`<br>Supports the comparison operators <, <=, >, >=, ==, and !=",
+ "enum": [
+ "not null",
+ "operator"
+ ],
+ "nullable": true,
"type": "string"
+ },
+ "working_timeout": {
+ "description": "If an alert is staled at a working state, how long until it's state is reseted to error",
+ "example": 3600,
+ "format": "int32",
+ "nullable": true,
+ "type": "integer"
}
},
"type": "object"
},
- "database_schemas_query_schema": {
+ "SavedQueryRestApi.get": {
"properties": {
- "force": {
- "type": "boolean"
+ "created_by": {
+ "$ref": "#/components/schemas/Meta32"
+ },
+ "database": {
+ "$ref": "#/components/schemas/Meta33"
+ },
+ "description": {
+ "nullable": true,
+ "type": "string"
+ },
+ "id": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "label": {
+ "maxLength": 256,
+ "nullable": true,
+ "type": "string"
+ },
+ "schema": {
+ "maxLength": 128,
+ "nullable": true,
+ "type": "string"
+ },
+ "sql": {
+ "nullable": true,
+ "type": "string"
+ },
+ "sql_tables": {
+ "readOnly": true
}
},
"type": "object"
},
- "get_delete_ids_schema": {
- "items": {
- "type": "integer"
- },
- "type": "array"
- },
- "get_export_ids_schema": {
- "items": {
- "type": "integer"
+ "SavedQueryRestApi.get_list": {
+ "properties": {
+ "changed_on_delta_humanized": {
+ "readOnly": true
+ },
+ "created_by": {
+ "$ref": "#/components/schemas/Meta30"
+ },
+ "created_on": {
+ "format": "date-time",
+ "nullable": true,
+ "type": "string"
+ },
+ "database": {
+ "$ref": "#/components/schemas/Meta31"
+ },
+ "db_id": {
+ "format": "int32",
+ "nullable": true,
+ "type": "integer"
+ },
+ "description": {
+ "nullable": true,
+ "type": "string"
+ },
+ "id": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "label": {
+ "maxLength": 256,
+ "nullable": true,
+ "type": "string"
+ },
+ "last_run_delta_humanized": {
+ "readOnly": true
+ },
+ "rows": {
+ "format": "int32",
+ "nullable": true,
+ "type": "integer"
+ },
+ "schema": {
+ "maxLength": 128,
+ "nullable": true,
+ "type": "string"
+ },
+ "sql": {
+ "nullable": true,
+ "type": "string"
+ },
+ "sql_tables": {
+ "readOnly": true
+ }
},
- "type": "array"
+ "type": "object"
},
- "get_fav_star_ids_schema": {
- "items": {
- "type": "integer"
+ "SavedQueryRestApi.post": {
+ "properties": {
+ "db_id": {
+ "format": "int32",
+ "nullable": true,
+ "type": "integer"
+ },
+ "description": {
+ "nullable": true,
+ "type": "string"
+ },
+ "label": {
+ "maxLength": 256,
+ "nullable": true,
+ "type": "string"
+ },
+ "schema": {
+ "maxLength": 128,
+ "nullable": true,
+ "type": "string"
+ },
+ "sql": {
+ "nullable": true,
+ "type": "string"
+ }
},
- "type": "array"
+ "type": "object"
},
- "get_info_schema": {
+ "SavedQueryRestApi.put": {
"properties": {
- "add_columns": {
- "additionalProperties": {
- "properties": {
- "page": {
- "type": "integer"
- },
- "page_size": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "type": "object"
+ "db_id": {
+ "format": "int32",
+ "nullable": true,
+ "type": "integer"
},
- "edit_columns": {
- "additionalProperties": {
- "properties": {
- "page": {
- "type": "integer"
- },
- "page_size": {
- "type": "integer"
- }
- },
- "type": "object"
- },
- "type": "object"
+ "description": {
+ "nullable": true,
+ "type": "string"
},
- "keys": {
- "items": {
- "enum": [
- "add_columns",
- "edit_columns",
- "filters",
- "permissions",
- "add_title",
- "edit_title",
- "none"
- ],
- "type": "string"
- },
- "type": "array"
+ "label": {
+ "maxLength": 256,
+ "nullable": true,
+ "type": "string"
+ },
+ "schema": {
+ "maxLength": 128,
+ "nullable": true,
+ "type": "string"
+ },
+ "sql": {
+ "nullable": true,
+ "type": "string"
}
},
"type": "object"
},
- "get_item_schema": {
+ "SchemasResponseSchema": {
"properties": {
- "columns": {
+ "result": {
"items": {
+ "description": "A database schema name",
"type": "string"
},
"type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "SelectStarResponseSchema": {
+ "properties": {
+ "result": {
+ "description": "SQL select star",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "TableMetadataColumnsResponse": {
+ "properties": {
+ "duplicates_constraint": {
+ "type": "string"
},
"keys": {
+ "description": "",
"items": {
- "enum": [
- "show_columns",
- "description_columns",
- "label_columns",
- "show_title",
- "none"
- ],
"type": "string"
},
"type": "array"
+ },
+ "longType": {
+ "description": "The actual backend long type for the column",
+ "type": "string"
+ },
+ "name": {
+ "description": "The column name",
+ "type": "string"
+ },
+ "type": {
+ "description": "The column type",
+ "type": "string"
}
},
"type": "object"
},
- "get_list_schema": {
+ "TableMetadataForeignKeysIndexesResponse": {
"properties": {
- "columns": {
+ "column_names": {
"items": {
+ "description": "A list of column names that compose the foreign key or index",
"type": "string"
},
"type": "array"
},
- "filters": {
+ "name": {
+ "description": "The name of the foreign key or index",
+ "type": "string"
+ },
+ "options": {
+ "$ref": "#/components/schemas/TableMetadataOptionsResponse"
+ },
+ "referred_columns": {
"items": {
- "properties": {
- "col": {
- "type": "string"
- },
- "opr": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "referred_schema": {
+ "type": "string"
+ },
+ "referred_table": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "TableMetadataOptionsResponse": {
+ "properties": {
+ "deferrable": {
+ "type": "boolean"
+ },
+ "initially": {
+ "type": "boolean"
+ },
+ "match": {
+ "type": "boolean"
+ },
+ "ondelete": {
+ "type": "boolean"
+ },
+ "onupdate": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "TableMetadataPrimaryKeyResponse": {
+ "properties": {
+ "column_names": {
+ "items": {
+ "description": "A list of column names that compose the primary key",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "The primary key index name",
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "TableMetadataResponseSchema": {
+ "properties": {
+ "columns": {
+ "description": "A list of columns and their metadata",
+ "items": {
+ "$ref": "#/components/schemas/TableMetadataColumnsResponse"
+ },
+ "type": "array"
+ },
+ "foreignKeys": {
+ "description": "A list of foreign keys and their metadata",
+ "items": {
+ "$ref": "#/components/schemas/TableMetadataForeignKeysIndexesResponse"
+ },
+ "type": "array"
+ },
+ "indexes": {
+ "description": "A list of indexes and their metadata",
+ "items": {
+ "$ref": "#/components/schemas/TableMetadataForeignKeysIndexesResponse"
+ },
+ "type": "array"
+ },
+ "name": {
+ "description": "The name of the table",
+ "type": "string"
+ },
+ "primaryKey": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/TableMetadataPrimaryKeyResponse"
+ }
+ ],
+ "description": "Primary keys metadata"
+ },
+ "selectStar": {
+ "description": "SQL select star",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "ValidatorConfigJSON": {
+ "properties": {
+ "op": {
+ "description": "The operation to compare with a threshold to apply to the SQL output\n",
+ "enum": [
+ "<",
+ "<=",
+ ">",
+ ">=",
+ "==",
+ "!="
+ ],
+ "type": "string"
+ },
+ "threshold": {
+ "format": "int32",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "database_schemas_query_schema": {
+ "properties": {
+ "force": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ },
+ "get_delete_ids_schema": {
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "get_export_ids_schema": {
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "get_fav_star_ids_schema": {
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "get_info_schema": {
+ "properties": {
+ "add_columns": {
+ "additionalProperties": {
+ "properties": {
+ "page": {
+ "type": "integer"
+ },
+ "page_size": {
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "object"
+ },
+ "edit_columns": {
+ "additionalProperties": {
+ "properties": {
+ "page": {
+ "type": "integer"
+ },
+ "page_size": {
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "object"
+ },
+ "keys": {
+ "items": {
+ "enum": [
+ "add_columns",
+ "edit_columns",
+ "filters",
+ "permissions",
+ "add_title",
+ "edit_title",
+ "none"
+ ],
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "get_item_schema": {
+ "properties": {
+ "columns": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "keys": {
+ "items": {
+ "enum": [
+ "show_columns",
+ "description_columns",
+ "label_columns",
+ "show_title",
+ "none"
+ ],
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "get_list_schema": {
+ "properties": {
+ "columns": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "filters": {
+ "items": {
+ "properties": {
+ "col": {
+ "type": "string"
+ },
+ "opr": {
"type": "string"
},
"value": {
@@ -4638,93 +5348,1194 @@
],
"type": "string"
},
- "type": "array"
- },
- "order_column": {
- "type": "string"
- },
- "order_direction": {
- "enum": [
- "asc",
- "desc"
- ],
- "type": "string"
+ "type": "array"
+ },
+ "order_column": {
+ "type": "string"
+ },
+ "order_direction": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ },
+ "page": {
+ "type": "integer"
+ },
+ "page_size": {
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "get_related_schema": {
+ "properties": {
+ "filter": {
+ "type": "string"
+ },
+ "page": {
+ "type": "integer"
+ },
+ "page_size": {
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "screenshot_query_schema": {
+ "properties": {
+ "force": {
+ "type": "boolean"
+ },
+ "thumb_size": {
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "window_size": {
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "thumbnail_query_schema": {
+ "properties": {
+ "force": {
+ "type": "boolean"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "securitySchemes": {
+ "jwt": {
+ "bearerFormat": "JWT",
+ "scheme": "bearer",
+ "type": "http"
+ },
+ "jwt_refresh": {
+ "bearerFormat": "JWT",
+ "scheme": "bearer",
+ "type": "http"
+ }
+ }
+ },
+ "info": {
+ "description": "Superset",
+ "title": "Superset",
+ "version": "v1"
+ },
+ "openapi": "3.0.2",
+ "paths": {
+ "/annotation_layer/": {
+ "delete": {
+ "description": "Deletes multiple annotation layers in a bulk operation.",
+ "parameters": [
+ {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_delete_ids_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "CSS templates bulk delete"
+ },
+ "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"
+ ]
+ },
+ "get": {
+ "description": "Get a list of Annotation layers, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.",
+ "parameters": [
+ {
+ "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/AnnotationLayerRestApi.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": [
+ {
+ "jwt": []
+ }
+ ],
+ "tags": [
+ "Annotation Layers"
+ ]
+ },
+ "post": {
+ "description": "Create an Annotation layer",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AnnotationLayerRestApi.post"
+ }
+ }
+ },
+ "description": "Annotation Layer schema",
+ "required": true
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "result": {
+ "$ref": "#/components/schemas/AnnotationLayerRestApi.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"
+ ]
+ }
+ },
+ "/annotation_layer/_info": {
+ "get": {
+ "description": "Get metadata information about this API resource",
+ "parameters": [
+ {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_info_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
+ }
+ ],
+ "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"
+ },
+ "permissions": {
+ "description": "The user permissions for this API resource",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "Item from Model"
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
+ },
+ "401": {
+ "$ref": "#/components/responses/401"
+ },
+ "422": {
+ "$ref": "#/components/responses/422"
+ },
+ "500": {
+ "$ref": "#/components/responses/500"
+ }
+ },
+ "security": [
+ {
+ "jwt": []
+ }
+ ],
+ "tags": [
+ "Annotation Layers"
+ ]
+ }
+ },
+ "/annotation_layer/related/{column_name}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "column_name",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_related_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RelatedResponseSchema"
+ }
+ }
+ },
+ "description": "Related column data"
+ },
+ "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"
+ ]
+ }
+ },
+ "/annotation_layer/{pk}": {
+ "delete": {
+ "description": "Delete Annotation layer",
+ "parameters": [
+ {
+ "description": "The annotation layer pk for this annotation",
+ "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"
+ },
+ "500": {
+ "$ref": "#/components/responses/500"
+ }
+ },
+ "security": [
+ {
+ "jwt": []
+ }
+ ],
+ "tags": [
+ "Annotation Layers"
+ ]
+ },
+ "get": {
+ "description": "Get an Annotation layer",
+ "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/AnnotationLayerRestApi.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": [
+ "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"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AnnotationLayerRestApi.put"
+ }
+ }
+ },
+ "description": "Annotation schema",
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "result": {
+ "$ref": "#/components/schemas/AnnotationLayerRestApi.put"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "Annotation changed"
+ },
+ "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"
+ ]
+ }
+ },
+ "/annotation_layer/{pk}/annotation/": {
+ "delete": {
+ "description": "Deletes multiple annotation in a bulk operation.",
+ "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_delete_ids_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "Annotations bulk delete"
+ },
+ "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"
+ ]
+ },
+ "get": {
+ "description": "Get a list of Annotation layers, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.",
+ "parameters": [
+ {
+ "description": "The annotation layer id 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"
+ },
+ "ids": {
+ "description": "A list of annotation ids",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "result": {
+ "description": "The result from the get list query",
+ "items": {
+ "$ref": "#/components/schemas/AnnotationRestApi.get_list"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "Items from Annotations"
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
+ },
+ "401": {
+ "$ref": "#/components/responses/401"
+ },
+ "422": {
+ "$ref": "#/components/responses/422"
+ },
+ "500": {
+ "$ref": "#/components/responses/500"
+ }
+ },
+ "security": [
+ {
+ "jwt": []
+ }
+ ],
+ "tags": [
+ "Annotation Layers"
+ ]
+ },
+ "post": {
+ "description": "Create an Annotation layer",
+ "parameters": [
+ {
+ "description": "The annotation layer pk for this annotation",
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$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"
+ ]
+ }
+ },
+ "/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"
+ }
+ }
+ },
+ "description": "Annotation schema",
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "result": {
+ "$ref": "#/components/schemas/AnnotationRestApi.put"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "description": "Annotation changed"
+ },
+ "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"
+ ]
+ }
+ },
+ "/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": "Last ID received by the client",
+ "in": "query",
+ "name": "last_id",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "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": "Async event results"
},
- "page": {
- "type": "integer"
+ "401": {
+ "$ref": "#/components/responses/401"
},
- "page_size": {
- "type": "integer"
+ "500": {
+ "$ref": "#/components/responses/500"
}
},
- "type": "object"
- },
- "get_related_schema": {
- "properties": {
- "filter": {
- "type": "string"
- },
- "page": {
- "type": "integer"
- },
- "page_size": {
- "type": "integer"
+ "security": [
+ {
+ "jwt": []
}
+ ],
+ "tags": [
+ "AsyncEventsRestApi"
+ ]
+ }
+ },
+ "/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": "A list of datasources uuid or the tuples of database and datasource names",
+ "required": true
},
- "type": "object"
- },
- "screenshot_query_schema": {
- "properties": {
- "force": {
- "type": "boolean"
+ "responses": {
+ "201": {
+ "description": "cache was successfully invalidated"
},
- "thumb_size": {
- "items": {
- "type": "integer"
- },
- "type": "array"
+ "400": {
+ "$ref": "#/components/responses/400"
},
- "window_size": {
- "items": {
- "type": "integer"
- },
- "type": "array"
+ "500": {
+ "$ref": "#/components/responses/500"
}
},
- "type": "object"
- },
- "thumbnail_query_schema": {
- "properties": {
- "force": {
- "type": "boolean"
+ "security": [
+ {
+ "jwt": []
}
- },
- "type": "object"
+ ],
+ "tags": [
+ "CacheRestApi"
+ ]
}
},
- "securitySchemes": {
- "jwt": {
- "bearerFormat": "JWT",
- "scheme": "bearer",
- "type": "http"
- },
- "jwt_refresh": {
- "bearerFormat": "JWT",
- "scheme": "bearer",
- "type": "http"
- }
- }
- },
- "info": {
- "description": "Superset",
- "title": "Superset",
- "version": "v1"
- },
- "openapi": "3.0.2",
- "paths": {
- "/annotation_layer/": {
+ "/chart/": {
"delete": {
- "description": "Deletes multiple annotation layers in a bulk operation.",
+ "description": "Deletes multiple Charts in a bulk operation.",
"parameters": [
{
"content": {
@@ -4752,11 +6563,14 @@
}
}
},
- "description": "CSS templates bulk delete"
+ "description": "Charts bulk delete"
},
"401": {
"$ref": "#/components/responses/401"
},
+ "403": {
+ "$ref": "#/components/responses/403"
+ },
"404": {
"$ref": "#/components/responses/404"
},
@@ -4773,11 +6587,11 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
},
"get": {
- "description": "Get a list of Annotation layers, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.",
+ "description": "Get a list of charts, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.",
"parameters": [
{
"content": {
@@ -4850,7 +6664,7 @@
"result": {
"description": "The result from the get list query",
"items": {
- "$ref": "#/components/schemas/AnnotationLayerRestApi.get_list"
+ "$ref": "#/components/schemas/ChartRestApi.get_list"
},
"type": "array"
}
@@ -4880,20 +6694,20 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
},
"post": {
- "description": "Create an Annotation layer",
+ "description": "Create a new Chart.",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AnnotationLayerRestApi.post"
+ "$ref": "#/components/schemas/ChartRestApi.post"
}
}
},
- "description": "Annotation Layer schema",
+ "description": "Chart schema",
"required": true
},
"responses": {
@@ -4906,14 +6720,14 @@
"type": "number"
},
"result": {
- "$ref": "#/components/schemas/AnnotationLayerRestApi.post"
+ "$ref": "#/components/schemas/ChartRestApi.post"
}
},
"type": "object"
}
}
},
- "description": "Annotation added"
+ "description": "Chart added"
},
"400": {
"$ref": "#/components/responses/400"
@@ -4921,8 +6735,8 @@
"401": {
"$ref": "#/components/responses/401"
},
- "404": {
- "$ref": "#/components/responses/404"
+ "422": {
+ "$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
@@ -4934,13 +6748,13 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
}
},
- "/annotation_layer/_info": {
+ "/chart/_info": {
"get": {
- "description": "Get metadata information about this API resource",
+ "description": "Several metadata information about chart API endpoints.",
"parameters": [
{
"content": {
@@ -5020,102 +6834,50 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
}
},
- "/annotation_layer/related/{column_name}": {
- "get": {
- "parameters": [
- {
- "in": "path",
- "name": "column_name",
- "required": true,
- "schema": {
- "type": "string"
+ "/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"
+ }
}
},
- {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_related_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
- }
- ],
+ "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/RelatedResponseSchema"
+ "$ref": "#/components/schemas/ChartDataResponseSchema"
}
}
},
- "description": "Related column data"
- },
- "400": {
- "$ref": "#/components/responses/400"
- },
- "401": {
- "$ref": "#/components/responses/401"
- },
- "404": {
- "$ref": "#/components/responses/404"
+ "description": "Query result"
},
- "500": {
- "$ref": "#/components/responses/500"
- }
- },
- "security": [
- {
- "jwt": []
- }
- ],
- "tags": [
- "Annotation Layers"
- ]
- }
- },
- "/annotation_layer/{pk}": {
- "delete": {
- "description": "Delete Annotation layer",
- "parameters": [
- {
- "description": "The annotation layer pk for this annotation",
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
+ "202": {
"content": {
"application/json": {
"schema": {
- "properties": {
- "message": {
- "type": "string"
- }
- },
- "type": "object"
+ "$ref": "#/components/schemas/ChartDataAsyncResponseSchema"
}
}
},
- "description": "Item deleted"
+ "description": "Async job details"
},
- "404": {
- "$ref": "#/components/responses/404"
+ "400": {
+ "$ref": "#/components/responses/400"
},
- "422": {
- "$ref": "#/components/responses/422"
+ "401": {
+ "$ref": "#/components/responses/401"
},
"500": {
"$ref": "#/components/responses/500"
@@ -5127,30 +6889,21 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
- },
+ }
+ },
+ "/chart/data/{cache_key}": {
"get": {
- "description": "Get an Annotation layer",
+ "description": "Takes a query context cache key and returns payload data response for the given query.",
"parameters": [
{
"in": "path",
- "name": "pk",
+ "name": "cache_key",
"required": true,
"schema": {
- "type": "integer"
+ "type": "string"
}
- },
- {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_item_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
}
],
"responses": {
@@ -5158,52 +6911,11 @@
"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/AnnotationLayerRestApi.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/ChartDataResponseSchema"
}
}
},
- "description": "Item from Model"
+ "description": "Query result"
},
"400": {
"$ref": "#/components/responses/400"
@@ -5227,51 +6939,37 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
- },
- "put": {
- "description": "Update an Annotation layer",
+ }
+ },
+ "/chart/export/": {
+ "get": {
+ "description": "Exports multiple charts and downloads them as YAML files",
"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_export_ids_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
}
],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/AnnotationLayerRestApi.put"
- }
- }
- },
- "description": "Annotation schema",
- "required": true
- },
"responses": {
"200": {
"content": {
- "application/json": {
+ "application/zip": {
"schema": {
- "properties": {
- "id": {
- "type": "number"
- },
- "result": {
- "$ref": "#/components/schemas/AnnotationLayerRestApi.put"
- }
- },
- "type": "object"
+ "format": "binary",
+ "type": "string"
}
}
},
- "description": "Annotation changed"
+ "description": "A zip file with chart(s), dataset(s) and database(s) as YAML"
},
"400": {
"$ref": "#/components/responses/400"
@@ -5292,28 +6990,19 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
}
},
- "/annotation_layer/{pk}/annotation/": {
- "delete": {
- "description": "Deletes multiple annotation in a bulk operation.",
+ "/chart/favorite_status/": {
+ "get": {
+ "description": "Check favorited dashboards for current user",
"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_delete_ids_schema"
+ "$ref": "#/components/schemas/get_fav_star_ids_schema"
}
}
},
@@ -5326,16 +7015,14 @@
"content": {
"application/json": {
"schema": {
- "properties": {
- "message": {
- "type": "string"
- }
- },
- "type": "object"
+ "$ref": "#/components/schemas/GetFavStarIdsSchema"
}
}
},
- "description": "Annotations bulk delete"
+ "description": "None"
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
@@ -5343,9 +7030,6 @@
"404": {
"$ref": "#/components/responses/404"
},
- "422": {
- "$ref": "#/components/responses/422"
- },
"500": {
"$ref": "#/components/responses/500"
}
@@ -5356,63 +7040,49 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
- },
- "get": {
- "description": "Get a list of Annotation layers, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.",
- "parameters": [
- {
- "description": "The annotation layer id for this annotation",
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
+ }
+ },
+ "/chart/import/": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "multipart/form-data": {
+ "schema": {
+ "properties": {
+ "formData": {
+ "format": "binary",
+ "type": "string"
+ },
+ "overwrite": {
+ "type": "bool"
+ },
+ "passwords": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
}
},
- {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_list_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
- }
- ],
+ "required": true
+ },
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
- "count": {
- "description": "The total record count on the backend",
- "type": "number"
- },
- "ids": {
- "description": "A list of annotation ids",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "result": {
- "description": "The result from the get list query",
- "items": {
- "$ref": "#/components/schemas/AnnotationRestApi.get_list"
- },
- "type": "array"
+ "message": {
+ "type": "string"
}
},
"type": "object"
}
}
},
- "description": "Items from Annotations"
+ "description": "Chart import result"
},
"400": {
"$ref": "#/components/responses/400"
@@ -5433,51 +7103,44 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
- },
- "post": {
- "description": "Create an Annotation layer",
+ }
+ },
+ "/chart/related/{column_name}": {
+ "get": {
+ "description": "Get a list of all possible owners for a chart.",
"parameters": [
- {
- "description": "The annotation layer pk for this annotation",
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/AnnotationRestApi.post"
- }
+ {
+ "in": "path",
+ "name": "column_name",
+ "required": true,
+ "schema": {
+ "type": "string"
}
},
- "description": "Annotation schema",
- "required": true
- },
+ {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_related_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
+ }
+ ],
"responses": {
- "201": {
+ "200": {
"content": {
"application/json": {
"schema": {
- "properties": {
- "id": {
- "type": "number"
- },
- "result": {
- "$ref": "#/components/schemas/AnnotationRestApi.post"
- }
- },
- "type": "object"
+ "$ref": "#/components/schemas/RelatedResponseSchema"
}
}
},
- "description": "Annotation added"
+ "description": "Related column data"
},
"400": {
"$ref": "#/components/responses/400"
@@ -5498,31 +7161,21 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
}
},
- "/annotation_layer/{pk}/annotation/{annotation_id}": {
+ "/chart/{pk}": {
"delete": {
- "description": "Delete Annotation layer",
+ "description": "Deletes a Chart.",
"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": {
@@ -5539,7 +7192,13 @@
}
}
},
- "description": "Item deleted"
+ "description": "Chart delete"
+ },
+ "401": {
+ "$ref": "#/components/responses/401"
+ },
+ "403": {
+ "$ref": "#/components/responses/403"
},
"404": {
"$ref": "#/components/responses/404"
@@ -5557,14 +7216,13 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
},
"get": {
- "description": "Get an Annotation layer",
+ "description": "Get a chart detail information.",
"parameters": [
{
- "description": "The annotation layer pk for this annotation",
"in": "path",
"name": "pk",
"required": true,
@@ -5573,15 +7231,6 @@
}
},
{
- "description": "The annotation pk",
- "in": "path",
- "name": "annotation_id",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
"content": {
"application/json": {
"schema": {
@@ -5599,12 +7248,44 @@
"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/AnnotationRestApi.get"
+ "$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"
@@ -5635,40 +7316,30 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
},
"put": {
- "description": "Update an Annotation layer",
+ "description": "Changes a Chart.",
"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"
+ "$ref": "#/components/schemas/ChartRestApi.put"
}
}
},
- "description": "Annotation schema",
+ "description": "Chart schema",
"required": true
},
"responses": {
@@ -5681,14 +7352,14 @@
"type": "number"
},
"result": {
- "$ref": "#/components/schemas/AnnotationRestApi.put"
+ "$ref": "#/components/schemas/ChartRestApi.put"
}
},
"type": "object"
}
}
},
- "description": "Annotation changed"
+ "description": "Chart changed"
},
"400": {
"$ref": "#/components/responses/400"
@@ -5696,9 +7367,15 @@
"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"
}
@@ -5709,18 +7386,87 @@
}
],
"tags": [
- "Annotation Layers"
+ "Charts"
]
}
},
- "/async_event/": {
+ "/chart/{pk}/cache_screenshot/": {
"get": {
- "description": "Reads off of the Redis events stream, using the user's JWT token and optional query params for last event received.",
+ "description": "Compute and cache a screenshot.",
"parameters": [
{
- "description": "Last ID received by the client",
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/screenshot_query_schema"
+ }
+ }
+ },
"in": "query",
- "name": "last_id",
+ "name": "q"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ChartCacheScreenshotResponseSchema"
+ }
+ }
+ },
+ "description": "Chart async result"
+ },
+ "302": {
+ "description": "Redirects to the current digest"
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
+ },
+ "401": {
+ "$ref": "#/components/responses/401"
+ },
+ "404": {
+ "$ref": "#/components/responses/404"
+ },
+ "500": {
+ "$ref": "#/components/responses/500"
+ }
+ },
+ "security": [
+ {
+ "jwt": []
+ }
+ ],
+ "tags": [
+ "Charts"
+ ]
+ }
+ },
+ "/chart/{pk}/screenshot/{digest}/": {
+ "get": {
+ "description": "Get a computed screenshot from cache.",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "in": "path",
+ "name": "digest",
+ "required": true,
"schema": {
"type": "string"
}
@@ -5729,51 +7475,27 @@
"responses": {
"200": {
"content": {
- "application/json": {
+ "image/*": {
"schema": {
- "properties": {
- "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"
+ "format": "binary",
+ "type": "string"
}
}
},
- "description": "Async event results"
+ "description": "Chart thumbnail image"
+ },
+ "302": {
+ "description": "Redirects to the current digest"
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
+ "404": {
+ "$ref": "#/components/responses/404"
+ },
"500": {
"$ref": "#/components/responses/500"
}
@@ -5784,31 +7506,55 @@
}
],
"tags": [
- "AsyncEventsRestApi"
+ "Charts"
]
}
},
- "/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"
- }
+ "/chart/{pk}/thumbnail/{digest}/": {
+ "get": {
+ "description": "Compute or get already computed chart thumbnail from cache.",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
}
},
- "description": "A list of datasources uuid or the tuples of database and datasource names",
- "required": true
- },
+ {
+ "in": "path",
+ "name": "digest",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
- "201": {
- "description": "cache was successfully invalidated"
+ "200": {
+ "content": {
+ "image/*": {
+ "schema": {
+ "format": "binary",
+ "type": "string"
+ }
+ }
+ },
+ "description": "Chart thumbnail image"
+ },
+ "302": {
+ "description": "Redirects to the current digest"
},
"400": {
"$ref": "#/components/responses/400"
},
+ "401": {
+ "$ref": "#/components/responses/401"
+ },
+ "404": {
+ "$ref": "#/components/responses/404"
+ },
"500": {
"$ref": "#/components/responses/500"
}
@@ -5819,13 +7565,13 @@
}
],
"tags": [
- "CacheRestApi"
+ "Charts"
]
}
},
- "/chart/": {
+ "/css_template/": {
"delete": {
- "description": "Deletes multiple Charts in a bulk operation.",
+ "description": "Deletes multiple css templates in a bulk operation.",
"parameters": [
{
"content": {
@@ -5853,14 +7599,11 @@
}
}
},
- "description": "Charts bulk delete"
+ "description": "CSS templates bulk delete"
},
"401": {
"$ref": "#/components/responses/401"
},
- "403": {
- "$ref": "#/components/responses/403"
- },
"404": {
"$ref": "#/components/responses/404"
},
@@ -5877,11 +7620,11 @@
}
],
"tags": [
- "Charts"
+ "CSS Templates"
]
},
"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": "Get a list of CSS templates, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.",
"parameters": [
{
"content": {
@@ -5954,7 +7697,7 @@
"result": {
"description": "The result from the get list query",
"items": {
- "$ref": "#/components/schemas/ChartRestApi.get_list"
+ "$ref": "#/components/schemas/CssTemplateRestApi.get_list"
},
"type": "array"
}
@@ -5984,20 +7727,20 @@
}
],
"tags": [
- "Charts"
+ "CSS Templates"
]
},
"post": {
- "description": "Create a new Chart.",
+ "description": "Create a CSS template",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ChartRestApi.post"
+ "$ref": "#/components/schemas/CssTemplateRestApi.post"
}
}
},
- "description": "Chart schema",
+ "description": "Model schema",
"required": true
},
"responses": {
@@ -6007,17 +7750,17 @@
"schema": {
"properties": {
"id": {
- "type": "number"
+ "type": "string"
},
"result": {
- "$ref": "#/components/schemas/ChartRestApi.post"
+ "$ref": "#/components/schemas/CssTemplateRestApi.post"
}
},
"type": "object"
}
}
},
- "description": "Chart added"
+ "description": "Item inserted"
},
"400": {
"$ref": "#/components/responses/400"
@@ -6038,13 +7781,13 @@
}
],
"tags": [
- "Charts"
+ "CSS Templates"
]
}
},
- "/chart/_info": {
+ "/css_template/_info": {
"get": {
- "description": "Several metadata information about chart API endpoints.",
+ "description": "Get metadata information about this API resource",
"parameters": [
{
"content": {
@@ -6124,44 +7867,43 @@
}
],
"tags": [
- "Charts"
+ "CSS Templates"
]
}
},
- "/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"
- }
+ "/css_template/related/{column_name}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "column_name",
+ "required": true,
+ "schema": {
+ "type": "string"
}
},
- "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"
+ "$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"
@@ -6169,6 +7911,9 @@
"401": {
"$ref": "#/components/responses/401"
},
+ "404": {
+ "$ref": "#/components/responses/404"
+ },
"500": {
"$ref": "#/components/responses/500"
}
@@ -6179,21 +7924,79 @@
}
],
"tags": [
- "Charts"
+ "CSS Templates"
]
}
},
- "/chart/data/{cache_key}": {
+ "/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"
+ },
+ "500": {
+ "$ref": "#/components/responses/500"
+ }
+ },
+ "security": [
+ {
+ "jwt": []
+ }
+ ],
+ "tags": [
+ "CSS Templates"
+ ]
+ },
"get": {
- "description": "Takes a query context cache key and returns payload data response for the given query.",
+ "description": "Get a CSS template",
"parameters": [
{
"in": "path",
- "name": "cache_key",
+ "name": "pk",
"required": true,
"schema": {
- "type": "string"
+ "type": "integer"
}
+ },
+ {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_item_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
}
],
"responses": {
@@ -6201,11 +8004,52 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ChartDataResponseSchema"
+ "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": "Query result"
+ "description": "Item from Model"
},
"400": {
"$ref": "#/components/responses/400"
@@ -6229,37 +8073,47 @@
}
],
"tags": [
- "Charts"
+ "CSS Templates"
]
- }
- },
- "/chart/export/": {
- "get": {
- "description": "Exports multiple charts and downloads them as YAML files",
+ },
+ "put": {
+ "description": "Update a CSS template",
"parameters": [
{
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_export_ids_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
}
],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CssTemplateRestApi.put"
+ }
+ }
+ },
+ "description": "Model schema",
+ "required": true
+ },
"responses": {
"200": {
"content": {
- "application/zip": {
+ "application/json": {
"schema": {
- "format": "binary",
- "type": "string"
+ "properties": {
+ "result": {
+ "$ref": "#/components/schemas/CssTemplateRestApi.put"
+ }
+ },
+ "type": "object"
}
}
},
- "description": "A zip file with chart(s), dataset(s) and database(s) as YAML"
+ "description": "Item changed"
},
"400": {
"$ref": "#/components/responses/400"
@@ -6270,6 +8124,9 @@
"404": {
"$ref": "#/components/responses/404"
},
+ "422": {
+ "$ref": "#/components/responses/422"
+ },
"500": {
"$ref": "#/components/responses/500"
}
@@ -6280,19 +8137,19 @@
}
],
"tags": [
- "Charts"
+ "CSS Templates"
]
}
},
- "/chart/favorite_status/": {
- "get": {
- "description": "Check favorited dashboards for current user",
+ "/dashboard/": {
+ "delete": {
+ "description": "Deletes multiple Dashboards in a bulk operation.",
"parameters": [
{
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/get_fav_star_ids_schema"
+ "$ref": "#/components/schemas/get_delete_ids_schema"
}
}
},
@@ -6305,64 +8162,6 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetFavStarIdsSchema"
- }
- }
- },
- "description": "None"
- },
- "400": {
- "$ref": "#/components/responses/400"
- },
- "401": {
- "$ref": "#/components/responses/401"
- },
- "404": {
- "$ref": "#/components/responses/404"
- },
- "500": {
- "$ref": "#/components/responses/500"
- }
- },
- "security": [
- {
- "jwt": []
- }
- ],
- "tags": [
- "Charts"
- ]
- }
- },
- "/chart/import/": {
- "post": {
- "requestBody": {
- "content": {
- "multipart/form-data": {
- "schema": {
- "properties": {
- "formData": {
- "format": "binary",
- "type": "string"
- },
- "overwrite": {
- "type": "bool"
- },
- "passwords": {
- "type": "string"
- }
- },
- "type": "object"
- }
- }
- },
- "required": true
- },
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
"properties": {
"message": {
"type": "string"
@@ -6372,14 +8171,17 @@
}
}
},
- "description": "Chart import result"
- },
- "400": {
- "$ref": "#/components/responses/400"
+ "description": "Dashboard bulk delete"
},
"401": {
"$ref": "#/components/responses/401"
},
+ "403": {
+ "$ref": "#/components/responses/403"
+ },
+ "404": {
+ "$ref": "#/components/responses/404"
+ },
"422": {
"$ref": "#/components/responses/422"
},
@@ -6393,27 +8195,17 @@
}
],
"tags": [
- "Charts"
+ "Dashboards"
]
- }
- },
- "/chart/related/{column_name}": {
+ },
"get": {
- "description": "Get a list of all possible owners for a chart.",
+ "description": "Get a list of dashboards, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.",
"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_list_schema"
}
}
},
@@ -6426,11 +8218,70 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RelatedResponseSchema"
+ "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/DashboardRestApi.get_list"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
}
}
},
- "description": "Related column data"
+ "description": "Items from Model"
},
"400": {
"$ref": "#/components/responses/400"
@@ -6438,8 +8289,8 @@
"401": {
"$ref": "#/components/responses/401"
},
- "404": {
- "$ref": "#/components/responses/404"
+ "422": {
+ "$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
@@ -6451,51 +8302,53 @@
}
],
"tags": [
- "Charts"
+ "Dashboards"
]
- }
- },
- "/chart/{pk}": {
- "delete": {
- "description": "Deletes a Chart.",
- "parameters": [
- {
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
+ },
+ "post": {
+ "description": "Create a new Dashboard.",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DashboardRestApi.post"
+ }
}
- }
- ],
+ },
+ "description": "Dashboard schema",
+ "required": true
+ },
"responses": {
- "200": {
+ "201": {
"content": {
"application/json": {
"schema": {
"properties": {
- "message": {
- "type": "string"
+ "id": {
+ "type": "number"
+ },
+ "result": {
+ "$ref": "#/components/schemas/DashboardRestApi.post"
}
},
"type": "object"
}
}
},
- "description": "Chart delete"
+ "description": "Dashboard added"
+ },
+ "302": {
+ "description": "Redirects to the current digest"
+ },
+ "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"
}
@@ -6506,25 +8359,19 @@
}
],
"tags": [
- "Charts"
+ "Dashboards"
]
- },
+ }
+ },
+ "/dashboard/_info": {
"get": {
- "description": "Get a chart detail information.",
+ "description": "Several metadata information about dashboard API endpoints.",
"parameters": [
{
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/get_item_schema"
+ "$ref": "#/components/schemas/get_info_schema"
}
}
},
@@ -6538,44 +8385,39 @@
"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"
- }
- },
+ "add_columns": {
"type": "object"
},
- "id": {
- "description": "The item id",
- "type": "string"
+ "edit_columns": {
+ "type": "object"
},
- "label_columns": {
+ "filters": {
"properties": {
"column_name": {
- "description": "The label for the column name. Will be translated by babel",
- "example": "A Nice label for the column",
- "type": "string"
+ "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"
},
- "result": {
- "$ref": "#/components/schemas/ChartRestApi.get"
- },
- "show_columns": {
- "description": "A list of columns",
+ "permissions": {
+ "description": "The user permissions for this API resource",
"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"
@@ -6590,9 +8432,6 @@
"401": {
"$ref": "#/components/responses/401"
},
- "404": {
- "$ref": "#/components/responses/404"
- },
"422": {
"$ref": "#/components/responses/422"
},
@@ -6606,50 +8445,36 @@
}
],
"tags": [
- "Charts"
+ "Dashboards"
]
- },
- "put": {
- "description": "Changes a Chart.",
+ }
+ },
+ "/dashboard/export/": {
+ "get": {
+ "description": "Exports multiple Dashboards and downloads them as YAML files.",
"parameters": [
{
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_export_ids_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
}
],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ChartRestApi.put"
- }
- }
- },
- "description": "Chart schema",
- "required": true
- },
"responses": {
"200": {
"content": {
- "application/json": {
+ "text/plain": {
"schema": {
- "properties": {
- "id": {
- "type": "number"
- },
- "result": {
- "$ref": "#/components/schemas/ChartRestApi.put"
- }
- },
- "type": "object"
+ "type": "string"
}
}
},
- "description": "Chart changed"
+ "description": "Dashboard export"
},
"400": {
"$ref": "#/components/responses/400"
@@ -6657,9 +8482,6 @@
"401": {
"$ref": "#/components/responses/401"
},
- "403": {
- "$ref": "#/components/responses/403"
- },
"404": {
"$ref": "#/components/responses/404"
},
@@ -6676,27 +8498,19 @@
}
],
"tags": [
- "Charts"
+ "Dashboards"
]
}
},
- "/chart/{pk}/cache_screenshot/": {
+ "/dashboard/favorite_status/": {
"get": {
- "description": "Compute and cache a screenshot.",
+ "description": "Check favorited dashboards for current user",
"parameters": [
{
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/screenshot_query_schema"
+ "$ref": "#/components/schemas/get_fav_star_ids_schema"
}
}
},
@@ -6709,14 +8523,11 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ChartCacheScreenshotResponseSchema"
+ "$ref": "#/components/schemas/GetFavStarIdsSchema"
}
}
},
- "description": "Chart async result"
- },
- "302": {
- "description": "Redirects to the current digest"
+ "description": "None"
},
"400": {
"$ref": "#/components/responses/400"
@@ -6737,45 +8548,49 @@
}
],
"tags": [
- "Charts"
+ "Dashboards"
]
}
},
- "/chart/{pk}/screenshot/{digest}/": {
- "get": {
- "description": "Get a computed screenshot from cache.",
- "parameters": [
- {
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
+ "/dashboard/import/": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "multipart/form-data": {
+ "schema": {
+ "properties": {
+ "formData": {
+ "format": "binary",
+ "type": "string"
+ },
+ "overwrite": {
+ "type": "bool"
+ },
+ "passwords": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
}
},
- {
- "in": "path",
- "name": "digest",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
+ "required": true
+ },
"responses": {
"200": {
"content": {
- "image/*": {
+ "application/json": {
"schema": {
- "format": "binary",
- "type": "string"
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "type": "object"
}
}
},
- "description": "Chart thumbnail image"
- },
- "302": {
- "description": "Redirects to the current digest"
+ "description": "Dashboard import result"
},
"400": {
"$ref": "#/components/responses/400"
@@ -6783,8 +8598,8 @@
"401": {
"$ref": "#/components/responses/401"
},
- "404": {
- "$ref": "#/components/responses/404"
+ "422": {
+ "$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
@@ -6796,45 +8611,44 @@
}
],
"tags": [
- "Charts"
+ "Dashboards"
]
}
},
- "/chart/{pk}/thumbnail/{digest}/": {
+ "/dashboard/related/{column_name}": {
"get": {
- "description": "Compute or get already computed chart thumbnail from cache.",
+ "description": "Get a list of all possible owners for a dashboard.",
"parameters": [
{
"in": "path",
- "name": "pk",
+ "name": "column_name",
"required": true,
"schema": {
- "type": "integer"
+ "type": "string"
}
},
{
- "in": "path",
- "name": "digest",
- "required": true,
- "schema": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_related_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
}
],
"responses": {
"200": {
"content": {
- "image/*": {
+ "application/json": {
"schema": {
- "format": "binary",
- "type": "string"
+ "$ref": "#/components/schemas/RelatedResponseSchema"
}
}
},
- "description": "Chart thumbnail image"
- },
- "302": {
- "description": "Redirects to the current digest"
+ "description": "Related column data"
},
"400": {
"$ref": "#/components/responses/400"
@@ -6855,24 +8669,21 @@
}
],
"tags": [
- "Charts"
+ "Dashboards"
]
}
},
- "/css_template/": {
+ "/dashboard/{pk}": {
"delete": {
- "description": "Deletes multiple css templates in a bulk operation.",
+ "description": "Deletes a Dashboard.",
"parameters": [
{
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_delete_ids_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
}
],
"responses": {
@@ -6889,11 +8700,14 @@
}
}
},
- "description": "CSS templates bulk delete"
+ "description": "Dashboard deleted"
},
"401": {
"$ref": "#/components/responses/401"
},
+ "403": {
+ "$ref": "#/components/responses/403"
+ },
"404": {
"$ref": "#/components/responses/404"
},
@@ -6910,17 +8724,25 @@
}
],
"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 dashboard detail information.",
"parameters": [
{
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/get_list_schema"
+ "$ref": "#/components/schemas/get_item_schema"
}
}
},
@@ -6934,10 +8756,6 @@
"application/json": {
"schema": {
"properties": {
- "count": {
- "description": "The total record count on the backend",
- "type": "number"
- },
"description_columns": {
"properties": {
"column_name": {
@@ -6948,12 +8766,9 @@
},
"type": "object"
},
- "ids": {
- "description": "A list of item ids, useful when you don't know the column id",
- "items": {
- "type": "string"
- },
- "type": "array"
+ "id": {
+ "description": "The item id",
+ "type": "string"
},
"label_columns": {
"properties": {
@@ -6965,38 +8780,27 @@
},
"type": "object"
},
- "list_columns": {
+ "result": {
+ "$ref": "#/components/schemas/DashboardRestApi.get"
+ },
+ "show_columns": {
"description": "A list of columns",
"items": {
"type": "string"
},
"type": "array"
},
- "list_title": {
+ "show_title": {
"description": "A title to render. Will be translated by babel",
- "example": "List Items",
+ "example": "Show Item Details",
"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": "Items from Model"
+ "description": "Item from Model"
},
"400": {
"$ref": "#/components/responses/400"
@@ -7004,6 +8808,9 @@
"401": {
"$ref": "#/components/responses/401"
},
+ "404": {
+ "$ref": "#/components/responses/404"
+ },
"422": {
"$ref": "#/components/responses/422"
},
@@ -7017,40 +8824,50 @@
}
],
"tags": [
- "CSS Templates"
+ "Dashboards"
]
},
- "post": {
- "description": "Create a CSS template",
+ "put": {
+ "description": "Changes a Dashboard.",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CssTemplateRestApi.post"
+ "$ref": "#/components/schemas/DashboardRestApi.put"
}
}
},
- "description": "Model schema",
+ "description": "Dashboard schema",
"required": true
},
"responses": {
- "201": {
+ "200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
- "type": "string"
+ "type": "number"
},
"result": {
- "$ref": "#/components/schemas/CssTemplateRestApi.post"
+ "$ref": "#/components/schemas/DashboardRestApi.put"
}
},
"type": "object"
}
}
},
- "description": "Item inserted"
+ "description": "Dashboard changed"
},
"400": {
"$ref": "#/components/responses/400"
@@ -7058,91 +8875,11 @@
"401": {
"$ref": "#/components/responses/401"
},
- "422": {
- "$ref": "#/components/responses/422"
- },
- "500": {
- "$ref": "#/components/responses/500"
- }
- },
- "security": [
- {
- "jwt": []
- }
- ],
- "tags": [
- "CSS Templates"
- ]
- }
- },
- "/css_template/_info": {
- "get": {
- "description": "Get metadata information about this API resource",
- "parameters": [
- {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_info_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
- }
- ],
- "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"
- },
- "permissions": {
- "description": "The user permissions for this API resource",
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- "type": "object"
- }
- }
- },
- "description": "Item from Model"
- },
- "400": {
- "$ref": "#/components/responses/400"
+ "403": {
+ "$ref": "#/components/responses/403"
},
- "401": {
- "$ref": "#/components/responses/401"
+ "404": {
+ "$ref": "#/components/responses/404"
},
"422": {
"$ref": "#/components/responses/422"
@@ -7157,83 +8894,57 @@
}
],
"tags": [
- "CSS Templates"
+ "Dashboards"
]
}
},
- "/css_template/related/{column_name}": {
+ "/dashboard/{pk}/thumbnail/{digest}/": {
"get": {
+ "description": "Compute async or get already computed dashboard 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"
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/RelatedResponseSchema"
- }
- }
- },
- "description": "Related column data"
- },
- "400": {
- "$ref": "#/components/responses/400"
- },
- "401": {
- "$ref": "#/components/responses/401"
- },
- "404": {
- "$ref": "#/components/responses/404"
- },
- "500": {
- "$ref": "#/components/responses/500"
- }
- },
- "security": [
- {
- "jwt": []
- }
- ],
- "tags": [
- "CSS Templates"
- ]
- }
- },
- "/css_template/{pk}": {
- "delete": {
- "description": "Delete CSS template",
- "parameters": [
- {
+ "description": "A hex digest that makes this dashboard unique",
"in": "path",
- "name": "pk",
+ "name": "digest",
"required": true,
"schema": {
- "type": "integer"
+ "type": "string"
}
+ },
+ {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/thumbnail_query_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
}
],
"responses": {
"200": {
"content": {
+ "image/*": {
+ "schema": {
+ "format": "binary",
+ "type": "string"
+ }
+ }
+ },
+ "description": "Dashboard thumbnail image"
+ },
+ "202": {
+ "content": {
"application/json": {
"schema": {
"properties": {
@@ -7245,7 +8956,10 @@
}
}
},
- "description": "Item deleted"
+ "description": "Thumbnail does not exist on cache, fired async to compute"
+ },
+ "401": {
+ "$ref": "#/components/responses/401"
},
"404": {
"$ref": "#/components/responses/404"
@@ -7263,25 +8977,19 @@
}
],
"tags": [
- "CSS Templates"
+ "Dashboards"
]
- },
+ }
+ },
+ "/database/": {
"get": {
- "description": "Get a CSS template",
+ "description": "Get a list of models",
"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"
}
}
},
@@ -7295,6 +9003,10 @@
"application/json": {
"schema": {
"properties": {
+ "count": {
+ "description": "The total record count on the backend",
+ "type": "number"
+ },
"description_columns": {
"properties": {
"column_name": {
@@ -7305,9 +9017,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": {
@@ -7319,27 +9034,38 @@
},
"type": "object"
},
- "result": {
- "$ref": "#/components/schemas/CssTemplateRestApi.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/DatabaseRestApi.get_list"
+ },
+ "type": "array"
}
},
"type": "object"
}
}
},
- "description": "Item from Model"
+ "description": "Items from Model"
},
"400": {
"$ref": "#/components/responses/400"
@@ -7347,9 +9073,6 @@
"401": {
"$ref": "#/components/responses/401"
},
- "404": {
- "$ref": "#/components/responses/404"
- },
"422": {
"$ref": "#/components/responses/422"
},
@@ -7363,47 +9086,43 @@
}
],
"tags": [
- "CSS Templates"
+ "Database"
]
},
- "put": {
- "description": "Update a CSS template",
- "parameters": [
- {
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
+ "post": {
+ "description": "Create a new Database.",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CssTemplateRestApi.put"
+ "$ref": "#/components/schemas/DatabaseRestApi.post"
}
}
},
- "description": "Model schema",
+ "description": "Database schema",
"required": true
},
"responses": {
- "200": {
+ "201": {
"content": {
"application/json": {
"schema": {
"properties": {
+ "id": {
+ "type": "number"
+ },
"result": {
- "$ref": "#/components/schemas/CssTemplateRestApi.put"
+ "$ref": "#/components/schemas/DatabaseRestApi.post"
}
},
"type": "object"
}
}
},
- "description": "Item changed"
+ "description": "Database added"
+ },
+ "302": {
+ "description": "Redirects to the current digest"
},
"400": {
"$ref": "#/components/responses/400"
@@ -7414,9 +9133,6 @@
"404": {
"$ref": "#/components/responses/404"
},
- "422": {
- "$ref": "#/components/responses/422"
- },
"500": {
"$ref": "#/components/responses/500"
}
@@ -7427,19 +9143,19 @@
}
],
"tags": [
- "CSS Templates"
+ "Database"
]
}
},
- "/dashboard/": {
- "delete": {
- "description": "Deletes multiple Dashboards in a bulk operation.",
+ "/database/_info": {
+ "get": {
+ "description": "Get metadata information about this API resource",
"parameters": [
{
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/get_delete_ids_schema"
+ "$ref": "#/components/schemas/get_info_schema"
}
}
},
@@ -7453,25 +9169,53 @@
"application/json": {
"schema": {
"properties": {
- "message": {
- "type": "string"
+ "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": "Dashboard bulk delete"
+ "description": "Item from Model"
+ },
+ "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"
},
@@ -7485,17 +9229,19 @@
}
],
"tags": [
- "Dashboards"
+ "Database"
]
- },
+ }
+ },
+ "/database/export/": {
"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": "Download database(s) and associated dataset(s) as a zip file",
"parameters": [
{
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/get_list_schema"
+ "$ref": "#/components/schemas/get_export_ids_schema"
}
}
},
@@ -7506,72 +9252,74 @@
"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",
+ "format": "binary",
+ "type": "string"
+ }
+ }
+ },
+ "description": "A zip file with database(s) and dataset(s) as YAML"
+ },
+ "401": {
+ "$ref": "#/components/responses/401"
+ },
+ "404": {
+ "$ref": "#/components/responses/404"
+ },
+ "500": {
+ "$ref": "#/components/responses/500"
+ }
+ },
+ "security": [
+ {
+ "jwt": []
+ }
+ ],
+ "tags": [
+ "Database"
+ ]
+ }
+ },
+ "/database/import/": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "multipart/form-data": {
+ "schema": {
+ "properties": {
+ "formData": {
+ "format": "binary",
+ "type": "string"
+ },
+ "overwrite": {
+ "type": "bool"
+ },
+ "passwords": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "message": {
"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/DashboardRestApi.get_list"
- },
- "type": "array"
}
},
"type": "object"
}
}
},
- "description": "Items from Model"
+ "description": "Database import result"
},
"400": {
"$ref": "#/components/responses/400"
@@ -7592,52 +9340,45 @@
}
],
"tags": [
- "Dashboards"
+ "Database"
]
- },
+ }
+ },
+ "/database/test_connection": {
"post": {
- "description": "Create a new Dashboard.",
+ "description": "Tests a database connection",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DashboardRestApi.post"
+ "$ref": "#/components/schemas/DatabaseTestConnectionSchema"
}
}
},
- "description": "Dashboard schema",
+ "description": "Database schema",
"required": true
},
"responses": {
- "201": {
+ "200": {
"content": {
"application/json": {
"schema": {
"properties": {
- "id": {
- "type": "number"
- },
- "result": {
- "$ref": "#/components/schemas/DashboardRestApi.post"
+ "message": {
+ "type": "string"
}
},
"type": "object"
}
}
},
- "description": "Dashboard added"
- },
- "302": {
- "description": "Redirects to the current digest"
+ "description": "Database Test Connection"
},
"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"
@@ -7649,24 +9390,21 @@
}
],
"tags": [
- "Dashboards"
+ "Database"
]
}
},
- "/dashboard/_info": {
- "get": {
- "description": "Several metadata information about dashboard API endpoints.",
+ "/database/{pk}": {
+ "delete": {
+ "description": "Deletes a Database.",
"parameters": [
{
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_info_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
}
],
"responses": {
@@ -7675,53 +9413,25 @@
"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"
+ "message": {
+ "type": "string"
}
},
"type": "object"
}
}
},
- "description": "Item from Model"
- },
- "400": {
- "$ref": "#/components/responses/400"
+ "description": "Database deleted"
},
"401": {
"$ref": "#/components/responses/401"
},
+ "403": {
+ "$ref": "#/components/responses/403"
+ },
+ "404": {
+ "$ref": "#/components/responses/404"
+ },
"422": {
"$ref": "#/components/responses/422"
},
@@ -7735,19 +9445,25 @@
}
],
"tags": [
- "Dashboards"
+ "Database"
]
- }
- },
- "/dashboard/export/": {
+ },
"get": {
- "description": "Exports multiple Dashboards and downloads them as YAML files.",
+ "description": "Get an item model",
"parameters": [
{
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/get_export_ids_schema"
+ "$ref": "#/components/schemas/get_item_schema"
}
}
},
@@ -7758,13 +9474,54 @@
"responses": {
"200": {
"content": {
- "text/plain": {
+ "application/json": {
"schema": {
- "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/DatabaseRestApi.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": "Dashboard export"
+ "description": "Item from Model"
},
"400": {
"$ref": "#/components/responses/400"
@@ -7788,36 +9545,50 @@
}
],
"tags": [
- "Dashboards"
+ "Database"
]
- }
- },
- "/dashboard/favorite_status/": {
- "get": {
- "description": "Check favorited dashboards for current user",
+ },
+ "put": {
+ "description": "Changes a Database.",
"parameters": [
{
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_fav_star_ids_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
}
],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DatabaseRestApi.put"
+ }
+ }
+ },
+ "description": "Database schema",
+ "required": true
+ },
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetFavStarIdsSchema"
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "result": {
+ "$ref": "#/components/schemas/DatabaseRestApi.put"
+ }
+ },
+ "type": "object"
}
}
},
- "description": "None"
+ "description": "Database changed"
},
"400": {
"$ref": "#/components/responses/400"
@@ -7825,9 +9596,15 @@
"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"
}
@@ -7838,58 +9615,39 @@
}
],
"tags": [
- "Dashboards"
+ "Database"
]
}
},
- "/dashboard/import/": {
- "post": {
- "requestBody": {
- "content": {
- "multipart/form-data": {
- "schema": {
- "properties": {
- "formData": {
- "format": "binary",
- "type": "string"
- },
- "overwrite": {
- "type": "bool"
- },
- "passwords": {
- "type": "string"
- }
- },
- "type": "object"
- }
+ "/database/{pk}/related_objects/": {
+ "get": {
+ "description": "Get charts and dashboards count associated to a database",
+ "parameters": [
+ {
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
}
- },
- "required": true
- },
+ }
+ ],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
- "properties": {
- "message": {
- "type": "string"
- }
- },
- "type": "object"
+ "$ref": "#/components/schemas/DatabaseRelatedObjectsResponse"
}
}
},
- "description": "Dashboard import result"
- },
- "400": {
- "$ref": "#/components/responses/400"
+ "description": "Query result"
},
"401": {
"$ref": "#/components/responses/401"
},
- "422": {
- "$ref": "#/components/responses/422"
+ "404": {
+ "$ref": "#/components/responses/404"
},
"500": {
"$ref": "#/components/responses/500"
@@ -7901,27 +9659,28 @@
}
],
"tags": [
- "Dashboards"
+ "Database"
]
}
},
- "/dashboard/related/{column_name}": {
+ "/database/{pk}/schemas/": {
"get": {
- "description": "Get a list of all possible owners for a dashboard.",
+ "description": "Get all schemas from a database",
"parameters": [
{
+ "description": "The database id",
"in": "path",
- "name": "column_name",
+ "name": "pk",
"required": true,
"schema": {
- "type": "string"
+ "type": "integer"
}
},
{
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/get_related_schema"
+ "$ref": "#/components/schemas/database_schemas_query_schema"
}
}
},
@@ -7934,11 +9693,11 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RelatedResponseSchema"
+ "$ref": "#/components/schemas/SchemasResponseSchema"
}
}
},
- "description": "Related column data"
+ "description": "A List of all schemas from the database"
},
"400": {
"$ref": "#/components/responses/400"
@@ -7959,21 +9718,40 @@
}
],
"tags": [
- "Dashboards"
+ "Database"
]
}
},
- "/dashboard/{pk}": {
- "delete": {
- "description": "Deletes a Dashboard.",
+ "/database/{pk}/select_star/{table_name}/": {
+ "get": {
+ "description": "Get database select star for table",
"parameters": [
{
+ "description": "The database id",
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
+ },
+ {
+ "description": "Table name",
+ "in": "path",
+ "name": "table_name",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Table schema",
+ "in": "path",
+ "name": "schema_name",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -7981,23 +9759,18 @@
"content": {
"application/json": {
"schema": {
- "properties": {
- "message": {
- "type": "string"
- }
- },
- "type": "object"
+ "$ref": "#/components/schemas/SelectStarResponseSchema"
}
}
},
- "description": "Dashboard deleted"
+ "description": "SQL statement for a select star for table"
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
- "403": {
- "$ref": "#/components/responses/403"
- },
"404": {
"$ref": "#/components/responses/404"
},
@@ -8014,13 +9787,16 @@
}
],
"tags": [
- "Dashboards"
+ "Database"
]
- },
+ }
+ },
+ "/database/{pk}/select_star/{table_name}/{schema_name}/": {
"get": {
- "description": "Get a dashboard detail information.",
+ "description": "Get database select star for table",
"parameters": [
{
+ "description": "The database id",
"in": "path",
"name": "pk",
"required": true,
@@ -8029,15 +9805,22 @@
}
},
{
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_item_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
+ "description": "Table name",
+ "in": "path",
+ "name": "table_name",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Table schema",
+ "in": "path",
+ "name": "schema_name",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
@@ -8045,52 +9828,11 @@
"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"
+ "$ref": "#/components/schemas/SelectStarResponseSchema"
}
}
},
- "description": "Item from Model"
+ "description": "SQL statement for a select star for table"
},
"400": {
"$ref": "#/components/responses/400"
@@ -8114,50 +9856,52 @@
}
],
"tags": [
- "Dashboards"
+ "Database"
]
- },
- "put": {
- "description": "Changes a Dashboard.",
+ }
+ },
+ "/database/{pk}/table/{table_name}/{schema_name}/": {
+ "get": {
+ "description": "Get database table metadata",
"parameters": [
{
+ "description": "The database id",
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DashboardRestApi.put"
- }
+ },
+ {
+ "description": "Table name",
+ "in": "path",
+ "name": "table_name",
+ "required": true,
+ "schema": {
+ "type": "string"
}
},
- "description": "Dashboard schema",
- "required": true
- },
+ {
+ "description": "Table schema",
+ "in": "path",
+ "name": "schema_name",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
"responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "id": {
- "type": "number"
- },
- "result": {
- "$ref": "#/components/schemas/DashboardRestApi.put"
- }
- },
- "type": "object"
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/TableMetadataResponseSchema"
}
}
},
- "description": "Dashboard changed"
+ "description": "Table metadata information"
},
"400": {
"$ref": "#/components/responses/400"
@@ -8165,9 +9909,6 @@
"401": {
"$ref": "#/components/responses/401"
},
- "403": {
- "$ref": "#/components/responses/403"
- },
"404": {
"$ref": "#/components/responses/404"
},
@@ -8184,36 +9925,19 @@
}
],
"tags": [
- "Dashboards"
+ "Database"
]
}
},
- "/dashboard/{pk}/thumbnail/{digest}/": {
- "get": {
- "description": "Compute async or get already computed dashboard thumbnail from cache.",
+ "/dataset/": {
+ "delete": {
+ "description": "Deletes multiple Datasets in a bulk operation.",
"parameters": [
{
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "A hex digest that makes this dashboard unique",
- "in": "path",
- "name": "digest",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/thumbnail_query_schema"
+ "$ref": "#/components/schemas/get_delete_ids_schema"
}
}
},
@@ -8224,17 +9948,6 @@
"responses": {
"200": {
"content": {
- "image/*": {
- "schema": {
- "format": "binary",
- "type": "string"
- }
- }
- },
- "description": "Dashboard thumbnail image"
- },
- "202": {
- "content": {
"application/json": {
"schema": {
"properties": {
@@ -8246,11 +9959,17 @@
}
}
},
- "description": "Thumbnail does not exist on cache, fired async to compute"
+ "description": "Dataset bulk delete"
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
+ "403": {
+ "$ref": "#/components/responses/403"
+ },
"404": {
"$ref": "#/components/responses/404"
},
@@ -8267,11 +9986,9 @@
}
],
"tags": [
- "Dashboards"
+ "Datasets"
]
- }
- },
- "/database/": {
+ },
"get": {
"description": "Get a list of models",
"parameters": [
@@ -8346,7 +10063,7 @@
"result": {
"description": "The result from the get list query",
"items": {
- "$ref": "#/components/schemas/DatabaseRestApi.get_list"
+ "$ref": "#/components/schemas/DatasetRestApi.get_list"
},
"type": "array"
}
@@ -8376,20 +10093,20 @@
}
],
"tags": [
- "Database"
+ "Datasets"
]
},
"post": {
- "description": "Create a new Database.",
+ "description": "Create a new Dataset",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DatabaseRestApi.post"
+ "$ref": "#/components/schemas/DatasetRestApi.post"
}
}
},
- "description": "Database schema",
+ "description": "Dataset schema",
"required": true
},
"responses": {
@@ -8402,17 +10119,14 @@
"type": "number"
},
"result": {
- "$ref": "#/components/schemas/DatabaseRestApi.post"
+ "$ref": "#/components/schemas/DatasetRestApi.post"
}
},
"type": "object"
}
}
},
- "description": "Database added"
- },
- "302": {
- "description": "Redirects to the current digest"
+ "description": "Dataset added"
},
"400": {
"$ref": "#/components/responses/400"
@@ -8420,8 +10134,8 @@
"401": {
"$ref": "#/components/responses/401"
},
- "404": {
- "$ref": "#/components/responses/404"
+ "422": {
+ "$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
@@ -8433,11 +10147,11 @@
}
],
"tags": [
- "Database"
+ "Datasets"
]
}
},
- "/database/_info": {
+ "/dataset/_info": {
"get": {
"description": "Get metadata information about this API resource",
"parameters": [
@@ -8519,196 +10233,31 @@
}
],
"tags": [
- "Database"
- ]
- }
- },
- "/database/export/": {
- "get": {
- "description": "Download database(s) and associated dataset(s) as a zip file",
- "parameters": [
- {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_export_ids_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/zip": {
- "schema": {
- "format": "binary",
- "type": "string"
- }
- }
- },
- "description": "A zip file with database(s) and dataset(s) as YAML"
- },
- "401": {
- "$ref": "#/components/responses/401"
- },
- "404": {
- "$ref": "#/components/responses/404"
- },
- "500": {
- "$ref": "#/components/responses/500"
- }
- },
- "security": [
- {
- "jwt": []
- }
- ],
- "tags": [
- "Database"
- ]
- }
- },
- "/database/import/": {
- "post": {
- "requestBody": {
- "content": {
- "multipart/form-data": {
- "schema": {
- "properties": {
- "formData": {
- "format": "binary",
- "type": "string"
- },
- "overwrite": {
- "type": "bool"
- },
- "passwords": {
- "type": "string"
- }
- },
- "type": "object"
- }
- }
- },
- "required": true
- },
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "message": {
- "type": "string"
- }
- },
- "type": "object"
- }
- }
- },
- "description": "Database 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": [
- "Database"
- ]
- }
- },
- "/database/test_connection": {
- "post": {
- "description": "Tests a database connection",
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "encrypted_extra": {
- "type": "object"
- },
- "extras": {
- "type": "object"
- },
- "name": {
- "type": "string"
- },
- "server_cert": {
- "type": "string"
- }
- },
- "type": "object"
- }
- }
- },
- "description": "Database schema",
- "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"
+ "Datasets"
]
}
},
- "/database/{pk}": {
- "delete": {
- "description": "Deletes a Database.",
+ "/dataset/distinct/{column_name}": {
+ "get": {
"parameters": [
{
"in": "path",
- "name": "pk",
+ "name": "column_name",
"required": true,
"schema": {
- "type": "integer"
+ "type": "string"
}
+ },
+ {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_related_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
}
],
"responses": {
@@ -8716,29 +10265,21 @@
"content": {
"application/json": {
"schema": {
- "properties": {
- "message": {
- "type": "string"
- }
- },
- "type": "object"
+ "$ref": "#/components/schemas/DistincResponseSchema"
}
}
},
- "description": "Database deleted"
+ "description": "Distinct field 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"
}
@@ -8749,25 +10290,19 @@
}
],
"tags": [
- "Database"
+ "Datasets"
]
- },
+ }
+ },
+ "/dataset/export/": {
"get": {
- "description": "Get an item model",
+ "description": "Exports multiple datasets and downloads them as YAML files",
"parameters": [
{
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/get_item_schema"
+ "$ref": "#/components/schemas/get_export_ids_schema"
}
}
},
@@ -8778,54 +10313,13 @@
"responses": {
"200": {
"content": {
- "application/json": {
+ "text/plain": {
"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/DatabaseRestApi.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"
+ "type": "string"
}
}
},
- "description": "Item from Model"
+ "description": "Dataset export"
},
"400": {
"$ref": "#/components/responses/400"
@@ -8836,9 +10330,6 @@
"404": {
"$ref": "#/components/responses/404"
},
- "422": {
- "$ref": "#/components/responses/422"
- },
"500": {
"$ref": "#/components/responses/500"
}
@@ -8849,30 +10340,32 @@
}
],
"tags": [
- "Database"
+ "Datasets"
]
- },
- "put": {
- "description": "Changes a Database.",
- "parameters": [
- {
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
+ }
+ },
+ "/dataset/import/": {
+ "post": {
"requestBody": {
"content": {
- "application/json": {
+ "multipart/form-data": {
"schema": {
- "$ref": "#/components/schemas/DatabaseRestApi.put"
+ "properties": {
+ "formData": {
+ "format": "binary",
+ "type": "string"
+ },
+ "overwrite": {
+ "type": "bool"
+ },
+ "passwords": {
+ "type": "string"
+ }
+ },
+ "type": "object"
}
}
},
- "description": "Database schema",
"required": true
},
"responses": {
@@ -8881,18 +10374,15 @@
"application/json": {
"schema": {
"properties": {
- "id": {
- "type": "number"
- },
- "result": {
- "$ref": "#/components/schemas/DatabaseRestApi.put"
+ "message": {
+ "type": "string"
}
},
"type": "object"
}
}
},
- "description": "Database changed"
+ "description": "Dataset import result"
},
"400": {
"$ref": "#/components/responses/400"
@@ -8900,12 +10390,6 @@
"401": {
"$ref": "#/components/responses/401"
},
- "403": {
- "$ref": "#/components/responses/403"
- },
- "404": {
- "$ref": "#/components/responses/404"
- },
"422": {
"$ref": "#/components/responses/422"
},
@@ -8919,21 +10403,31 @@
}
],
"tags": [
- "Database"
+ "Datasets"
]
}
},
- "/database/{pk}/related_objects/": {
+ "/dataset/related/{column_name}": {
"get": {
- "description": "Get charts and dashboards count associated to a database",
"parameters": [
{
"in": "path",
- "name": "pk",
+ "name": "column_name",
"required": true,
"schema": {
- "type": "integer"
+ "type": "string"
}
+ },
+ {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_related_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
}
],
"responses": {
@@ -8941,11 +10435,14 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DatabaseRelatedObjectsResponse"
+ "$ref": "#/components/schemas/RelatedResponseSchema"
}
}
},
- "description": "Query result"
+ "description": "Related column data"
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
@@ -8963,33 +10460,21 @@
}
],
"tags": [
- "Database"
+ "Datasets"
]
}
},
- "/database/{pk}/schemas/": {
- "get": {
- "description": "Get all schemas from a database",
+ "/dataset/{pk}": {
+ "delete": {
+ "description": "Deletes a Dataset",
"parameters": [
{
- "description": "The database id",
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
- },
- {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/database_schemas_query_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
}
],
"responses": {
@@ -8997,21 +10482,29 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SchemasResponseSchema"
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "type": "object"
}
}
},
- "description": "A List of all schemas from the database"
- },
- "400": {
- "$ref": "#/components/responses/400"
+ "description": "Dataset delete"
},
"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"
}
@@ -9022,16 +10515,13 @@
}
],
"tags": [
- "Database"
+ "Datasets"
]
- }
- },
- "/database/{pk}/select_star/{table_name}/": {
+ },
"get": {
- "description": "Get database select star for table",
+ "description": "Get an item model",
"parameters": [
{
- "description": "The database id",
"in": "path",
"name": "pk",
"required": true,
@@ -9040,22 +10530,15 @@
}
},
{
- "description": "Table name",
- "in": "path",
- "name": "table_name",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Table schema",
- "in": "path",
- "name": "schema_name",
- "required": true,
- "schema": {
- "type": "string"
- }
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_item_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
}
],
"responses": {
@@ -9063,11 +10546,52 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SelectStarResponseSchema"
+ "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/DatasetRestApi.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": "SQL statement for a select star for table"
+ "description": "Item from Model"
},
"400": {
"$ref": "#/components/responses/400"
@@ -9091,16 +10615,13 @@
}
],
"tags": [
- "Database"
+ "Datasets"
]
- }
- },
- "/database/{pk}/select_star/{table_name}/{schema_name}/": {
- "get": {
- "description": "Get database select star for table",
+ },
+ "put": {
+ "description": "Changes a Dataset",
"parameters": [
{
- "description": "The database id",
"in": "path",
"name": "pk",
"required": true,
@@ -9109,34 +10630,43 @@
}
},
{
- "description": "Table name",
- "in": "path",
- "name": "table_name",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Table schema",
"in": "path",
- "name": "schema_name",
+ "name": "override_columns",
"required": true,
"schema": {
- "type": "string"
+ "type": "bool"
}
}
],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DatasetRestApi.put"
+ }
+ }
+ },
+ "description": "Dataset schema",
+ "required": true
+ },
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SelectStarResponseSchema"
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "result": {
+ "$ref": "#/components/schemas/DatasetRestApi.put"
+ }
+ },
+ "type": "object"
}
}
},
- "description": "SQL statement for a select star for table"
+ "description": "Dataset changed"
},
"400": {
"$ref": "#/components/responses/400"
@@ -9144,6 +10674,9 @@
"401": {
"$ref": "#/components/responses/401"
},
+ "403": {
+ "$ref": "#/components/responses/403"
+ },
"404": {
"$ref": "#/components/responses/404"
},
@@ -9160,40 +10693,21 @@
}
],
"tags": [
- "Database"
+ "Datasets"
]
}
},
- "/database/{pk}/table/{table_name}/{schema_name}/": {
- "get": {
- "description": "Get database table metadata",
+ "/dataset/{pk}/refresh": {
+ "put": {
+ "description": "Refreshes and updates columns of a dataset",
"parameters": [
{
- "description": "The database id",
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
- },
- {
- "description": "Table name",
- "in": "path",
- "name": "table_name",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Table schema",
- "in": "path",
- "name": "schema_name",
- "required": true,
- "schema": {
- "type": "string"
- }
}
],
"responses": {
@@ -9201,18 +10715,23 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/TableMetadataResponseSchema"
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "type": "object"
}
}
},
- "description": "Table metadata information"
- },
- "400": {
- "$ref": "#/components/responses/400"
+ "description": "Dataset delete"
},
"401": {
"$ref": "#/components/responses/401"
},
+ "403": {
+ "$ref": "#/components/responses/403"
+ },
"404": {
"$ref": "#/components/responses/404"
},
@@ -9229,24 +10748,21 @@
}
],
"tags": [
- "Database"
+ "Datasets"
]
}
},
- "/dataset/": {
- "delete": {
- "description": "Deletes multiple Datasets in a bulk operation.",
+ "/dataset/{pk}/related_objects": {
+ "get": {
+ "description": "Get charts and dashboards count associated to a dataset",
"parameters": [
{
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_delete_ids_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
}
],
"responses": {
@@ -9254,32 +10770,18 @@
"content": {
"application/json": {
"schema": {
- "properties": {
- "message": {
- "type": "string"
- }
- },
- "type": "object"
+ "$ref": "#/components/schemas/DatasetRelatedObjectsResponse"
}
}
},
- "description": "Dataset bulk delete"
- },
- "400": {
- "$ref": "#/components/responses/400"
+ "description": "Query result"
},
"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"
}
@@ -9292,7 +10794,9 @@
"tags": [
"Datasets"
]
- },
+ }
+ },
+ "/log/": {
"get": {
"description": "Get a list of models",
"parameters": [
@@ -9367,7 +10871,7 @@
"result": {
"description": "The result from the get list query",
"items": {
- "$ref": "#/components/schemas/DatasetRestApi.get_list"
+ "$ref": "#/components/schemas/LogRestApi.get_list"
},
"type": "array"
}
@@ -9397,20 +10901,19 @@
}
],
"tags": [
- "Datasets"
+ "LogRestApi"
]
},
"post": {
- "description": "Create a new Dataset",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DatasetRestApi.post"
+ "$ref": "#/components/schemas/LogRestApi.post"
}
}
},
- "description": "Dataset schema",
+ "description": "Model schema",
"required": true
},
"responses": {
@@ -9420,17 +10923,17 @@
"schema": {
"properties": {
"id": {
- "type": "number"
+ "type": "string"
},
"result": {
- "$ref": "#/components/schemas/DatasetRestApi.post"
+ "$ref": "#/components/schemas/LogRestApi.post"
}
},
"type": "object"
}
}
},
- "description": "Dataset added"
+ "description": "Item inserted"
},
"400": {
"$ref": "#/components/responses/400"
@@ -9451,19 +10954,27 @@
}
],
"tags": [
- "Datasets"
+ "LogRestApi"
]
}
},
- "/dataset/_info": {
+ "/log/{pk}": {
"get": {
- "description": "Get metadata information about this API resource",
+ "description": "Get an item model",
"parameters": [
{
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/get_info_schema"
+ "$ref": "#/components/schemas/get_item_schema"
}
}
},
@@ -9477,39 +10988,44 @@
"application/json": {
"schema": {
"properties": {
- "add_columns": {
+ "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"
},
- "edit_columns": {
- "type": "object"
+ "id": {
+ "description": "The item id",
+ "type": "string"
},
- "filters": {
+ "label_columns": {
"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"
+ "description": "The label for the column name. Will be translated by babel",
+ "example": "A Nice label for the column",
+ "type": "string"
}
},
"type": "object"
},
- "permissions": {
- "description": "The user permissions for this API resource",
+ "result": {
+ "$ref": "#/components/schemas/LogRestApi.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"
@@ -9524,6 +11040,9 @@
"401": {
"$ref": "#/components/responses/401"
},
+ "404": {
+ "$ref": "#/components/responses/404"
+ },
"422": {
"$ref": "#/components/responses/422"
},
@@ -9537,55 +11056,59 @@
}
],
"tags": [
- "Datasets"
+ "LogRestApi"
]
}
},
- "/dataset/distinct/{column_name}": {
+ "/menu/": {
"get": {
- "parameters": [
- {
- "in": "path",
- "name": "column_name",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_related_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
- }
- ],
+ "description": "Get the menu data structure. Returns a forest like structure with the menu the user has access to",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DistincResponseSchema"
+ "properties": {
+ "result": {
+ "description": "Menu items in a forest like data structure",
+ "items": {
+ "properties": {
+ "childs": {
+ "items": {
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "icon": {
+ "description": "Icon name to show for this menu item",
+ "type": "string"
+ },
+ "label": {
+ "description": "Pretty name for the menu item",
+ "type": "string"
+ },
+ "name": {
+ "description": "The internal menu item name, maps to permission_name",
+ "type": "string"
+ },
+ "url": {
+ "description": "The URL for the menu item",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
}
}
},
- "description": "Distinct field data"
- },
- "400": {
- "$ref": "#/components/responses/400"
+ "description": "Get menu data"
},
"401": {
"$ref": "#/components/responses/401"
- },
- "404": {
- "$ref": "#/components/responses/404"
- },
- "500": {
- "$ref": "#/components/responses/500"
}
},
"security": [
@@ -9594,42 +11117,33 @@
}
],
"tags": [
- "Datasets"
+ "Menu"
]
}
},
- "/dataset/export/": {
+ "/openapi/{version}/_openapi": {
"get": {
- "description": "Exports multiple datasets and downloads them as YAML files",
+ "description": "Get the OpenAPI spec for a specific API version",
"parameters": [
{
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/get_export_ids_schema"
- }
- }
- },
- "in": "query",
- "name": "q"
+ "in": "path",
+ "name": "version",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"content": {
- "text/plain": {
+ "application/json": {
"schema": {
- "type": "string"
+ "type": "object"
}
}
},
- "description": "Dataset export"
- },
- "400": {
- "$ref": "#/components/responses/400"
- },
- "401": {
- "$ref": "#/components/responses/401"
+ "description": "The OpenAPI spec"
},
"404": {
"$ref": "#/components/responses/404"
@@ -9644,49 +11158,95 @@
}
],
"tags": [
- "Datasets"
+ "OpenApi"
]
}
},
- "/dataset/import/": {
- "post": {
- "requestBody": {
- "content": {
- "multipart/form-data": {
- "schema": {
- "properties": {
- "formData": {
- "format": "binary",
- "type": "string"
- },
- "overwrite": {
- "type": "bool"
- },
- "passwords": {
- "type": "string"
- }
- },
- "type": "object"
+ "/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": [
+ {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_list_schema"
+ }
}
- }
- },
- "required": true
- },
+ },
+ "in": "query",
+ "name": "q"
+ }
+ ],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
- "message": {
+ "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/QueryRestApi.get_list"
+ },
+ "type": "array"
}
},
"type": "object"
}
}
},
- "description": "Dataset import result"
+ "description": "Items from Model"
},
"400": {
"$ref": "#/components/responses/400"
@@ -9707,11 +11267,11 @@
}
],
"tags": [
- "Datasets"
+ "Queries"
]
}
},
- "/dataset/related/{column_name}": {
+ "/query/distinct/{column_name}": {
"get": {
"parameters": [
{
@@ -9739,11 +11299,11 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RelatedResponseSchema"
+ "$ref": "#/components/schemas/DistincResponseSchema"
}
}
},
- "description": "Related column data"
+ "description": "Distinct field data"
},
"400": {
"$ref": "#/components/responses/400"
@@ -9764,21 +11324,31 @@
}
],
"tags": [
- "Datasets"
+ "Queries"
]
}
},
- "/dataset/{pk}": {
- "delete": {
- "description": "Deletes a Dataset",
+ "/query/related/{column_name}": {
+ "get": {
"parameters": [
{
"in": "path",
- "name": "pk",
+ "name": "column_name",
"required": true,
"schema": {
- "type": "integer"
+ "type": "string"
}
+ },
+ {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_related_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
}
],
"responses": {
@@ -9786,29 +11356,21 @@
"content": {
"application/json": {
"schema": {
- "properties": {
- "message": {
- "type": "string"
- }
- },
- "type": "object"
+ "$ref": "#/components/schemas/RelatedResponseSchema"
}
}
},
- "description": "Dataset delete"
+ "description": "Related column data"
},
- "401": {
- "$ref": "#/components/responses/401"
+ "400": {
+ "$ref": "#/components/responses/400"
},
- "403": {
- "$ref": "#/components/responses/403"
+ "401": {
+ "$ref": "#/components/responses/401"
},
"404": {
"$ref": "#/components/responses/404"
},
- "422": {
- "$ref": "#/components/responses/422"
- },
"500": {
"$ref": "#/components/responses/500"
}
@@ -9819,11 +11381,13 @@
}
],
"tags": [
- "Datasets"
+ "Queries"
]
- },
+ }
+ },
+ "/query/{pk}": {
"get": {
- "description": "Get an item model",
+ "description": "Get query detail information.",
"parameters": [
{
"in": "path",
@@ -9876,7 +11440,7 @@
"type": "object"
},
"result": {
- "$ref": "#/components/schemas/DatasetRestApi.get"
+ "$ref": "#/components/schemas/QueryRestApi.get"
},
"show_columns": {
"description": "A list of columns",
@@ -9919,99 +11483,24 @@
}
],
"tags": [
- "Datasets"
+ "Queries"
]
- },
- "put": {
- "description": "Changes a Dataset",
+ }
+ },
+ "/report/": {
+ "delete": {
+ "description": "Deletes multiple report schedules in a bulk operation.",
"parameters": [
{
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "in": "path",
- "name": "override_columns",
- "required": true,
- "schema": {
- "type": "bool"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DatasetRestApi.put"
- }
- }
- },
- "description": "Dataset schema",
- "required": true
- },
- "responses": {
- "200": {
"content": {
"application/json": {
"schema": {
- "properties": {
- "id": {
- "type": "number"
- },
- "result": {
- "$ref": "#/components/schemas/DatasetRestApi.put"
- }
- },
- "type": "object"
+ "$ref": "#/components/schemas/get_delete_ids_schema"
}
}
},
- "description": "Dataset changed"
- },
- "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"
- }
- },
- "security": [
- {
- "jwt": []
- }
- ],
- "tags": [
- "Datasets"
- ]
- }
- },
- "/dataset/{pk}/refresh": {
- "put": {
- "description": "Refreshes and updates columns of a dataset",
- "parameters": [
- {
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
- }
+ "in": "query",
+ "name": "q"
}
],
"responses": {
@@ -10028,7 +11517,7 @@
}
}
},
- "description": "Dataset delete"
+ "description": "Report Schedule bulk delete"
},
"401": {
"$ref": "#/components/responses/401"
@@ -10052,57 +11541,11 @@
}
],
"tags": [
- "Datasets"
- ]
- }
- },
- "/dataset/{pk}/related_objects": {
- "get": {
- "description": "Get charts and dashboards count associated to a dataset",
- "parameters": [
- {
- "in": "path",
- "name": "pk",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DatasetRelatedObjectsResponse"
- }
- }
- },
- "description": "Query result"
- },
- "401": {
- "$ref": "#/components/responses/401"
- },
- "404": {
- "$ref": "#/components/responses/404"
- },
- "500": {
- "$ref": "#/components/responses/500"
- }
- },
- "security": [
- {
- "jwt": []
- }
- ],
- "tags": [
- "Datasets"
+ "Report Schedules"
]
- }
- },
- "/log/": {
+ },
"get": {
- "description": "Get a list of models",
+ "description": "Get a list of report schedules, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.",
"parameters": [
{
"content": {
@@ -10175,7 +11618,7 @@
"result": {
"description": "The result from the get list query",
"items": {
- "$ref": "#/components/schemas/LogRestApi.get_list"
+ "$ref": "#/components/schemas/ReportScheduleRestApi.get_list"
},
"type": "array"
}
@@ -10205,19 +11648,20 @@
}
],
"tags": [
- "LogRestApi"
+ "Report Schedules"
]
},
"post": {
+ "description": "Create a report schedule",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/LogRestApi.post"
+ "$ref": "#/components/schemas/ReportScheduleRestApi.post"
}
}
},
- "description": "Model schema",
+ "description": "Report Schedule schema",
"required": true
},
"responses": {
@@ -10227,17 +11671,17 @@
"schema": {
"properties": {
"id": {
- "type": "string"
+ "type": "number"
},
"result": {
- "$ref": "#/components/schemas/LogRestApi.post"
+ "$ref": "#/components/schemas/ReportScheduleRestApi.post"
}
},
"type": "object"
}
}
},
- "description": "Item inserted"
+ "description": "Report schedule added"
},
"400": {
"$ref": "#/components/responses/400"
@@ -10245,8 +11689,8 @@
"401": {
"$ref": "#/components/responses/401"
},
- "422": {
- "$ref": "#/components/responses/422"
+ "404": {
+ "$ref": "#/components/responses/404"
},
"500": {
"$ref": "#/components/responses/500"
@@ -10258,27 +11702,19 @@
}
],
"tags": [
- "LogRestApi"
+ "Report Schedules"
]
}
},
- "/log/{pk}": {
+ "/report/_info": {
"get": {
- "description": "Get an item model",
+ "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/get_item_schema"
+ "$ref": "#/components/schemas/get_info_schema"
}
}
},
@@ -10292,44 +11728,39 @@
"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"
- }
- },
+ "add_columns": {
"type": "object"
},
- "id": {
- "description": "The item id",
- "type": "string"
+ "edit_columns": {
+ "type": "object"
},
- "label_columns": {
+ "filters": {
"properties": {
"column_name": {
- "description": "The label for the column name. Will be translated by babel",
- "example": "A Nice label for the column",
- "type": "string"
+ "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"
},
- "result": {
- "$ref": "#/components/schemas/LogRestApi.get"
- },
- "show_columns": {
- "description": "A list of columns",
+ "permissions": {
+ "description": "The user permissions for this API resource",
"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"
@@ -10344,9 +11775,6 @@
"401": {
"$ref": "#/components/responses/401"
},
- "404": {
- "$ref": "#/components/responses/404"
- },
"422": {
"$ref": "#/components/responses/422"
},
@@ -10359,60 +11787,56 @@
"jwt": []
}
],
- "tags": [
- "LogRestApi"
- ]
- }
- },
- "/menu/": {
- "get": {
- "description": "Get the menu data structure. Returns a forest like structure with the menu the user has access to",
+ "tags": [
+ "Report Schedules"
+ ]
+ }
+ },
+ "/report/related/{column_name}": {
+ "get": {
+ "parameters": [
+ {
+ "in": "path",
+ "name": "column_name",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/get_related_schema"
+ }
+ }
+ },
+ "in": "query",
+ "name": "q"
+ }
+ ],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
- "properties": {
- "result": {
- "description": "Menu items in a forest like data structure",
- "items": {
- "properties": {
- "childs": {
- "items": {
- "type": "object"
- },
- "type": "array"
- },
- "icon": {
- "description": "Icon name to show for this menu item",
- "type": "string"
- },
- "label": {
- "description": "Pretty name for the menu item",
- "type": "string"
- },
- "name": {
- "description": "The internal menu item name, maps to permission_name",
- "type": "string"
- },
- "url": {
- "description": "The URL for the menu item",
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ "$ref": "#/components/schemas/RelatedResponseSchema"
}
}
},
- "description": "Get menu data"
+ "description": "Related column data"
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
+ },
+ "404": {
+ "$ref": "#/components/responses/404"
+ },
+ "500": {
+ "$ref": "#/components/responses/500"
}
},
"security": [
@@ -10421,20 +11845,21 @@
}
],
"tags": [
- "Menu"
+ "Report Schedules"
]
}
},
- "/openapi/{version}/_openapi": {
- "get": {
- "description": "Get the OpenAPI spec for a specific API version",
+ "/report/{pk}": {
+ "delete": {
+ "description": "Delete a report schedule",
"parameters": [
{
+ "description": "The report schedule pk",
"in": "path",
- "name": "version",
+ "name": "pk",
"required": true,
"schema": {
- "type": "string"
+ "type": "integer"
}
}
],
@@ -10443,15 +11868,26 @@
"content": {
"application/json": {
"schema": {
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
"type": "object"
}
}
},
- "description": "The OpenAPI spec"
+ "description": "Item deleted"
+ },
+ "403": {
+ "$ref": "#/components/responses/403"
},
"404": {
"$ref": "#/components/responses/404"
},
+ "422": {
+ "$ref": "#/components/responses/422"
+ },
"500": {
"$ref": "#/components/responses/500"
}
@@ -10462,19 +11898,25 @@
}
],
"tags": [
- "OpenApi"
+ "Report Schedules"
]
- }
- },
- "/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.",
+ "description": "Get a report schedule",
"parameters": [
{
+ "in": "path",
+ "name": "pk",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/get_list_schema"
+ "$ref": "#/components/schemas/get_item_schema"
}
}
},
@@ -10488,10 +11930,6 @@
"application/json": {
"schema": {
"properties": {
- "count": {
- "description": "The total record count on the backend",
- "type": "number"
- },
"description_columns": {
"properties": {
"column_name": {
@@ -10502,12 +11940,9 @@
},
"type": "object"
},
- "ids": {
- "description": "A list of item ids, useful when you don't know the column id",
- "items": {
- "type": "string"
- },
- "type": "array"
+ "id": {
+ "description": "The item id",
+ "type": "string"
},
"label_columns": {
"properties": {
@@ -10519,38 +11954,27 @@
},
"type": "object"
},
- "list_columns": {
+ "result": {
+ "$ref": "#/components/schemas/ReportScheduleRestApi.get"
+ },
+ "show_columns": {
"description": "A list of columns",
"items": {
"type": "string"
},
"type": "array"
},
- "list_title": {
+ "show_title": {
"description": "A title to render. Will be translated by babel",
- "example": "List Items",
+ "example": "Show Item Details",
"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/QueryRestApi.get_list"
- },
- "type": "array"
}
},
"type": "object"
}
}
},
- "description": "Items from Model"
+ "description": "Item from Model"
},
"400": {
"$ref": "#/components/responses/400"
@@ -10558,6 +11982,9 @@
"401": {
"$ref": "#/components/responses/401"
},
+ "404": {
+ "$ref": "#/components/responses/404"
+ },
"422": {
"$ref": "#/components/responses/422"
},
@@ -10571,43 +11998,51 @@
}
],
"tags": [
- "Queries"
+ "Report Schedules"
]
- }
- },
- "/query/distinct/{column_name}": {
- "get": {
+ },
+ "put": {
+ "description": "Update a report schedule",
"parameters": [
{
+ "description": "The Report Schedule pk",
"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"
}
],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ReportScheduleRestApi.put"
+ }
+ }
+ },
+ "description": "Report Schedule schema",
+ "required": true
+ },
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DistincResponseSchema"
+ "properties": {
+ "id": {
+ "type": "number"
+ },
+ "result": {
+ "$ref": "#/components/schemas/ReportScheduleRestApi.put"
+ }
+ },
+ "type": "object"
}
}
},
- "description": "Distinct field data"
+ "description": "Report Schedule changed"
},
"400": {
"$ref": "#/components/responses/400"
@@ -10615,6 +12050,9 @@
"401": {
"$ref": "#/components/responses/401"
},
+ "403": {
+ "$ref": "#/components/responses/403"
+ },
"404": {
"$ref": "#/components/responses/404"
},
@@ -10628,26 +12066,28 @@
}
],
"tags": [
- "Queries"
+ "Report Schedules"
]
}
},
- "/query/related/{column_name}": {
+ "/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": [
{
+ "description": "The report schedule id for these logs",
"in": "path",
- "name": "column_name",
+ "name": "pk",
"required": true,
"schema": {
- "type": "string"
+ "type": "integer"
}
},
{
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/get_related_schema"
+ "$ref": "#/components/schemas/get_list_schema"
}
}
},
@@ -10660,11 +12100,31 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RelatedResponseSchema"
+ "properties": {
+ "count": {
+ "description": "The total record count on the backend",
+ "type": "number"
+ },
+ "ids": {
+ "description": "A list of log ids",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "result": {
+ "description": "The result from the get list query",
+ "items": {
+ "$ref": "#/components/schemas/ReportExecutionLogRestApi.get_list"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
}
}
},
- "description": "Related column data"
+ "description": "Items from logs"
},
"400": {
"$ref": "#/components/responses/400"
@@ -10672,8 +12132,8 @@
"401": {
"$ref": "#/components/responses/401"
},
- "404": {
- "$ref": "#/components/responses/404"
+ "422": {
+ "$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
@@ -10685,15 +12145,16 @@
}
],
"tags": [
- "Queries"
+ "Report Schedules"
]
}
},
- "/query/{pk}": {
+ "/report/{pk}/log/{log_id}": {
"get": {
- "description": "Get query detail information.",
+ "description": "Get a report schedule log",
"parameters": [
{
+ "description": "The report schedule pk for log",
"in": "path",
"name": "pk",
"required": true,
@@ -10702,6 +12163,15 @@
}
},
{
+ "description": "The log pk",
+ "in": "path",
+ "name": "log_id",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
"content": {
"application/json": {
"schema": {
@@ -10719,51 +12189,19 @@
"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",
+ "description": "The log 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/QueryRestApi.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"
+ "$ref": "#/components/schemas/ReportExecutionLogRestApi.get"
}
},
"type": "object"
}
}
},
- "description": "Item from Model"
+ "description": "Item log"
},
"400": {
"$ref": "#/components/responses/400"
@@ -10787,7 +12225,7 @@
}
],
"tags": [
- "Queries"
+ "Report Schedules"
]
}
},
diff --git a/superset/databases/api.py b/superset/databases/api.py
index 33f9f38..01b23bc 100644
--- a/superset/databases/api.py
+++ b/superset/databases/api.py
@@ -179,6 +179,7 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
openapi_spec_tag = "Database"
openapi_spec_component_schemas = (
DatabaseRelatedObjectsResponse,
+ DatabaseTestConnectionSchema,
TableMetadataResponseSchema,
SelectStarResponseSchema,
SchemasResponseSchema,
@@ -560,16 +561,7 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
content:
application/json:
schema:
- type: object
- properties:
- encrypted_extra:
- type: object
- extras:
- type: object
- name:
- type: string
- server_cert:
- type: string
+ $ref: "#/components/schemas/DatabaseTestConnectionSchema"
responses:
200:
description: Database Test Connection