Files
ss-tools/.ai/openapi/superset/paths/dataset.json

1222 lines
30 KiB
JSON

{
"/api/v1/dataset/": {
"delete": {
"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": "Dataset bulk delete"
},
"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": []
}
],
"summary": "Bulk delete datasets",
"tags": [
"Datasets"
]
},
"get": {
"description": "Gets a list of datasets, 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/DatasetRestApi.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": []
}
],
"summary": "Get a list of datasets",
"tags": [
"Datasets"
]
},
"post": {
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DatasetRestApi.post"
}
}
},
"description": "Dataset schema",
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "number"
},
"result": {
"$ref": "#/components/schemas/DatasetRestApi.post"
}
},
"type": "object"
}
}
},
"description": "Dataset added"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"422": {
"$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Create a new dataset",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/_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": []
}
],
"summary": "Get metadata information about this API resource",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/distinct/{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/DistincResponseSchema"
}
}
},
"description": "Distinct field data"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"404": {
"$ref": "#/components/responses/404"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Get distinct values from field data",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/duplicate": {
"post": {
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DatasetDuplicateSchema"
}
}
},
"description": "Dataset schema",
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "number"
},
"result": {
"$ref": "#/components/schemas/DatasetDuplicateSchema"
}
},
"type": "object"
}
}
},
"description": "Dataset duplicated"
},
"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": []
}
],
"summary": "Duplicate a dataset",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/export/": {
"get": {
"parameters": [
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/get_export_ids_schema"
}
}
},
"in": "query",
"name": "q"
}
],
"responses": {
"200": {
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
},
"description": "Dataset export"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"404": {
"$ref": "#/components/responses/404"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Download multiple datasets as YAML files",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/get_or_create/": {
"post": {
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetOrCreateDatasetSchema"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"result": {
"properties": {
"table_id": {
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
}
}
},
"description": "The ID of the table"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"422": {
"$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Retrieve a table by name, or create it if it does not exist",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/import/": {
"post": {
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"properties": {
"formData": {
"description": "upload file (ZIP or YAML)",
"format": "binary",
"type": "string"
},
"overwrite": {
"description": "overwrite existing datasets?",
"type": "boolean"
},
"passwords": {
"description": "JSON map of passwords for each featured database in the ZIP file. If the ZIP includes a database config in the path `databases/MyDatabase.yaml`, the password should be provided in the following format: `{\"databases/MyDatabase.yaml\": \"my_password\"}`.",
"type": "string"
},
"ssh_tunnel_passwords": {
"description": "JSON map of passwords for each ssh_tunnel associated to a featured database in the ZIP file. If the ZIP includes a ssh_tunnel config in the path `databases/MyDatabase.yaml`, the password should be provided in the following format: `{\"databases/MyDatabase.yaml\": \"my_password\"}`.",
"type": "string"
},
"ssh_tunnel_private_key_passwords": {
"description": "JSON map of private_key_passwords for each ssh_tunnel associated to a featured database in the ZIP file. If the ZIP includes a ssh_tunnel config in the path `databases/MyDatabase.yaml`, the private_key should be provided in the following format: `{\"databases/MyDatabase.yaml\": \"my_private_key_password\"}`.",
"type": "string"
},
"ssh_tunnel_private_keys": {
"description": "JSON map of private_keys for each ssh_tunnel associated to a featured database in the ZIP file. If the ZIP includes a ssh_tunnel config in the path `databases/MyDatabase.yaml`, the private_key should be provided in the following format: `{\"databases/MyDatabase.yaml\": \"my_private_key\"}`.",
"type": "string"
},
"sync_columns": {
"description": "sync columns?",
"type": "boolean"
},
"sync_metrics": {
"description": "sync metrics?",
"type": "boolean"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"message": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "Dataset import result"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"422": {
"$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Import dataset(s) with associated databases",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/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": []
}
],
"summary": "Get related fields data",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/warm_up_cache": {
"put": {
"description": "Warms up the cache for the table. Note for slices a force refresh occurs. In terms of the `extra_filters` these can be obtained from records in the JSON encoded `logs.json` column associated with the `explore_json` action.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DatasetCacheWarmUpRequestSchema"
}
}
},
"description": "Identifies the database and table to warm up cache for, and any additional dashboard or filter context to use.",
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DatasetCacheWarmUpResponseSchema"
}
}
},
"description": "Each chart's warmup status"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"$ref": "#/components/responses/404"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Warm up the cache for each chart powered by the given table",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/{pk}": {
"delete": {
"parameters": [
{
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"message": {
"type": "string"
}
},
"type": "object"
}
}
},
"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"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Delete a dataset",
"tags": [
"Datasets"
]
},
"get": {
"description": "Get a dataset by ID",
"parameters": [
{
"description": "The dataset ID",
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
},
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/get_item_schema"
}
}
},
"in": "query",
"name": "q"
},
{
"description": "Should Jinja macros from sql, metrics and columns be rendered and included in the response",
"in": "query",
"name": "include_rendered_sql",
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"description": "The item id",
"type": "string"
},
"result": {
"$ref": "#/components/schemas/DatasetRestApi.get"
}
},
"type": "object"
}
}
},
"description": "Dataset object has been returned."
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"422": {
"$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Get a dataset",
"tags": [
"Datasets"
]
},
"put": {
"parameters": [
{
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
},
{
"in": "query",
"name": "override_columns",
"schema": {
"type": "boolean"
}
}
],
"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"
}
}
},
"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": []
}
],
"summary": "Update a dataset",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/{pk}/column/{column_id}": {
"delete": {
"parameters": [
{
"description": "The dataset pk for this column",
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "The column id for this dataset",
"in": "path",
"name": "column_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"message": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "Column deleted"
},
"401": {
"$ref": "#/components/responses/401"
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"$ref": "#/components/responses/404"
},
"422": {
"$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Delete a dataset column",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/{pk}/drill_info/": {
"get": {
"parameters": [
{
"description": "The dataset ID",
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"result": {
"type": "object"
}
},
"type": "object"
}
}
},
"description": "Dataset drill info"
},
"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": []
}
],
"summary": "Get dataset drill info",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/{pk}/metric/{metric_id}": {
"delete": {
"parameters": [
{
"description": "The dataset pk for this column",
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "The metric id for this dataset",
"in": "path",
"name": "metric_id",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"message": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "Metric deleted"
},
"401": {
"$ref": "#/components/responses/401"
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"$ref": "#/components/responses/404"
},
"422": {
"$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Delete a dataset metric",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/{pk}/refresh": {
"put": {
"parameters": [
{
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"message": {
"type": "string"
}
},
"type": "object"
}
}
},
"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"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Refresh and update columns of a dataset",
"tags": [
"Datasets"
]
}
},
"/api/v1/dataset/{pk}/related_objects": {
"get": {
"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": []
}
],
"summary": "Get charts and dashboards count associated to a dataset",
"tags": [
"Datasets"
]
}
}
}\n