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

1244 lines
31 KiB
JSON

{
"/api/v1/chart/": {
"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": "Charts bulk 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": "Bulk delete charts",
"tags": [
"Charts"
]
},
"get": {
"description": "Gets a list of charts, 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/ChartRestApi.get_list"
},
"type": "array"
}
},
"type": "object"
}
}
},
"description": "Items from Model"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"422": {
"$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Get a list of charts",
"tags": [
"Charts"
]
},
"post": {
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChartRestApi.post"
}
}
},
"description": "Chart schema",
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "number"
},
"result": {
"$ref": "#/components/schemas/ChartRestApi.post"
}
},
"type": "object"
}
}
},
"description": "Chart added"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"403": {
"$ref": "#/components/responses/403"
},
"422": {
"$ref": "#/components/responses/422"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Create a new chart",
"tags": [
"Charts"
]
}
},
"/api/v1/chart/_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": [
"Charts"
]
}
},
"/api/v1/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"
}
}
},
"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"
}
}
},
"description": "Query result"
},
"202": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChartDataAsyncResponseSchema"
}
}
},
"description": "Async job details"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Return payload data response for the given query",
"tags": [
"Charts"
]
}
},
"/api/v1/chart/data/{cache_key}": {
"get": {
"description": "Takes a query context cache key and returns payload data response for the given query.",
"parameters": [
{
"in": "path",
"name": "cache_key",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChartDataResponseSchema"
}
}
},
"description": "Query result"
},
"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": []
}
],
"summary": "Return payload data response for the given query",
"tags": [
"Charts"
]
}
},
"/api/v1/chart/export/": {
"get": {
"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 chart(s), dataset(s) and database(s) as YAML"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"404": {
"$ref": "#/components/responses/404"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Download multiple charts as YAML files",
"tags": [
"Charts"
]
}
},
"/api/v1/chart/favorite_status/": {
"get": {
"parameters": [
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/get_fav_star_ids_schema"
}
}
},
"in": "query",
"name": "q"
}
],
"responses": {
"200": {
"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": []
}
],
"summary": "Check favorited charts for current user",
"tags": [
"Charts"
]
}
},
"/api/v1/chart/import/": {
"post": {
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"properties": {
"formData": {
"description": "upload file (ZIP)",
"format": "binary",
"type": "string"
},
"overwrite": {
"description": "overwrite existing charts?",
"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"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"message": {
"type": "string"
}
},
"type": "object"
}
}
},
"description": "Chart 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 chart(s) with associated datasets and databases",
"tags": [
"Charts"
]
}
},
"/api/v1/chart/related/{column_name}": {
"get": {
"description": "Get a list of all possible owners for a chart. Use `owners` has the `column_name` parameter",
"parameters": [
{
"in": "path",
"name": "column_name",
"required": true,
"schema": {
"type": "string"
}
},
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/get_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": [
"Charts"
]
}
},
"/api/v1/chart/warm_up_cache": {
"put": {
"description": "Warms up the cache for the chart. 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/ChartCacheWarmUpRequestSchema"
}
}
},
"description": "Identifies the chart 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/ChartCacheWarmUpResponseSchema"
}
}
},
"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 the chart",
"tags": [
"Charts"
]
}
},
"/api/v1/chart/{id_or_uuid}": {
"get": {
"description": "Get a chart",
"parameters": [
{
"description": "Either the id of the chart, or its uuid",
"in": "path",
"name": "id_or_uuid",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"result": {
"$ref": "#/components/schemas/ChartGetResponseSchema"
}
},
"type": "object"
}
}
},
"description": "Chart"
},
"302": {
"description": "Redirects to the current digest"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"404": {
"$ref": "#/components/responses/404"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Get a chart detail information",
"tags": [
"Charts"
]
}
},
"/api/v1/chart/{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": "Chart 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 chart",
"tags": [
"Charts"
]
},
"put": {
"parameters": [
{
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChartRestApi.put"
}
}
},
"description": "Chart schema",
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "number"
},
"result": {
"$ref": "#/components/schemas/ChartRestApi.put"
}
},
"type": "object"
}
}
},
"description": "Chart 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 chart",
"tags": [
"Charts"
]
}
},
"/api/v1/chart/{pk}/cache_screenshot/": {
"get": {
"parameters": [
{
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
},
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/screenshot_query_schema"
}
}
},
"in": "query",
"name": "q"
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChartCacheScreenshotResponseSchema"
}
}
},
"description": "Chart async result"
},
"202": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChartCacheScreenshotResponseSchema"
}
}
},
"description": "Chart screenshot task created"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"404": {
"$ref": "#/components/responses/404"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Compute and cache a screenshot",
"tags": [
"Charts"
]
}
},
"/api/v1/chart/{pk}/data/": {
"get": {
"description": "Takes a chart ID and uses the query context stored when the chart was saved to return payload data response.",
"parameters": [
{
"description": "The chart ID",
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
},
{
"description": "The format in which the data should be returned",
"in": "query",
"name": "format",
"schema": {
"type": "string"
}
},
{
"description": "The type in which the data should be returned",
"in": "query",
"name": "type",
"schema": {
"type": "string"
}
},
{
"description": "Should the queries be forced to load from the source",
"in": "query",
"name": "force",
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChartDataResponseSchema"
}
}
},
"description": "Query result"
},
"202": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChartDataAsyncResponseSchema"
}
}
},
"description": "Async job details"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Return payload data response for a chart",
"tags": [
"Charts"
]
}
},
"/api/v1/chart/{pk}/favorites/": {
"delete": {
"parameters": [
{
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"result": {
"type": "object"
}
},
"type": "object"
}
}
},
"description": "Chart removed from favorites"
},
"401": {
"$ref": "#/components/responses/401"
},
"404": {
"$ref": "#/components/responses/404"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Remove the chart from the user favorite list",
"tags": [
"Charts"
]
},
"post": {
"parameters": [
{
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"result": {
"type": "object"
}
},
"type": "object"
}
}
},
"description": "Chart added to favorites"
},
"401": {
"$ref": "#/components/responses/401"
},
"404": {
"$ref": "#/components/responses/404"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Mark the chart as favorite for the current user",
"tags": [
"Charts"
]
}
},
"/api/v1/chart/{pk}/screenshot/{digest}/": {
"get": {
"parameters": [
{
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
},
{
"in": "path",
"name": "digest",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"image/*": {
"schema": {
"format": "binary",
"type": "string"
}
}
},
"description": "Chart screenshot image"
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"404": {
"$ref": "#/components/responses/404"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Get a computed screenshot from cache",
"tags": [
"Charts"
]
}
},
"/api/v1/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 hex digest that makes this chart unique",
"in": "path",
"name": "digest",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"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"
}
},
"security": [
{
"jwt": []
}
],
"summary": "Get chart thumbnail",
"tags": [
"Charts"
]
}
}
}\n