2220 lines
56 KiB
JSON
2220 lines
56 KiB
JSON
{
|
|
"/api/v1/dashboard/": {
|
|
"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": "Dashboard 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 dashboards",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Gets a list of dashboards, 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/DashboardRestApi.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 dashboards",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DashboardRestApi.post"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard schema",
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "number"
|
|
},
|
|
"result": {
|
|
"$ref": "#/components/schemas/DashboardRestApi.post"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard added"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Create a new dashboard",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/_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": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/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": "Dashboard export"
|
|
},
|
|
"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": "Download multiple dashboards as YAML files",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/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 dashboards for current user",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/import/": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"properties": {
|
|
"formData": {
|
|
"description": "upload file (ZIP or JSON)",
|
|
"format": "binary",
|
|
"type": "string"
|
|
},
|
|
"overwrite": {
|
|
"description": "overwrite existing dashboards?",
|
|
"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": "Dashboard 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 dashboard(s) with associated charts/datasets/databases",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/permalink/{key}": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "key",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"state": {
|
|
"description": "The stored state",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Returns the stored state."
|
|
},
|
|
"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": "Get dashboard's permanent link state",
|
|
"tags": [
|
|
"Dashboard Permanent Link"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/related/{column_name}": {
|
|
"get": {
|
|
"description": "Get a list of all possible owners for a dashboard.",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "column_name",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/get_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": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{id_or_slug}": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"description": "Either the id of the dashboard, or its slug",
|
|
"in": "path",
|
|
"name": "id_or_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"$ref": "#/components/schemas/DashboardGetResponseSchema"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/403"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Get a dashboard detail information",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{id_or_slug}/charts": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "id_or_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChartEntityResponseSchema"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard chart definitions"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/403"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Get a dashboard's chart definitions.",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{id_or_slug}/copy/": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"description": "The dashboard id or slug",
|
|
"in": "path",
|
|
"name": "id_or_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DashboardCopySchema"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "number"
|
|
},
|
|
"last_modified_time": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Id of new dashboard and last modified time"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/403"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Create a copy of an existing dashboard",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{id_or_slug}/datasets": {
|
|
"get": {
|
|
"description": "Returns a list of a dashboard's datasets. Each dataset includes only the information necessary to render the dashboard's charts.",
|
|
"parameters": [
|
|
{
|
|
"description": "Either the id of the dashboard, or its slug",
|
|
"in": "path",
|
|
"name": "id_or_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/DashboardDatasetSchema"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard dataset definitions"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/403"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Get dashboard's datasets",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{id_or_slug}/embedded": {
|
|
"delete": {
|
|
"parameters": [
|
|
{
|
|
"description": "The dashboard id or slug",
|
|
"in": "path",
|
|
"name": "id_or_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successfully removed the configuration"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Delete a dashboard's embedded configuration",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
},
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"description": "The dashboard id or slug",
|
|
"in": "path",
|
|
"name": "id_or_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"$ref": "#/components/schemas/EmbeddedDashboardResponseSchema"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Result contains the embedded dashboard config"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Get the dashboard's embedded configuration",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
},
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"description": "The dashboard id or slug",
|
|
"in": "path",
|
|
"name": "id_or_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmbeddedDashboardConfig"
|
|
}
|
|
}
|
|
},
|
|
"description": "The embedded configuration to set",
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"$ref": "#/components/schemas/EmbeddedDashboardResponseSchema"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successfully set the configuration"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Set a dashboard's embedded configuration",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Sets a dashboard's embedded configuration.",
|
|
"parameters": [
|
|
{
|
|
"description": "The dashboard id or slug",
|
|
"in": "path",
|
|
"name": "id_or_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmbeddedDashboardConfig"
|
|
}
|
|
}
|
|
},
|
|
"description": "The embedded configuration to set",
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"$ref": "#/components/schemas/EmbeddedDashboardResponseSchema"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Successfully set the configuration"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{id_or_slug}/tabs": {
|
|
"get": {
|
|
"description": "Returns a list of a dashboard's tabs and dashboard's nested tree structure for associated tabs.",
|
|
"parameters": [
|
|
{
|
|
"description": "Either the id of the dashboard, or its slug",
|
|
"in": "path",
|
|
"name": "id_or_slug",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/TabsPayloadSchema"
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard tabs"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/403"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Get dashboard's tabs",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{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": "Dashboard deleted"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/403"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Delete a dashboard",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
},
|
|
"put": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DashboardRestApi.put"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard schema",
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "number"
|
|
},
|
|
"last_modified_time": {
|
|
"type": "number"
|
|
},
|
|
"result": {
|
|
"$ref": "#/components/schemas/DashboardRestApi.put"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard 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 dashboard",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{pk}/cache_dashboard_screenshot/": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DashboardScreenshotPostSchema"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"202": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DashboardCacheScreenshotResponseSchema"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard async result"
|
|
},
|
|
"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": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{pk}/colors": {
|
|
"put": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "mark_updated",
|
|
"schema": {
|
|
"description": "Whether to update the dashboard changed_on field",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DashboardColorsConfigUpdateSchema"
|
|
}
|
|
}
|
|
},
|
|
"description": "Colors configuration",
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard colors updated"
|
|
},
|
|
"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 colors configuration for a dashboard.",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{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": "Dashboard removed from favorites"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Remove the dashboard from the user favorite list",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
},
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard added to favorites"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Mark the dashboard as favorite for the current user",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{pk}/filter_state": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "tab_id",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"examples": {
|
|
"numerical_range_filter": {
|
|
"description": "**This body should be stringified and put into the value field.**",
|
|
"summary": "Numerical Range Filter",
|
|
"value": {
|
|
"extraFormData": {
|
|
"filters": [
|
|
{
|
|
"col": "tz_offset",
|
|
"op": ">=",
|
|
"val": [
|
|
1000
|
|
]
|
|
},
|
|
{
|
|
"col": "tz_offset",
|
|
"op": "<=",
|
|
"val": [
|
|
2000
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"filterState": {
|
|
"label": "1000 <= x <= 2000",
|
|
"value": [
|
|
1000,
|
|
2000
|
|
]
|
|
},
|
|
"id": "NATIVE_FILTER_ID"
|
|
}
|
|
},
|
|
"time_grain_filter": {
|
|
"description": "**This body should be stringified and put into the value field.**",
|
|
"summary": "Time Grain Filter",
|
|
"value": {
|
|
"extraFormData": {
|
|
"time_grain_sqla": "P1W/1970-01-03T00:00:00Z"
|
|
},
|
|
"filterState": {
|
|
"label": "Week ending Saturday",
|
|
"value": [
|
|
"P1W/1970-01-03T00:00:00Z"
|
|
]
|
|
},
|
|
"id": "NATIVE_FILTER_ID"
|
|
}
|
|
},
|
|
"time_range_filter": {
|
|
"description": "**This body should be stringified and put into the value field.**",
|
|
"summary": "Time Range Filter",
|
|
"value": {
|
|
"extraFormData": {
|
|
"time_range": "DATEADD(DATETIME('2025-01-16T00:00:00'), -7, day) : 2025-01-16T00:00:00"
|
|
},
|
|
"filterState": {
|
|
"value": "DATEADD(DATETIME('2025-01-16T00:00:00'), -7, day) : 2025-01-16T00:00:00"
|
|
},
|
|
"id": "NATIVE_FILTER_ID"
|
|
}
|
|
},
|
|
"timecolumn_filter": {
|
|
"description": "**This body should be stringified and put into the value field.**",
|
|
"summary": "Time Column Filter",
|
|
"value": {
|
|
"extraFormData": {
|
|
"granularity_sqla": "order_date"
|
|
},
|
|
"filterState": {
|
|
"value": [
|
|
"order_date"
|
|
]
|
|
},
|
|
"id": "NATIVE_FILTER_ID"
|
|
}
|
|
},
|
|
"value_filter": {
|
|
"description": "**This body should be stringified and put into the value field.**",
|
|
"summary": "Value Filter",
|
|
"value": {
|
|
"extraFormData": {
|
|
"filters": [
|
|
{
|
|
"col": "real_name",
|
|
"op": "IN",
|
|
"val": [
|
|
"John Doe"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"filterState": {
|
|
"value": [
|
|
"John Doe"
|
|
]
|
|
},
|
|
"id": "NATIVE_FILTER_ID"
|
|
}
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TemporaryCachePostSchema"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"key": {
|
|
"description": "The key to retrieve the value.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "The value was stored successfully."
|
|
},
|
|
"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 dashboard's filter state",
|
|
"tags": [
|
|
"Dashboard Filter State"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{pk}/filter_state/{key}": {
|
|
"delete": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"description": "The value key.",
|
|
"in": "path",
|
|
"name": "key",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"description": "The result of the operation",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Deleted the stored value."
|
|
},
|
|
"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": "Delete a dashboard's filter state value",
|
|
"tags": [
|
|
"Dashboard Filter State"
|
|
]
|
|
},
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "key",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"value": {
|
|
"description": "The stored value",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Returns the stored value."
|
|
},
|
|
"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": "Get a dashboard's filter state value",
|
|
"tags": [
|
|
"Dashboard Filter State"
|
|
]
|
|
},
|
|
"put": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "key",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "tab_id",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TemporaryCachePutSchema"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"key": {
|
|
"description": "The key to retrieve the value.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "The value was stored successfully."
|
|
},
|
|
"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": "Update a dashboard's filter state value",
|
|
"tags": [
|
|
"Dashboard Filter State"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{pk}/filters": {
|
|
"put": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DashboardNativeFiltersConfigUpdateSchema"
|
|
}
|
|
}
|
|
},
|
|
"description": "Native filters configuration",
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard native filters updated"
|
|
},
|
|
"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 native filters configuration for a dashboard.",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{pk}/permalink": {
|
|
"post": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"examples": {
|
|
"numerical_range_filter": {
|
|
"summary": "Numerical Range Filter",
|
|
"value": {
|
|
"dataMask": {
|
|
"extraFormData": {
|
|
"filters": [
|
|
{
|
|
"col": "tz_offset",
|
|
"op": ">=",
|
|
"val": [
|
|
1000
|
|
]
|
|
},
|
|
{
|
|
"col": "tz_offset",
|
|
"op": "<=",
|
|
"val": [
|
|
2000
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"filterState": {
|
|
"label": "1000 <= x <= 200",
|
|
"value": [
|
|
1000,
|
|
2000
|
|
]
|
|
},
|
|
"id": "NATIVE_FILTER_ID"
|
|
}
|
|
}
|
|
},
|
|
"time_grain_filter": {
|
|
"summary": "Time Grain Filter",
|
|
"value": {
|
|
"dataMask": {
|
|
"extraFormData": {
|
|
"time_grain_sqla": "P1W/1970-01-03T00:00:00Z"
|
|
},
|
|
"filterState": {
|
|
"label": "Week ending Saturday",
|
|
"value": [
|
|
"P1W/1970-01-03T00:00:00Z"
|
|
]
|
|
},
|
|
"id": "NATIVE_FILTER_ID"
|
|
}
|
|
}
|
|
},
|
|
"time_range_filter": {
|
|
"summary": "Time Range Filter",
|
|
"value": {
|
|
"dataMask": {
|
|
"extraFormData": {
|
|
"time_range": "DATEADD(DATETIME(\"2025-01-16T00:00:00\"), -7, day) : 2025-01-16T00:00:00"
|
|
},
|
|
"filterState": {
|
|
"value": "DATEADD(DATETIME(\"2025-01-16T00:00:00\"), -7, day) : 2025-01-16T00:00:00"
|
|
},
|
|
"id": "NATIVE_FILTER_ID"
|
|
}
|
|
}
|
|
},
|
|
"timecolumn_filter": {
|
|
"summary": "Time Column Filter",
|
|
"value": {
|
|
"dataMask": {
|
|
"extraFormData": {
|
|
"granularity_sqla": "order_date"
|
|
},
|
|
"filterState": {
|
|
"value": [
|
|
"order_date"
|
|
]
|
|
},
|
|
"id": "NATIVE_FILTER_ID"
|
|
}
|
|
}
|
|
},
|
|
"value_filter": {
|
|
"summary": "Value Filter",
|
|
"value": {
|
|
"dataMask": {
|
|
"extraFormData": {
|
|
"filters": [
|
|
{
|
|
"col": "real_name",
|
|
"op": "IN",
|
|
"val": [
|
|
"John Doe"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"filterState": {
|
|
"value": [
|
|
"John Doe"
|
|
]
|
|
},
|
|
"id": "NATIVE_FILTER_ID"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DashboardPermalinkStateSchema"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"key": {
|
|
"description": "The key to retrieve the permanent link data.",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"description": "permanent link.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "The permanent link was stored successfully."
|
|
},
|
|
"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 dashboard's permanent link",
|
|
"tags": [
|
|
"Dashboard Permanent Link"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{pk}/screenshot/{digest}/": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"in": "path",
|
|
"name": "digest",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "download_format",
|
|
"schema": {
|
|
"enum": [
|
|
"png",
|
|
"pdf"
|
|
],
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"image/*": {
|
|
"schema": {
|
|
"format": "binary",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard thumbnail 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": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/dashboard/{pk}/thumbnail/{digest}/": {
|
|
"get": {
|
|
"description": "Computes async or get already computed dashboard thumbnail from cache.",
|
|
"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"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"image/*": {
|
|
"schema": {
|
|
"format": "binary",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dashboard thumbnail image"
|
|
},
|
|
"202": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Thumbnail does not exist on cache, fired async to compute"
|
|
},
|
|
"302": {
|
|
"description": "Redirects to the current digest"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Get dashboard's thumbnail",
|
|
"tags": [
|
|
"Dashboards"
|
|
]
|
|
}
|
|
}
|
|
}\n |