diff --git a/_docs/v0.57/api.html b/_docs/v0.57/api.html index 7a1b57bd4..8a214c995 100644 --- a/_docs/v0.57/api.html +++ b/_docs/v0.57/api.html @@ -1415,10 +1415,134 @@ }, "required" : [ "id", "type", "name" ] }, + "metabase-enterprise.metabot-v3.tools.api.basic-snippet" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name" ] + }, + "metabase-enterprise.metabot-v3.tools.api.basic-transform" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "entity_id" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "source" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.transforms.transform-source" + }, + "type" : { + "type" : "string", + "enum" : [ "mbql", "native", "python" ] + } + }, + "required" : [ "id", "name", "type", "source" ] + }, + "metabase-enterprise.metabot-v3.tools.api.broken-question" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name" ] + }, + "metabase-enterprise.metabot-v3.tools.api.broken-transform" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name" ] + }, "metabase-enterprise.metabot-v3.tools.api.bucket" : { "type" : "string", "enum" : [ "millisecond", "second", "minute", "hour", "day", "week", "month", "quarter", "year", "second-of-minute", "minute-of-hour", "hour-of-day", "day-of-week", "day-of-month", "day-of-year", "week-of-year", "month-of-year", "quarter-of-year", "year-of-era" ] }, + "metabase-enterprise.metabot-v3.tools.api.check-transform-dependencies-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "source" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.transforms.transform-source" + }, + "transform_id" : { + "type" : "integer" + } + }, + "required" : [ "transform_id", "source" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.check-transform-dependencies-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "object", + "properties" : { + "bad_question_count" : { + "type" : "integer" + }, + "bad_questions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.broken-question" + } + }, + "bad_transform_count" : { + "type" : "integer" + }, + "bad_transforms" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.broken-transform" + } + }, + "success" : { + "type" : "boolean" + } + }, + "required" : [ "success", "bad_transform_count", "bad_transforms", "bad_question_count", "bad_questions" ] + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, "metabase-enterprise.metabot-v3.tools.api.column" : { "type" : "object", "properties" : { @@ -1937,6 +2061,60 @@ }, "required" : [ "id", "type", "name" ] }, + "metabase-enterprise.metabot-v3.tools.api.full-snippet" : { + "type" : "object", + "properties" : { + "content" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name", "content" ] + }, + "metabase-enterprise.metabot-v3.tools.api.full-transform" : { + "type" : "object", + "properties" : { + "entity_id" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "updated_at" : { + "description" : "value must be a valid date string", + "type" : "string" + }, + "source" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.transforms.transform-source" + }, + "type" : { + "type" : "string", + "enum" : [ "mbql", "native", "python" ] + }, + "target" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.transforms.transform-target" + }, + "created_at" : { + "description" : "value must be a valid date string", + "type" : "string" + }, + "description" : { + "type" : "string" + } + }, + "required" : [ "id", "name", "type", "source", "created_at", "updated_at", "target" ] + }, "metabase-enterprise.metabot-v3.tools.api.generate-insights-arguments" : { "type" : "object", "properties" : { @@ -1989,6 +2167,12 @@ "email_address" : { "type" : "string" }, + "glossary" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, "id" : { "type" : "integer" }, @@ -2237,6 +2421,43 @@ "required" : [ "output" ] } ] }, + "metabase-enterprise.metabot-v3.tools.api.get-snippet-details-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "snippet_id" : { + "type" : "integer" + } + }, + "required" : [ "snippet_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-snippet-details-result" : { + "description" : "Schema for SQL snippet detail results", + "type" : "object", + "properties" : { + "structured_output" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.full-snippet" + } + }, + "required" : [ "structured_output" ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-snippets-result" : { + "description" : "Schema for SQL snippet list results", + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.basic-snippet" + } + } + }, + "required" : [ "structured_output" ] + }, "metabase-enterprise.metabot-v3.tools.api.get-table-details-arguments" : { "allOf" : [ { "type" : "object", @@ -2389,66 +2610,174 @@ "required" : [ "output" ] } ] }, - "metabase-enterprise.metabot-v3.tools.api.group-by" : { + "metabase-enterprise.metabot-v3.tools.api.get-transform-details-arguments" : { "allOf" : [ { "type" : "object", "properties" : { - "field_granularity" : { - "type" : "string", - "enum" : [ "day", "week", "month", "quarter", "year" ] - }, - "field_id" : { - "type" : "string" + "transform_id" : { + "type" : "integer" } }, - "required" : [ "field_id" ] + "required" : [ "transform_id" ] }, { "type" : "object", "properties" : { } } ] }, - "metabase-enterprise.metabot-v3.tools.api.numeric-filter" : { + "metabase-enterprise.metabot-v3.tools.api.get-transform-details-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.full-transform" + } + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-transform-python-library-details-arguments" : { "allOf" : [ { "type" : "object", "properties" : { - "field_id" : { + "path" : { "type" : "string" - }, - "operation" : { - "type" : "string", - "enum" : [ "equals", "not-equals", "greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal", "number-equals", "number-not-equals", "number-greater-than", "number-greater-than-or-equal", "number-less-than", "number-less-than-or-equal" ] - }, - "value" : { - "anyOf" : [ { - "type" : "integer" - }, { - "type" : "number" - } ] } }, - "required" : [ "field_id", "operation", "value" ] + "required" : [ "path" ] }, { "type" : "object", "properties" : { } } ] }, - "metabase-enterprise.metabot-v3.tools.api.proportion" : { - "type" : "number" + "metabase-enterprise.metabot-v3.tools.api.get-transform-python-library-details-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "object", + "properties" : { + "created_at" : { + "description" : "value must be a valid date string", + "type" : "string" + }, + "path" : { + "type" : "string" + }, + "source" : { + "type" : "string" + }, + "updated_at" : { + "description" : "value must be a valid date string", + "type" : "string" + } + }, + "required" : [ "source", "path", "created_at", "updated_at" ] + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] }, - "metabase-enterprise.metabot-v3.tools.api.query-datasource-arguments" : { - "allOf" : [ { + "metabase-enterprise.metabot-v3.tools.api.get-transforms-result" : { + "anyOf" : [ { "type" : "object", "properties" : { - "aggregations" : { + "structured_output" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.aggregation" + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.basic-transform" } - }, - "fields" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field" + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.group-by" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "field_granularity" : { + "type" : "string", + "enum" : [ "day", "week", "month", "quarter", "year" ] + }, + "field_id" : { + "type" : "string" + } + }, + "required" : [ "field_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.numeric-filter" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "field_id" : { + "type" : "string" + }, + "operation" : { + "type" : "string", + "enum" : [ "equals", "not-equals", "greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal", "number-equals", "number-not-equals", "number-greater-than", "number-greater-than-or-equal", "number-less-than", "number-less-than-or-equal" ] + }, + "value" : { + "anyOf" : [ { + "type" : "integer" + }, { + "type" : "number" + } ] + } + }, + "required" : [ "field_id", "operation", "value" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.proportion" : { + "type" : "number" + }, + "metabase-enterprise.metabot-v3.tools.api.query-datasource-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "aggregations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.aggregation" + } + }, + "fields" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field" } }, "filters" : { @@ -2592,7 +2921,7 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "table", "model", "question", "dashboard", "metric", "database" ] + "enum" : [ "table", "model", "question", "dashboard", "metric", "database", "transform" ] } }, "last_edited_at" : { @@ -2603,6 +2932,10 @@ "default" : 50, "type" : "integer" }, + "search_native_query" : { + "type" : "boolean", + "default" : false + }, "semantic_queries" : { "type" : "array", "items" : { @@ -2687,7 +3020,7 @@ }, "type" : { "type" : "string", - "enum" : [ "table", "model", "dashboard", "question", "metric", "database" ] + "enum" : [ "table", "model", "dashboard", "question", "metric", "database", "transform" ] }, "database_schema" : { "type" : "string" @@ -2833,7 +3166,47 @@ } ] }, "metabase-enterprise.metabot-v3.tools.api.table-result" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.table-result" + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "database_id" : { + "type" : "integer" + }, + "related_tables" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.table-result" + } + }, + "display_name" : { + "type" : "string" + }, + "type" : { + "type" : "string", + "enum" : [ "model", "table" ] + }, + "fields" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.columns" + }, + "database_schema" : { + "type" : "string" + }, + "metrics" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.basic-metric" + } + }, + "description" : { + "type" : "string" + } + }, + "required" : [ "id", "type", "name", "display_name", "database_id", "fields" ] }, "metabase-enterprise.metabot-v3.tools.api.temporal-extraction-filter" : { "allOf" : [ { @@ -2895,6 +3268,12 @@ }, "required" : [ "conversation_id" ] }, + "metabase-enterprise.metabot-v3.tools.transforms.transform-source" : { + "$ref" : "#/components/schemas/metabase-enterprise.transforms.api.transform-source" + }, + "metabase-enterprise.metabot-v3.tools.transforms.transform-target" : { + "$ref" : "#/components/schemas/metabase-enterprise.transforms.api.transform-target" + }, "metabase-enterprise.permission-debug.impl.group-id" : { "type" : "integer" }, @@ -2939,6 +3318,21 @@ }, "required" : [ "model-type", "model-id", "decision", "segment", "message", "data", "suggestions" ] }, + "metabase-enterprise.sandbox.schema.attribute-remappings" : { + "type" : "object", + "additionalProperties" : { + "anyOf" : [ { + "type" : "string", + "minLength" : 1 + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.target" + } ] + }, + "description" : "value must be a valid attribute remappings map (attribute name -> remapped name)", + "optional" : true + }, "metabase-enterprise.transforms.api.run-trigger" : { "type" : "string", "enum" : [ "none", "global-schedule" ] @@ -2948,13 +3342,7 @@ "type" : "object", "properties" : { "query" : { - "type" : "object", - "properties" : { - "database" : { - "type" : "integer" - } - }, - "required" : [ "database" ] + "$ref" : "#/components/schemas/metabase.queries.schema.query" }, "type" : { "const" : "query" @@ -3601,102 +3989,268 @@ "required" : [ "moved" ] }, "metabase.legacy-mbql.schema.!=" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :!= clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.*" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :* clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.+" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :+ clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.-" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :- clause", "allOf" : [ ] }, - "metabase.legacy-mbql.schema..expression.options" : { - "description" : "Options for a legacy `:expression` ref in MBQL 4 are the same as in MBQL 5, except that `:lib/uuid` is optional and\n it cannot be empty.", - "default" : { }, + "metabase.legacy-mbql.schema..NativeQuery.Common" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "collection" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "template-tags" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagMap" + } + } + }, { + "allOf" : [ ] + } ] + }, + "metabase.legacy-mbql.schema..TemplateTag.Common" : { + "description" : "Things required by all template tag types.", "type" : "object", "properties" : { - "base-type" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "database-type" : { + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" + }, + "name" : { "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, + "type" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagType" + } + }, + "required" : [ "type", "name", "display-name" ] + }, + "metabase.legacy-mbql.schema..TemplateTag.FieldFilter" : { + "description" : "Things required by all template tag types.", + "type" : "object", + "properties" : { "display-name" : { "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "effective-type" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" - }, - "lib/uuid" : { - "type" : "string", - "minLength" : 36, - "maxLength" : 36 + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" }, "name" : { "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "semantic-type" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + "required" : { + "type" : "boolean" }, - "temporal-unit" : { - "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + "type" : { + "const" : "dimension" + }, + "alias" : { + "type" : "string" + }, + "options" : { + "type" : "object", + "additionalProperties" : { }, + "description" : "optional map to be appended to filter clause" + }, + "dimension" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" + }, + "default" : { }, + "widget-type" : { + "default" : "category", + "description" : "which type of widget the frontend should show for this Field Filter; this also affects which parameter types\n are allowed to be specified for it.", + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.WidgetType" } - } + }, + "required" : [ "type", "name", "display-name", "dimension", "widget-type" ] }, - "metabase.legacy-mbql.schema..legacy-column-metadata.binning-info" : { + "metabase.legacy-mbql.schema..TemplateTag.RawValue" : { + "description" : "Things required by all template tag types.", "type" : "object", "properties" : { - "bin_width" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + "default" : { }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "binning_strategy" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" }, - "num_bins" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "strategy" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + "required" : { + "type" : "boolean" + }, + "type" : { + "type" : "string", + "enum" : [ "date", "number", "boolean", "text" ] } }, - "required" : [ "strategy" ] + "required" : [ "type", "name", "display-name" ] }, - "metabase.legacy-mbql.schema..legacy-column-metadata.qualified-keys" : { + "metabase.legacy-mbql.schema..TemplateTag.Snippet" : { + "description" : "Things required by all template tag types.", "type" : "object", "properties" : { - "lib/external-remap" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" - }, - "lib/source-column-alias" : { - "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", - "type" : "string" + "database" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.database" }, - "lib/type" : { - "default" : "metadata/column", - "const" : "metadata/column" + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "lib/source-uuid" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" }, - "qp/implicit-field?" : { - "type" : "boolean" + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "lib/ref-name" : { - "type" : "string" + "snippet-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.snippet" }, - "lib/deduplicated-name" : { - "type" : "string", - "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name." + "snippet-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "lib/original-expression-name" : { - "type" : "string", - "minLength" : 1 + "type" : { + "const" : "snippet" + } + }, + "required" : [ "type", "name", "display-name", "snippet-name", "snippet-id" ] + }, + "metabase.legacy-mbql.schema..TemplateTag.SourceQuery" : { + "description" : "Things required by all template tag types.", + "type" : "object", + "properties" : { + "card-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "type" : { + "const" : "card" + } + }, + "required" : [ "type", "name", "display-name", "card-id" ] + }, + "metabase.legacy-mbql.schema..TemplateTag.TemporalUnit" : { + "description" : "Things required by all template tag types.", + "type" : "object", + "properties" : { + "alias" : { + "type" : "string" + }, + "default" : { }, + "dimension" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "required" : { + "type" : "boolean" + }, + "type" : { + "const" : "temporal-unit" + } + }, + "required" : [ "type", "name", "display-name", "dimension" ] + }, + "metabase.legacy-mbql.schema..TemplateTag.Value.Common" : { + "description" : "Things required by all template tag types.", + "type" : "object", + "properties" : { + "default" : { }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "required" : { + "type" : "boolean" + }, + "type" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagType" + } + }, + "required" : [ "type", "name", "display-name" ] + }, + "metabase.legacy-mbql.schema..legacy-column-metadata.binning-info" : { + "type" : "object", + "properties" : { + "bin_width" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + }, + "binning_strategy" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + }, + "num_bins" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + }, + "strategy" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + } + }, + "required" : [ "strategy" ] + }, + "metabase.legacy-mbql.schema..legacy-column-metadata.qualified-keys" : { + "type" : "object", + "properties" : { + "lib/external-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" + }, + "lib/source-column-alias" : { + "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", + "type" : "string" + }, + "lib/type" : { + "default" : "metadata/column", + "const" : "metadata/column" + }, + "lib/source-uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "qp/implicit-field?" : { + "type" : "boolean" + }, + "lib/ref-name" : { + "type" : "string" + }, + "lib/deduplicated-name" : { + "type" : "string", + "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name." + }, + "lib/original-expression-name" : { + "type" : "string", + "minLength" : 1 }, "lib/card-id" : { "description" : "Valid Card ID", @@ -3836,45 +4390,73 @@ } }, "metabase.legacy-mbql.schema./" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :/ clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.<" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :< clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.<=" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :<= clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.=" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 := clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.>" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :> clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.>=" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :>= clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.Addable" : { "anyOf" : [ { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DateTimeExpressionArg" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpressionArg" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.interval" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DateTimeExpressionArg" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpressionArg" + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.interval" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.segment" + } ] } ] }, "metabase.legacy-mbql.schema.Aggregation" : { + "description" : "Schema for anything that is a valid `:aggregation` clause.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.aggregation-options" }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.UnnamedAggregation" } ] }, + "metabase.legacy-mbql.schema.AggregationOptionsOptions" : { + "description" : "Additional options for any aggregation clause when wrapping it in `:aggregation-options`.", + "type" : "object", + "properties" : { + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + } + } + }, + "metabase.legacy-mbql.schema.Aggregations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregation" + }, + "minItems" : 1 + }, + "metabase.legacy-mbql.schema.ArithmeticDateTimeUnit" : { + "type" : "string", + "enum" : [ "millisecond", "second", "minute", "hour", "day", "week", "month", "quarter", "year" ] + }, "metabase.legacy-mbql.schema.BooleanExpression" : { "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.and" @@ -3926,6 +4508,42 @@ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.during" } ] }, + "metabase.legacy-mbql.schema.Breakouts" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" + }, + "minItems" : 1 + }, + "metabase.legacy-mbql.schema.CaseOptions" : { + "type" : "object", + "properties" : { + "default" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ExpressionArg" + } + } + }, + "metabase.legacy-mbql.schema.CaseSubclause" : { + "type" : "array", + "prefixItems" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Filter" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ExpressionArg" + } ] + }, + "metabase.legacy-mbql.schema.CaseSubclauses" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.CaseSubclause" + }, + "minItems" : 1 + }, + "metabase.legacy-mbql.schema.CheckKeysForQueryType" : { + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.CheckQueryDoesNotHaveSourceMetadata" : { + "description" : "`:source-metadata` is added to queries when `card__id` source queries are resolved. It contains info about the\n columns in the source query.\n\n Where this is added was changed in Metabase 0.33.0 -- previously, when `card__id` source queries were resolved, the\n middleware would add `:source-metadata` to the top-level; to support joins against source queries, this has been\n changed so it is always added at the same level the resolved `:source-query` is added.\n\n This should automatically be fixed by `normalize`; if we encounter it, it means some middleware is not functioning\n properly." + }, "metabase.legacy-mbql.schema.DatabaseID" : { "description" : "Schema for a valid `:database` ID, in the top-level 'outer' query. Either a positive integer (referring to an\n actual Database), or the saved questions virtual ID, which is a placeholder used for queries using the\n `:source-table \"card__id\"` shorthand for a source query resolved by middleware (since clients might not know the\n actual DB for that source query.)", "anyOf" : [ { @@ -3957,7 +4575,7 @@ "anyOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DateOrDatetimeLiteral" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" } ] } ] }, @@ -3977,6 +4595,7 @@ "enum" : [ "second", "minute", "hour", "day", "week", "month", "quarter", "year" ] }, "metabase.legacy-mbql.schema.DatetimeExpression" : { + "description" : "Schema for the definition of a date function expression.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.+" }, { @@ -3995,11 +4614,24 @@ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.today" } ] }, + "metabase.legacy-mbql.schema.DatetimeOptions" : { + "type" : "object", + "properties" : { + "mode" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatetimeOptionsMode" + } + } + }, + "metabase.legacy-mbql.schema.DatetimeOptionsMode" : { + "type" : "string", + "enum" : [ "simple-bytes", "unix-nanoseconds", "simple", "iso", "iso-bytes", "unix-seconds", "unix-milliseconds", "unix-microseconds" ] + }, "metabase.legacy-mbql.schema.Emptyable" : { + "description" : "Schema for a valid is-empty or not-empty argument.", "anyOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.StringExpressionArg" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" } ] }, "metabase.legacy-mbql.schema.EqualityComparable" : { @@ -4012,18 +4644,19 @@ }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemporalLiteral" }, { - "oneOf" : [ { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.relative-datetime" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" - } ] + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRefOrRelativeDatetime" }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ExpressionArg" }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" } ], + "description" : "Schema for things that make sense in a `=` or `!=` filter, i.e. things that can be compared for equality.", "optional" : true }, + "metabase.legacy-mbql.schema.EqualityFilterFieldArg" : { + "description" : "Schema for the first arg to `=`, `!=`, and friends.", + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.EqualityComparable" + }, "metabase.legacy-mbql.schema.ExpressionArg" : { "oneOf" : [ { "type" : "number" @@ -4044,15 +4677,93 @@ }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" } ] }, + "metabase.legacy-mbql.schema.ExpressionName" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "metabase.legacy-mbql.schema.ExpressionRefOptions" : { + "description" : "Options for a legacy `:expression` ref in MBQL 4 are the same as in MBQL 5, except that `:lib/uuid` is optional and\n it cannot be empty.", + "default" : { }, + "type" : "object", + "properties" : { + "base-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "database-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "effective-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/uuid" : { + "type" : "string", + "minLength" : 36, + "maxLength" : 36 + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "semantic-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + }, + "temporal-unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + } + } + }, + "metabase.legacy-mbql.schema.Expressions" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionDef" + } + }, "metabase.legacy-mbql.schema.ExtractWeekMode" : { "description" : "Valid modes to extract weeks.", "type" : "string", "enum" : [ "iso", "us", "instance" ] }, - "metabase.legacy-mbql.schema.FieldOptions" : { + "metabase.legacy-mbql.schema.FieldOrExpressionDef" : { + "description" : "Schema for anything that is accepted as a top-level expression definition, either an arithmetic expression such as a\n `:+` clause or a `:field` or `:value` clause.", + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.StringExpression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.BooleanExpression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatetimeExpression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.case" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.if" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.offset" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" + } ] + }, + "metabase.legacy-mbql.schema.FieldOrExpressionRef" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.expression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" + } ] + }, + "metabase.legacy-mbql.schema.FieldOrExpressionRefOrRelativeDatetime" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.relative-datetime" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" + } ] + }, + "metabase.legacy-mbql.schema.FieldRefOptions" : { "default" : { }, "type" : "object", "properties" : { @@ -4113,33 +4824,11 @@ "description" : "Options for an MBQL 4 `:field` ref are the same as MBQL 5, except that `:lib/uuid` is not required and it cannot be\n empty.", "optional" : true }, - "metabase.legacy-mbql.schema.FieldOrExpressionDef" : { - "description" : "Schema for anything that is accepted as a top-level expression definition, either an arithmetic expression such as a\n `:+` clause or a `:field` or `:value` clause.", - "oneOf" : [ { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpression" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.StringExpression" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.BooleanExpression" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatetimeExpression" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.case" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.if" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.offset" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" - } ] - }, "metabase.legacy-mbql.schema.Fields" : { "allOf" : [ { "type" : "array", "items" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" }, "minItems" : 1 }, { @@ -4147,6 +4836,7 @@ } ] }, "metabase.legacy-mbql.schema.Filter" : { + "description" : "Schema for a valid MBQL `:filter` clause.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatetimeExpression" }, { @@ -4160,7 +4850,7 @@ }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.segment" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" } ] }, "metabase.legacy-mbql.schema.IntGreaterThanZeroOrNumericExpression" : { @@ -4186,12 +4876,7 @@ }, "fields" : { "description" : "The Fields from this join to include in parent-level results. This can be either `:none`, `:all`, or a sequence\n of `:field` clauses.\n\n * `:none`: no Fields from the joined table or nested query are included (unless indirectly included by breakouts or\n other clauses). This is the default, and what is used for automatically-generated joins.\n\n * `:all`: will include all of the Field from the joined table or query\n\n * a sequence of Field clauses: include only the Fields specified. Valid clauses are the same as the top-level\n `:fields` clause. This should be non-empty and all elements should be distinct. The normalizer will automatically\n remove duplicate fields for you, and replace empty clauses with `:none`.\n\n Driver implementations: you can ignore this clause. Relevant fields will be added to top-level `:fields` clause with\n appropriate aliases.", - "anyOf" : [ { - "type" : "string", - "enum" : [ "all", "none" ] - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Fields" - } ] + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.JoinFields" }, "fk-field-id" : { "$ref" : "#/components/schemas/metabase.lib.schema.id.field", @@ -4209,18 +4894,11 @@ }, "source-table" : { "description" : "*What* to JOIN. Self-joins can be done by using the same `:source-table` as in the query where\n this is specified. YOU MUST SUPPLY EITHER `:source-table` OR `:source-query`, BUT NOT BOTH!", - "anyOf" : [ { - "$ref" : "#/components/schemas/metabase.lib.schema.id.table" - }, { - "description" : "`card__` string Table ID", - "type" : "string", - "pattern" : "^card__[1-9]\\d*$" - } ] + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.SourceTable" }, "strategy" : { "description" : "Defaults to `:left-join`; used for all automatically-generated JOINs\n\n Driver implementations: this is guaranteed to be present after pre-processing.", - "type" : "string", - "enum" : [ "full-join", "right-join", "left-join", "inner-join" ] + "$ref" : "#/components/schemas/metabase.lib.schema.join.strategy" } }, "required" : [ "condition" ] @@ -4228,6 +4906,14 @@ "allOf" : [ ] } ] }, + "metabase.legacy-mbql.schema.JoinFields" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all", "none" ] + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Fields" + } ] + }, "metabase.legacy-mbql.schema.Joins" : { "description" : "Schema for a valid sequence of `Join`s. Must be a non-empty sequence, and `:alias`, if specified, must be unique.", "type" : "array", @@ -4241,11 +4927,7 @@ "type" : "object", "properties" : { "breakout" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" - }, - "minItems" : 1 + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Breakouts" }, "source-metadata" : { "type" : "array", @@ -4267,23 +4949,13 @@ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Joins" }, "aggregation" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregation" - }, - "minItems" : 1 + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregations" }, "fields" : { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Fields" }, "source-table" : { - "anyOf" : [ { - "$ref" : "#/components/schemas/metabase.lib.schema.id.table" - }, { - "description" : "`card__` string Table ID", - "type" : "string", - "pattern" : "^card__[1-9]\\d*$" - } ] + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.SourceTable" }, "order-by" : { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.OrderBys" @@ -4292,12 +4964,32 @@ "$ref" : "#/components/schemas/metabase.lib.schema.page" }, "expressions" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionDef" - } + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Expressions" } } + }, { + "type" : "object", + "properties" : { } + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.RemoveFieldRefsFromFieldsAlreadyInBreakout" + }, { + "allOf" : [ ] + } ] + }, + "metabase.legacy-mbql.schema.NativeQuery" : { + "description" : "Schema for a valid, normalized native [inner] query.", + "allOf" : [ { + "type" : "object", + "properties" : { + "collection" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "query" : { }, + "template-tags" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagMap" + } + }, + "required" : [ "query" ] }, { "allOf" : [ ] } ] @@ -4320,6 +5012,7 @@ } ] }, "metabase.legacy-mbql.schema.NumericExpression" : { + "description" : "Schema for the definition of a numeric expression. All numeric expressions evaluate to numeric values.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.+" }, { @@ -4415,6 +5108,7 @@ } ] }, "metabase.legacy-mbql.schema.OrderComparable" : { + "description" : "Schema for things that make sense in a filter like `>` or `<`, i.e. things that can be sorted.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" }, { @@ -4427,16 +5121,20 @@ }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ExpressionArg" }, { - "oneOf" : [ { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.relative-datetime" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" - } ] + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRefOrRelativeDatetime" } ] } ] }, + "metabase.legacy-mbql.schema.OrderedFilterFieldArg" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.OrderComparable" + }, "metabase.legacy-mbql.schema.Query" : { "allOf" : [ { + "type" : "object", + "properties" : { } + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.CheckQueryDoesNotHaveSourceMetadata" + }, { "type" : "object", "properties" : { "update-row" : { @@ -4452,21 +5150,7 @@ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.MBQLQuery" }, "native" : { - "allOf" : [ { - "type" : "object", - "properties" : { - "collection" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "query" : { }, - "template-tags" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagMap" - } - }, - "required" : [ "query" ] - }, { - "allOf" : [ ] - } ] + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NativeQuery" }, "info" : { "$ref" : "#/components/schemas/metabase.lib.schema.info.info", @@ -4492,14 +5176,13 @@ }, "required" : [ "type" ] }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.check-keys-for-query-type" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.check-query-does-not-have-source-metadata" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.CheckKeysForQueryType" }, { "allOf" : [ ] } ] }, "metabase.legacy-mbql.schema.Reference" : { + "description" : "Schema for any type of valid Field clause, or for an indexed reference to an aggregation clause.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.aggregation" }, { @@ -4512,13 +5195,25 @@ "type" : "string", "enum" : [ "default", "minute", "hour", "day", "week", "month", "quarter", "year" ] }, + "metabase.legacy-mbql.schema.RemoveFieldRefsFromFieldsAlreadyInBreakout" : { }, "metabase.legacy-mbql.schema.SourceQuery" : { + "description" : "Schema for a valid value for a `:source-query`.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NativeSourceQuery" }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.MBQLQuery" } ] }, + "metabase.legacy-mbql.schema.SourceTable" : { + "description" : "Schema for a valid value for the `:source-table` clause of an MBQL query.", + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.id.table" + }, { + "description" : "`card__` string Table ID", + "type" : "string", + "pattern" : "^card__[1-9]\\d*$" + } ] + }, "metabase.legacy-mbql.schema.StringExpression" : { "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.substring" @@ -4572,164 +5267,31 @@ }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" } ] }, + "metabase.legacy-mbql.schema.StringFilterOptions" : { + "type" : "object", + "properties" : { + "case-sensitive" : { + "type" : "boolean" + } + } + }, "metabase.legacy-mbql.schema.TemplateTag" : { "description" : "Schema for a template tag as specified in a native query. There are four types of template tags, differentiated by\n `:type`.\n\n Template tags are used to specify {{placeholders}} in native queries that are replaced with some sort of value when\n the query itself runs. There are four basic types of template tag for native queries:\n\n 1. Field filters, which are used like\n\n SELECT * FROM table WHERE {{field_filter}}\n\n These reference specific Fields and are replaced with entire conditions, e.g. `some_field > 1000`\n\n 2. Raw values, which are used like\n\n SELECT * FROM table WHERE my_field = {{x}}\n\n These are replaced with raw values.\n\n 3. Native query snippets, which might be used like\n\n SELECT * FROM ({{snippet: orders}}) source\n\n These are replaced with `NativeQuerySnippet`s from the application database.\n\n 4. Source query Card IDs, which are used like\n\n SELECT * FROM ({{#123}}) source\n\n These are replaced with the query from the Card with that ID.\n\n Field filters and raw values usually have their value specified by `:parameters`.", "oneOf" : [ { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTag:FieldFilter" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.FieldFilter" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTag:Snippet" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.Snippet" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTag:SourceQuery" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.SourceQuery" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTag:TemporalUnit" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.TemporalUnit" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTag:RawValue" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.RawValue" } ] }, - "metabase.legacy-mbql.schema.TemplateTag:FieldFilter" : { - "description" : "Schema for a field filter template tag.", - "type" : "object", - "properties" : { - "display-name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" - }, - "name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "required" : { - "type" : "boolean" - }, - "type" : { - "const" : "dimension" - }, - "alias" : { - "type" : "string" - }, - "options" : { - "type" : "object", - "additionalProperties" : { }, - "description" : "optional map to be appended to filter clause" - }, - "dimension" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" - }, - "default" : { }, - "widget-type" : { - "description" : "which type of widget the frontend should show for this Field Filter; this also affects which parameter types\n are allowed to be specified for it.", - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.WidgetType" - } - }, - "required" : [ "type", "name", "display-name", "dimension", "widget-type" ] - }, - "metabase.legacy-mbql.schema.TemplateTag:RawValue" : { - "description" : "Schema for a raw value template tag.", - "type" : "object", - "properties" : { - "default" : { }, - "display-name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" - }, - "name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "required" : { - "type" : "boolean" - }, - "type" : { - "type" : "string", - "enum" : [ "date", "number", "boolean", "text" ] - } - }, - "required" : [ "type", "name", "display-name" ] - }, - "metabase.legacy-mbql.schema.TemplateTag:Snippet" : { - "description" : "Schema for a native query snippet template tag.", - "type" : "object", - "properties" : { - "database" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.database" - }, - "display-name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" - }, - "name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "snippet-id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.snippet" - }, - "snippet-name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "type" : { - "const" : "snippet" - } - }, - "required" : [ "type", "name", "display-name", "snippet-name", "snippet-id" ] - }, - "metabase.legacy-mbql.schema.TemplateTag:SourceQuery" : { - "description" : "Schema for a source query template tag.", - "type" : "object", - "properties" : { - "card-id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.card" - }, - "display-name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" - }, - "name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "type" : { - "const" : "card" - } - }, - "required" : [ "type", "name", "display-name", "card-id" ] - }, - "metabase.legacy-mbql.schema.TemplateTag:TemporalUnit" : { - "description" : "Schema for a temporal unit template tag.", - "type" : "object", - "properties" : { - "alias" : { - "type" : "string" - }, - "default" : { }, - "dimension" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" - }, - "display-name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" - }, - "name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "required" : { - "type" : "boolean" - }, - "type" : { - "const" : "temporal-unit" - } - }, - "required" : [ "type", "name", "display-name", "dimension" ] - }, "metabase.legacy-mbql.schema.TemplateTagMap" : { "description" : "Schema for the `:template-tags` map passed in as part of a native query.\n\n Map of template tag name -> template tag definition", "allOf" : [ { @@ -4741,6 +5303,11 @@ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag..template-tag-map.validate-names" } ] }, + "metabase.legacy-mbql.schema.TemplateTagType" : { + "description" : "Schema for valid values of template tag `:type`.", + "type" : "string", + "enum" : [ "snippet", "card", "dimension", "number", "text", "date" ] + }, "metabase.legacy-mbql.schema.TemporalExtractUnit" : { "description" : "Valid units to extract from a temporal.", "type" : "string", @@ -4754,6 +5321,14 @@ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TimeLiteral" } ] }, + "metabase.legacy-mbql.schema.TimeIntervalOptions" : { + "type" : "object", + "properties" : { + "include-current" : { + "type" : "boolean" + } + } + }, "metabase.legacy-mbql.schema.TimeLiteral" : { "description" : "Schema for valid time literals.", "anyOf" : [ { @@ -4838,657 +5413,667 @@ } }, "metabase.legacy-mbql.schema.WidgetType" : { - "description" : "Schema for valid values of `:widget-type` for a [[::TemplateTag:FieldFilter]].", + "description" : "Schema for valid values of `:widget-type` for a [[::TemplateTag.FieldFilter]].", "$ref" : "#/components/schemas/metabase.lib.schema.parameter.widget-type" }, "metabase.legacy-mbql.schema.abs" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :abs clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.absolute-datetime" : { + "description" : "Schema for a valid MBQL 4 :absolute-datetime clause.", "oneOf" : [ { }, { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :absolute-datetime clause", "allOf" : [ ] }, { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :absolute-datetime clause", "allOf" : [ ] } ] }, "metabase.legacy-mbql.schema.aggregation" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :aggregation clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.aggregation-options" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :aggregation-options clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.and" : { - "description" : "schema for a valid legacy MBQL :tag clause", - "allOf" : [ ] + "description" : "Schema for a valid MBQL 4 :and clause.", + "oneOf" : [ { + "description" : "schema for a valid MBQL 4 :and clause", + "allOf" : [ ] + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Filter" + } ] }, "metabase.legacy-mbql.schema.asc" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :asc clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.avg" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :avg clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.between" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :between clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.case" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :case clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.ceil" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :ceil clause", "allOf" : [ ] }, - "metabase.legacy-mbql.schema.check-keys-for-query-type" : { - "allOf" : [ ] - }, - "metabase.legacy-mbql.schema.check-query-does-not-have-source-metadata" : { - "description" : "`:source-metadata` is added to queries when `card__id` source queries are resolved. It contains info about the\n columns in the source query.\n\n Where this is added was changed in Metabase 0.33.0 -- previously, when `card__id` source queries were resolved, the\n middleware would add `:source-metadata` to the top-level; to support joins against source queries, this has been\n changed so it is always added at the same level the resolved `:source-query` is added.\n\n This should automatically be fixed by `normalize`; if we encounter it, it means some middleware is not functioning\n properly." - }, "metabase.legacy-mbql.schema.coalesce" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :coalesce clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.concat" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :concat clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.contains" : { + "description" : "Schema for a valid MBQL 4 :metabase.legacy-mbql.schema/contains clause.", "anyOf" : [ { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :contains clause", "allOf" : [ ] }, { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :contains clause", "allOf" : [ ] } ] }, "metabase.legacy-mbql.schema.convert-timezone" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :convert-timezone clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.count" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :count clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.count-where" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :count-where clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.cum-count" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :cum-count clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.cum-sum" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :cum-sum clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.date" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :date clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.datetime" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :datetime clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.datetime-add" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :datetime-add clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.datetime-diff" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :datetime-diff clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.datetime-subtract" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :datetime-subtract clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.day-name" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :day-name clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.desc" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :desc clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.distinct" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :distinct clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.distinct-where" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :distinct-where clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.does-not-contain" : { + "description" : "Schema for a valid MBQL 4 :metabase.legacy-mbql.schema/does-not-contain clause.", "anyOf" : [ { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :does-not-contain clause", "allOf" : [ ] }, { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :does-not-contain clause", "allOf" : [ ] } ] }, "metabase.legacy-mbql.schema.domain" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :domain clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.during" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :during clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.ends-with" : { + "description" : "Schema for a valid MBQL 4 :metabase.legacy-mbql.schema/ends-with clause.", "anyOf" : [ { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :ends-with clause", "allOf" : [ ] }, { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :ends-with clause", "allOf" : [ ] } ] }, "metabase.legacy-mbql.schema.exp" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :exp clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.expression" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :expression clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.field" : { + "description" : "Schema for a valid MBQL 4 :field clause.", "allOf" : [ { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :field clause", "allOf" : [ ] }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.require-base-type-for-field-name" } ] }, - "metabase.legacy-mbql.schema.field-or-expression-ref" : { - "oneOf" : [ { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.expression" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" - } ] - }, "metabase.legacy-mbql.schema.float" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :float clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.floor" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :floor clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-day" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-day clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-day-of-week" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-day-of-week clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-hour" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-hour clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-minute" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-minute clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-month" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-month clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-quarter" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-quarter clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-second" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-second clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-week" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-week clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-year" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-year clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.helpers.distinct" : { "description" : "values must be distinct" }, "metabase.legacy-mbql.schema.host" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :host clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.if" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :if clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.in" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :in clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.inside" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :inside clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.integer" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :integer clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.interval" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :interval clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.is-empty" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :is-empty clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.is-null" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :is-null clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.legacy-column-metadata" : { "description" : "Schema for a single legacy metadata column. This is the pre-Lib equivalent of\n `:metabase.lib.schema.metadata/column`.", - "type" : "object", - "properties" : { - "field_ref" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference" - }, - "lib/external-remap" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" - }, - "lib/source-column-alias" : { - "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", - "type" : "string" - }, - "lib/type" : { - "default" : "metadata/column", - "const" : "metadata/column" - }, - "fingerprint" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint" - }, - "visibility_type" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type" - }, - "base_type" : { - "default" : "type/*", - "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" - }, - "lib/source-uuid" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" - }, - "qp/implicit-field?" : { - "type" : "boolean" - }, - "lib/ref-name" : { - "type" : "string" - }, - "id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.field" - }, - "lib/deduplicated-name" : { - "type" : "string", - "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name." - }, - "lib/original-expression-name" : { - "type" : "string", - "minLength" : 1 - }, - "name" : { - "type" : "string" - }, - "lib/card-id" : { - "description" : "Valid Card ID", - "type" : "integer", - "minimum" : 1 - }, - "lib/expression-name" : { - "type" : "string", - "minLength" : 1 - }, - "lib/breakout?" : { - "type" : "boolean" - }, - "metabase.lib.field/temporal-unit" : { - "type" : "string", - "enum" : [ "day", "day-of-month", "day-of-week", "day-of-year", "default", "hour", "hour-of-day", "millisecond", "minute", "minute-of-hour", "month", "month-of-year", "quarter", "quarter-of-year", "second", "second-of-minute", "week", "week-of-year", "year", "year-of-era" ] - }, - "metabase.lib.field/binning" : { - "description" : "Schema for `:binning` options passed to a `:field` clause.", - "allOf" : [ { - "type" : "object", - "properties" : { - "strategy" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" - } - }, - "required" : [ "strategy" ] - }, { - "oneOf" : [ { + "allOf" : [ { + "type" : "object", + "properties" : { + "field_ref" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference" + }, + "lib/external-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" + }, + "lib/source-column-alias" : { + "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", + "type" : "string" + }, + "lib/type" : { + "default" : "metadata/column", + "const" : "metadata/column" + }, + "fingerprint" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint" + }, + "visibility_type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type" + }, + "base_type" : { + "default" : "type/*", + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/source-uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "qp/implicit-field?" : { + "type" : "boolean" + }, + "lib/ref-name" : { + "type" : "string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, + "lib/deduplicated-name" : { + "type" : "string", + "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name." + }, + "lib/original-expression-name" : { + "type" : "string", + "minLength" : 1 + }, + "name" : { + "type" : "string" + }, + "lib/card-id" : { + "description" : "Valid Card ID", + "type" : "integer", + "minimum" : 1 + }, + "lib/expression-name" : { + "type" : "string", + "minLength" : 1 + }, + "lib/breakout?" : { + "type" : "boolean" + }, + "metabase.lib.field/temporal-unit" : { + "type" : "string", + "enum" : [ "day", "day-of-month", "day-of-week", "day-of-year", "default", "hour", "hour-of-day", "millisecond", "minute", "minute-of-hour", "month", "month-of-year", "quarter", "quarter-of-year", "second", "second-of-minute", "week", "week-of-year", "year", "year-of-era" ] + }, + "metabase.lib.field/binning" : { + "description" : "Schema for `:binning` options passed to a `:field` clause.", + "allOf" : [ { "type" : "object", "properties" : { "strategy" : { - "const" : "default" + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" } }, "required" : [ "strategy" ] }, { - "type" : "object", - "properties" : { - "bin-width" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + "oneOf" : [ { + "type" : "object", + "properties" : { + "strategy" : { + "const" : "default" + } }, - "strategy" : { - "const" : "bin-width" - } - }, - "required" : [ "strategy", "bin-width" ] - }, { - "type" : "object", - "properties" : { - "num-bins" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + "required" : [ "strategy" ] + }, { + "type" : "object", + "properties" : { + "bin-width" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + }, + "strategy" : { + "const" : "bin-width" + } }, - "strategy" : { - "const" : "num-bins" - } - }, - "required" : [ "strategy", "num-bins" ] + "required" : [ "strategy", "bin-width" ] + }, { + "type" : "object", + "properties" : { + "num-bins" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + }, + "strategy" : { + "const" : "num-bins" + } + }, + "required" : [ "strategy", "num-bins" ] + } ] } ] - } ] - }, - "semantic_type" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" - }, - "display_name" : { - "type" : "string" - }, - "lib/model-display-name" : { - "type" : "string" - }, - "lib/internal-remap" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal" - }, - "converted_timezone" : { - "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.timezone-id" - }, - "source" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source" - }, - "metabase.lib.join/join-alias" : { - "type" : "string", - "minLength" : 1 - }, - "binning_info" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..legacy-column-metadata.binning-info" - }, - "lib/original-binning" : { - "description" : "Schema for `:binning` options passed to a `:field` clause.", - "allOf" : [ { - "type" : "object", - "properties" : { - "strategy" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" - } - }, - "required" : [ "strategy" ] - }, { - "oneOf" : [ { + }, + "semantic_type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + }, + "display_name" : { + "type" : "string" + }, + "lib/model-display-name" : { + "type" : "string" + }, + "lib/internal-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal" + }, + "converted_timezone" : { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.timezone-id" + }, + "source" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source" + }, + "metabase.lib.join/join-alias" : { + "type" : "string", + "minLength" : 1 + }, + "binning_info" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..legacy-column-metadata.binning-info" + }, + "lib/original-binning" : { + "description" : "Schema for `:binning` options passed to a `:field` clause.", + "allOf" : [ { "type" : "object", "properties" : { "strategy" : { - "const" : "default" + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" } }, "required" : [ "strategy" ] }, { - "type" : "object", - "properties" : { - "bin-width" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + "oneOf" : [ { + "type" : "object", + "properties" : { + "strategy" : { + "const" : "default" + } }, - "strategy" : { - "const" : "bin-width" - } - }, - "required" : [ "strategy", "bin-width" ] - }, { - "type" : "object", - "properties" : { - "num-bins" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + "required" : [ "strategy" ] + }, { + "type" : "object", + "properties" : { + "bin-width" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + }, + "strategy" : { + "const" : "bin-width" + } }, - "strategy" : { - "const" : "num-bins" - } - }, - "required" : [ "strategy", "num-bins" ] + "required" : [ "strategy", "bin-width" ] + }, { + "type" : "object", + "properties" : { + "num-bins" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + }, + "strategy" : { + "const" : "num-bins" + } + }, + "required" : [ "strategy", "num-bins" ] + } ] } ] - } ] - }, - "effective_type" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" - }, - "lib/original-join-alias" : { - "type" : "string", - "minLength" : 1 - }, - "lib/original-display-name" : { - "type" : "string" - }, - "unit" : { - "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" - }, - "lib/source" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source" - }, - "lib/ref-display-name" : { - "type" : "string" - }, - "lib/original-name" : { - "type" : "string", - "description" : "The original name of the column as it appeared in the very first place it came from (i.e., the physical name of the\n column in the table it appears in). This should be the same as the `:lib/source-column-alias` for the very first\n usage of the column.\n Allowed to be blank because some databases like SQL Server allow blank column names." + }, + "effective_type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/original-join-alias" : { + "type" : "string", + "minLength" : 1 + }, + "lib/original-display-name" : { + "type" : "string" + }, + "unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + }, + "lib/source" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source" + }, + "lib/ref-display-name" : { + "type" : "string" + }, + "lib/original-name" : { + "type" : "string", + "description" : "The original name of the column as it appeared in the very first place it came from (i.e., the physical name of the\n column in the table it appears in). This should be the same as the `:lib/source-column-alias` for the very first\n usage of the column.\n Allowed to be blank because some databases like SQL Server allow blank column names." + }, + "description" : { + "type" : "string" + }, + "lib/desired-column-alias" : { + "description" : "Name we should use as a column alias for a column in this stage of a query. The desired column alias in stage N\n becomes the source column alias in stage N+1. The right-hand side (RHS) in\n\n SELECT lhs AS rhs", + "type" : "string" + } }, - "lib/desired-column-alias" : { - "description" : "Name we should use as a column alias for a column in this stage of a query. The desired column alias in stage N\n becomes the source column alias in stage N+1. The right-hand side (RHS) in\n\n SELECT lhs AS rhs", - "type" : "string" - } - }, - "required" : [ "base_type", "display_name", "name" ] + "required" : [ "base_type", "display_name", "name" ] + }, { + "allOf" : [ ] + } ] }, "metabase.legacy-mbql.schema.length" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :length clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.log" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :log clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.lower" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :lower clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.ltrim" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :ltrim clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.max" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :max clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.median" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :median clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.metric" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :metric clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.min" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :min clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.month-name" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :month-name clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.not" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :not clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.not-empty" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :not-empty clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.not-in" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :not-in clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.not-null" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :not-null clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.now" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :now clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.offset" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :offset clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.or" : { - "description" : "schema for a valid legacy MBQL :tag clause", - "allOf" : [ ] + "description" : "Schema for a valid MBQL 4 :or clause.", + "oneOf" : [ { + "description" : "schema for a valid MBQL 4 :or clause", + "allOf" : [ ] + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Filter" + } ] }, "metabase.legacy-mbql.schema.path" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :path clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.percentile" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :percentile clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.power" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :power clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.quarter-name" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :quarter-name clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.regex-match-first" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :regex-match-first clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.relative-datetime" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :relative-datetime clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.relative-time-interval" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :relative-time-interval clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.replace" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :replace clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.require-base-type-for-field-name" : { "description" : "Fields using names rather than integer IDs are required to specify `:base-type`." }, "metabase.legacy-mbql.schema.round" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :round clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.rtrim" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :rtrim clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.segment" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :segment clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.share" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :share clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.split-part" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :split-part clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.sqrt" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :sqrt clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.starts-with" : { + "description" : "Schema for a valid MBQL 4 :metabase.legacy-mbql.schema/starts-with clause.", "anyOf" : [ { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :starts-with clause", "allOf" : [ ] }, { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :starts-with clause", "allOf" : [ ] } ] }, "metabase.legacy-mbql.schema.stddev" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :stddev clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.subdomain" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :subdomain clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.substring" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :substring clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.sum" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :sum clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.sum-where" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :sum-where clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.temporal-extract" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :temporal-extract clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.text" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :text clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.time" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :time clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.time-interval" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :time-interval clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.today" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :today clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.trim" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :trim clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.upper" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :upper clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.value" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :value clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.var" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :var clause", "allOf" : [ ] }, "metabase.lib.metadata.protocols.metadata-provider" : { @@ -5908,7 +6493,7 @@ }, { "anyOf" : [ { "type" : "string", - "enum" : [ "Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmara", "Africa/Asmera", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Timbuktu", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/Buenos_Aires", "America/Argentina/Catamarca", "America/Argentina/ComodRivadavia", "America/Argentina/Cordoba", "America/Argentina/Jujuy", "America/Argentina/La_Rioja", "America/Argentina/Mendoza", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Atikokan", "America/Atka", "America/Bahia", "America/Bahia_Banderas", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Buenos_Aires", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Catamarca", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Ciudad_Juarez", "America/Coral_Harbour", "America/Cordoba", "America/Costa_Rica", "America/Coyhaique", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson", "America/Dawson_Creek", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Ensenada", "America/Fort_Nelson", "America/Fort_Wayne", "America/Fortaleza", "America/Glace_Bay", "America/Godthab", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Indianapolis", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indianapolis", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Jujuy", "America/Juneau", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Knox_IN", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Louisville", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Mendoza", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montreal", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Nuuk", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port-au-Prince", "America/Port_of_Spain", "America/Porto_Acre", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Rosario", "America/Santa_Isabel", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Shiprock", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Virgin", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/South_Pole", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Ashkhabad", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Calcutta", "Asia/Chita", "Asia/Choibalsan", "Asia/Chongqing", "Asia/Chungking", "Asia/Colombo", "Asia/Dacca", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Harbin", "Asia/Hebron", "Asia/Ho_Chi_Minh", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Istanbul", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Kashgar", "Asia/Kathmandu", "Asia/Katmandu", "Asia/Khandyga", "Asia/Kolkata", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macao", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Rangoon", "Asia/Riyadh", "Asia/Saigon", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Tel_Aviv", "Asia/Thimbu", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ujung_Pandang", "Asia/Ulaanbaatar", "Asia/Ulan_Bator", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yangon", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faeroe", "Atlantic/Faroe", "Atlantic/Jan_Mayen", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/ACT", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Canberra", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/LHI", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/NSW", "Australia/North", "Australia/Perth", "Australia/Queensland", "Australia/South", "Australia/Sydney", "Australia/Tasmania", "Australia/Victoria", "Australia/West", "Australia/Yancowinna", "Brazil/Acre", "Brazil/DeNoronha", "Brazil/East", "Brazil/West", "CET", "CST6CDT", "Canada/Atlantic", "Canada/Central", "Canada/Eastern", "Canada/Mountain", "Canada/Newfoundland", "Canada/Pacific", "Canada/Saskatchewan", "Canada/Yukon", "Chile/Continental", "Chile/EasterIsland", "Cuba", "EET", "EST5EDT", "Egypt", "Eire", "Etc/GMT", "Etc/GMT+0", "Etc/GMT+1", "Etc/GMT+10", "Etc/GMT+11", "Etc/GMT+12", "Etc/GMT+2", "Etc/GMT+3", "Etc/GMT+4", "Etc/GMT+5", "Etc/GMT+6", "Etc/GMT+7", "Etc/GMT+8", "Etc/GMT+9", "Etc/GMT-0", "Etc/GMT-1", "Etc/GMT-10", "Etc/GMT-11", "Etc/GMT-12", "Etc/GMT-13", "Etc/GMT-14", "Etc/GMT-2", "Etc/GMT-3", "Etc/GMT-4", "Etc/GMT-5", "Etc/GMT-6", "Etc/GMT-7", "Etc/GMT-8", "Etc/GMT-9", "Etc/GMT0", "Etc/Greenwich", "Etc/UCT", "Etc/UTC", "Etc/Universal", "Etc/Zulu", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belfast", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Kyiv", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Europe/Nicosia", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Tiraspol", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "GB", "GB-Eire", "GMT", "GMT0", "Greenwich", "Hongkong", "Iceland", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Iran", "Israel", "Jamaica", "Japan", "Kwajalein", "Libya", "MET", "MST7MDT", "Mexico/BajaNorte", "Mexico/BajaSur", "Mexico/General", "NZ", "NZ-CHAT", "Navajo", "PRC", "PST8PDT", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Chuuk", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Kanton", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Pohnpei", "Pacific/Ponape", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Samoa", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Truk", "Pacific/Wake", "Pacific/Wallis", "Pacific/Yap", "Poland", "Portugal", "ROK", "Singapore", "SystemV/AST4", "SystemV/AST4ADT", "SystemV/CST6", "SystemV/CST6CDT", "SystemV/EST5", "SystemV/EST5EDT", "SystemV/HST10", "SystemV/MST7", "SystemV/MST7MDT", "SystemV/PST8", "SystemV/PST8PDT", "SystemV/YST9", "SystemV/YST9YDT", "Turkey", "UCT", "US/Alaska", "US/Aleutian", "US/Arizona", "US/Central", "US/East-Indiana", "US/Eastern", "US/Hawaii", "US/Indiana-Starke", "US/Michigan", "US/Mountain", "US/Pacific", "US/Samoa", "UTC", "Universal", "W-SU", "WET", "Zulu" ] + "enum" : [ "Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmara", "Africa/Asmera", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Timbuktu", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/Buenos_Aires", "America/Argentina/Catamarca", "America/Argentina/ComodRivadavia", "America/Argentina/Cordoba", "America/Argentina/Jujuy", "America/Argentina/La_Rioja", "America/Argentina/Mendoza", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Atikokan", "America/Atka", "America/Bahia", "America/Bahia_Banderas", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Buenos_Aires", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Catamarca", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Ciudad_Juarez", "America/Coral_Harbour", "America/Cordoba", "America/Costa_Rica", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson", "America/Dawson_Creek", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Ensenada", "America/Fort_Nelson", "America/Fort_Wayne", "America/Fortaleza", "America/Glace_Bay", "America/Godthab", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Indianapolis", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indianapolis", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Jujuy", "America/Juneau", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Knox_IN", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Louisville", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Mendoza", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montreal", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Nuuk", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port-au-Prince", "America/Port_of_Spain", "America/Porto_Acre", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Rosario", "America/Santa_Isabel", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Shiprock", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Virgin", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/South_Pole", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Ashkhabad", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Calcutta", "Asia/Chita", "Asia/Choibalsan", "Asia/Chongqing", "Asia/Chungking", "Asia/Colombo", "Asia/Dacca", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Harbin", "Asia/Hebron", "Asia/Ho_Chi_Minh", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Istanbul", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Kashgar", "Asia/Kathmandu", "Asia/Katmandu", "Asia/Khandyga", "Asia/Kolkata", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macao", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Rangoon", "Asia/Riyadh", "Asia/Saigon", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Tel_Aviv", "Asia/Thimbu", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ujung_Pandang", "Asia/Ulaanbaatar", "Asia/Ulan_Bator", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yangon", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faeroe", "Atlantic/Faroe", "Atlantic/Jan_Mayen", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/ACT", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Canberra", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/LHI", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/NSW", "Australia/North", "Australia/Perth", "Australia/Queensland", "Australia/South", "Australia/Sydney", "Australia/Tasmania", "Australia/Victoria", "Australia/West", "Australia/Yancowinna", "Brazil/Acre", "Brazil/DeNoronha", "Brazil/East", "Brazil/West", "CET", "CST6CDT", "Canada/Atlantic", "Canada/Central", "Canada/Eastern", "Canada/Mountain", "Canada/Newfoundland", "Canada/Pacific", "Canada/Saskatchewan", "Canada/Yukon", "Chile/Continental", "Chile/EasterIsland", "Cuba", "EET", "EST5EDT", "Egypt", "Eire", "Etc/GMT", "Etc/GMT+0", "Etc/GMT+1", "Etc/GMT+10", "Etc/GMT+11", "Etc/GMT+12", "Etc/GMT+2", "Etc/GMT+3", "Etc/GMT+4", "Etc/GMT+5", "Etc/GMT+6", "Etc/GMT+7", "Etc/GMT+8", "Etc/GMT+9", "Etc/GMT-0", "Etc/GMT-1", "Etc/GMT-10", "Etc/GMT-11", "Etc/GMT-12", "Etc/GMT-13", "Etc/GMT-14", "Etc/GMT-2", "Etc/GMT-3", "Etc/GMT-4", "Etc/GMT-5", "Etc/GMT-6", "Etc/GMT-7", "Etc/GMT-8", "Etc/GMT-9", "Etc/GMT0", "Etc/Greenwich", "Etc/UCT", "Etc/UTC", "Etc/Universal", "Etc/Zulu", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belfast", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Kyiv", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Europe/Nicosia", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Tiraspol", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "GB", "GB-Eire", "GMT", "GMT0", "Greenwich", "Hongkong", "Iceland", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Iran", "Israel", "Jamaica", "Japan", "Kwajalein", "Libya", "MET", "MST7MDT", "Mexico/BajaNorte", "Mexico/BajaSur", "Mexico/General", "NZ", "NZ-CHAT", "Navajo", "PRC", "PST8PDT", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Chuuk", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Kanton", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Pohnpei", "Pacific/Ponape", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Samoa", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Truk", "Pacific/Wake", "Pacific/Wallis", "Pacific/Yap", "Poland", "Portugal", "ROK", "Singapore", "SystemV/AST4", "SystemV/AST4ADT", "SystemV/CST6", "SystemV/CST6CDT", "SystemV/EST5", "SystemV/EST5EDT", "SystemV/HST10", "SystemV/MST7", "SystemV/MST7MDT", "SystemV/PST8", "SystemV/PST8PDT", "SystemV/YST9", "SystemV/YST9YDT", "Turkey", "UCT", "US/Alaska", "US/Aleutian", "US/Arizona", "US/Central", "US/East-Indiana", "US/Eastern", "US/Hawaii", "US/Indiana-Starke", "US/Michigan", "US/Mountain", "US/Pacific", "US/Samoa", "UTC", "Universal", "W-SU", "WET", "Zulu" ] }, { "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.zone-offset" } ] @@ -6022,6 +6607,7 @@ "minimum" : 1 }, "metabase.lib.schema.info.context" : { + "description" : "Schema for `info.context`; used for informational purposes to record how a query was executed.", "type" : "string", "enum" : [ "action", "ad-hoc", "cache-refresh", "collection", "map-tiles", "pulse", "dashboard-subscription", "dashboard", "question", "csv-download", "xlsx-download", "json-download", "public-dashboard", "public-question", "public-csv-download", "public-xlsx-download", "public-json-download", "embedded-dashboard", "embedded-question", "embedded-csv-download", "embedded-xlsx-download", "embedded-json-download", "table-grid" ] }, @@ -8559,6 +9145,12 @@ "type" : "string", "enum" : [ "static-list", "card" ] }, + "metabase.queries.schema..card.result-metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.lib-or-legacy-column" + } + }, "metabase.queries.schema.card" : { "description" : "Schema for an instance of a `:model/Card` (everything is optional to support updates).", "type" : "object", @@ -8576,10 +9168,7 @@ "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" }, "result_metadata" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata.lib-or-legacy-column" - } + "$ref" : "#/components/schemas/metabase.queries.schema..card.result-metadata" }, "type" : { "$ref" : "#/components/schemas/metabase.lib.schema.metadata..card.type" @@ -8640,204 +9229,812 @@ "create-row" : { "$ref" : "#/components/schemas/metabase.lib.schema.actions.row" } - }, - "required" : [ "lib/type", "lib/metadata", "stages" ] - }, { - "$ref" : "#/components/schemas/metabase.lib.schema.util.unique-uuids" - }, { - "allOf" : [ ] - } ] - } ] - }, - "metabase.query-processor.schema..result-metadata.column" : { - "description" : "A single result metadata column as returned by the Query Processor.", - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.legacy-column-metadata" - }, - "metabase.query-processor.schema.export-format" : { - "description" : "Schema for valid export formats for downloading query results.", - "type" : "string", - "enum" : [ "csv", "api", "xlsx", "json" ] - }, - "metabase.sync.schedules.ExpandedSchedulesMap" : { - "description" : "value must be a valid map of schedule maps for a DB.", - "type" : "object", - "properties" : { - "cache_field_values" : { - "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap" + }, + "required" : [ "lib/type", "lib/metadata", "stages" ] + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.util.unique-uuids" + }, { + "allOf" : [ ] + } ] + } ] + }, + "metabase.query-processor.schema..result-metadata.column" : { + "description" : "A single result metadata column as returned by the Query Processor.", + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.legacy-column-metadata" + }, + "metabase.query-processor.schema.export-format" : { + "description" : "Schema for valid export formats for downloading query results.", + "type" : "string", + "enum" : [ "csv", "api", "xlsx", "json" ] + }, + "metabase.sync.schedules.ExpandedSchedulesMap" : { + "description" : "value must be a valid map of schedule maps for a DB.", + "type" : "object", + "properties" : { + "cache_field_values" : { + "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap" + }, + "metadata_sync" : { + "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap" + } + } + }, + "metabase.tiles.api.legacy-ref" : { + "description" : "Form-encoded JSON-encoded legacy MBQL :field ref.", + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" + }, + "metabase.tiles.api.parameters" : { + "description" : "Form-encoded JSON-encoded array of parameter maps.", + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "metabase.tiles.api.query" : { + "description" : "Form-encoded JSON-encoded MBQL query.", + "$ref" : "#/components/schemas/metabase.lib.schema.query" + }, + "metabase.timeline.api.timeline.Timeline" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "id" ] + }, + "metabase.timeline.api.timeline.include" : { + "type" : "string", + "enum" : [ "events" ] + }, + "metabase.users.api.user-group-membership" : { + "description" : "Group Membership info of a User.\n In which :is_group_manager is only included if `advanced-permissions` is enabled.", + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "is_group_manager" : { + "description" : "Only relevant if `advanced-permissions` is enabled. If it is, you should always include this key.", + "type" : "boolean" + } + }, + "required" : [ "id" ] + }, + "metabase.util.cron.CronHour" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 23 + }, + "metabase.util.cron.CronMinute" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 59 + }, + "metabase.util.cron.CronScheduleString" : { + "description" : "value must be a valid Quartz cron schedule string.", + "type" : "string", + "minLength" : 1 + }, + "metabase.util.cron.ScheduleMap" : { + "description" : "value must be a valid schedule map. See schema in metabase.util.cron for details.", + "type" : "object", + "properties" : { + "schedule_day" : { + "type" : "string", + "enum" : [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ] + }, + "schedule_frame" : { + "type" : "string", + "enum" : [ "first", "mid", "last" ] + }, + "schedule_hour" : { + "$ref" : "#/components/schemas/metabase.util.cron.CronHour" + }, + "schedule_minute" : { + "$ref" : "#/components/schemas/metabase.util.cron.CronMinute" + }, + "schedule_type" : { + "type" : "string", + "enum" : [ "hourly", "daily", "weekly", "monthly" ] + } + }, + "required" : [ "schedule_type" ] + }, + "metabase.warehouse-schema.api.table.data-authority-write" : { + "description" : "Schema for writing a valid table data authority.", + "type" : "string", + "enum" : [ "computed", "authoritative", "unconfigured", "ingested" ] + }, + "metabase.warehouses.api.available-settings" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "properties" : { + "enabled" : { + "type" : "boolean" + }, + "reasons" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "key" : { + "type" : "string" + }, + "message" : { + "anyOf" : [ { + "type" : "string" + }, { } ] + }, + "type" : { + "type" : "string", + "enum" : [ "error", "warning" ] + } + }, + "required" : [ "key", "type", "message" ] + } + } + }, + "required" : [ "enabled" ] + } + }, + "metabase.xrays.api.automagic-dashboards.base-64-encoded-json" : { + "description" : "form-encoded base-64-encoded JSON" + }, + "metabase.xrays.api.automagic-dashboards.entity-id-or-query" : { + "description" : "One of these:\n\n * A non-empty string with an Entity ID (including `card__`-encoded Card IDs)\n\n * a form-encoded base-64-encoded JSON-encoded MBQL query\n\n * The name of a transform\n\n (Effectively since the names of transforms are unconstrained this parameter is allowed to be any form-encoded\n string.)", + "type" : "string", + "minLength" : 1 + }, + "metabot.reaction.redirect" : { + "type" : "object", + "properties" : { + "type" : { + "const" : "metabot.reaction/redirect" + }, + "url" : { + "type" : "string" + } + }, + "required" : [ "type", "url" ] + } + } + }, + "paths" : { + "/api/action/" : { + "get" : { + "summary" : "GET /api/action/", + "description" : "Returns actions that can be used for QueryActions. By default lists all viewable actions. Pass optional\n `?model-id=` to limit to actions on a particular model.", + "parameters" : [ { + "in" : "query", + "name" : "model-id", + "required" : false, + "schema" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + } + } ], + "responses" : { + "2XX" : { + "description" : "sequence of An Action as it should appear when we `SELECT` it from the app DB.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.actions.schema.action" + } + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + }, + "post" : { + "summary" : "POST /api/action/", + "description" : "Create a new action.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "An Action as it should appear when we `SELECT` it from the app DB.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.action" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema..action.for-insert" + } + } + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/public" : { + "get" : { + "summary" : "GET /api/action/public", + "description" : "Fetch a list of Actions with public UUIDs. These actions are publicly-accessible *if* public sharing is enabled.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "sequence of An Action as it should appear when we `SELECT` it from the app DB.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.actions.schema.action" + } + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{action-id}" : { + "get" : { + "summary" : "GET /api/action/{action-id}", + "description" : "Fetch an Action.", + "parameters" : [ { + "in" : "path", + "name" : "action-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "An Action as it should appear when we `SELECT` it from the app DB.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.action" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + }, + "delete" : { + "summary" : "DELETE /api/action/{action-id}", + "description" : "Delete an Action.", + "parameters" : [ { + "in" : "path", + "name" : "action-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{action-id}/execute" : { + "get" : { + "summary" : "GET /api/action/{action-id}/execute", + "description" : "Fetches the values for filling in execution parameters. Pass PK parameters and values to select.", + "parameters" : [ { + "in" : "path", + "name" : "action-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "parameters", + "required" : true, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{id}" : { + "put" : { + "summary" : "PUT /api/action/{id}", + "description" : "Update an Action.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema..action.for-update" + } + } + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{id}/execute" : { + "post" : { + "summary" : "POST /api/action/{id}/execute", + "description" : "Execute the Action.\n\n `parameters` should be the mapped dashboard parameters with values.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "parameters" : { + "type" : "object", + "additionalProperties" : { } + } + }, + "optional" : true + } + } + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{id}/public_link" : { + "post" : { + "summary" : "POST /api/action/{id}/public_link", + "description" : "Generate publicly-accessible links for this Action. Returns UUID to be used in public links. (If this\n Action has already been shared, it will return the existing public link rather than creating a new one.) Public\n sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + }, + "delete" : { + "summary" : "DELETE /api/action/{id}/public_link", + "description" : "Delete the publicly-accessible link to this Dashboard.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/activity/most_recently_viewed_dashboard" : { + "get" : { + "summary" : "GET /api/activity/most_recently_viewed_dashboard", + "description" : "Get the most recently viewed dashboard for the current user. Returns a 204 if the user has not viewed any dashboards\n in the last 24 hours.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/activity" ] + } + }, + "/api/activity/popular_items" : { + "get" : { + "summary" : "GET /api/activity/popular_items", + "description" : "Get the list of 5 popular things on the instance. Query takes 8 and limits to 5 so that if it finds anything\n archived, deleted, etc it can usually still get 5. ", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/activity" ] + } + }, + "/api/activity/recent_views" : { + "get" : { + "summary" : "GET /api/activity/recent_views", + "description" : "Get a list of 100 models (cards, models, tables, dashboards, and collections) that the current user has been viewing most\n recently. Return a maximum of 20 model of each, if they've looked at at least 20.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/activity" ] + } + }, + "/api/activity/recents" : { + "get" : { + "summary" : "GET /api/activity/recents", + "description" : "Get a list of recent items the current user has been viewing most recently under the `:recents` key.\n Allows for filtering by context: views or selections", + "parameters" : [ { + "in" : "query", + "name" : "context", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "selections", "views" ] + } + } + }, { + "in" : "query", + "name" : "include_metadata", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/activity" ] + }, + "post" : { + "summary" : "POST /api/activity/recents", + "description" : "Adds a model to the list of recently selected items.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "context" : { + "type" : "string", + "enum" : [ "selection" ] + }, + "model" : { + "type" : "string", + "enum" : [ "card", "dataset", "metric", "dashboard", "table", "collection", "document" ] + }, + "model_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "model", "model_id", "context" ] + } + } + } + }, + "tags" : [ "/api/activity" ] + } + }, + "/api/alert/" : { + "get" : { + "summary" : "GET /api/alert/", + "description" : "Fetch alerts which the current user has created or will receive, or all alerts if the user is an admin.\n The optional `user_id` will return alerts created by the corresponding user, but is ignored for non-admin users.", + "parameters" : [ { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "user_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 }, - "metadata_sync" : { - "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap" + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - } - }, - "metabase.tiles.api.legacy-ref" : { - "description" : "Form-encoded JSON-encoded legacy MBQL :field ref.", - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" - }, - "metabase.tiles.api.parameters" : { - "description" : "Form-encoded JSON-encoded array of parameter maps.", - "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" - }, - "metabase.tiles.api.query" : { - "description" : "Form-encoded JSON-encoded MBQL query.", - "$ref" : "#/components/schemas/metabase.lib.schema.query" - }, - "metabase.timeline.api.timeline.Timeline" : { - "type" : "object", - "properties" : { - "id" : { + }, + "tags" : [ "/api/alert" ] + } + }, + "/api/alert/{id}" : { + "get" : { + "summary" : "GET /api/alert/{id}", + "description" : "Fetch an alert by ID", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { "type" : "integer", "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, - "required" : [ "id" ] - }, - "metabase.timeline.api.timeline.include" : { - "type" : "string", - "enum" : [ "events" ] - }, - "metabase.users.api.user-group-membership" : { - "description" : "Group Membership info of a User.\n In which :is_group_manager is only included if `advanced-permissions` is enabled.", - "type" : "object", - "properties" : { - "id" : { - "description" : "value must be an integer greater than zero.", + "tags" : [ "/api/alert" ] + } + }, + "/api/alert/{id}/subscription" : { + "delete" : { + "summary" : "DELETE /api/alert/{id}/subscription", + "description" : "For users to unsubscribe themselves from the given alert.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { "type" : "integer", "minimum" : 1 }, - "is_group_manager" : { - "description" : "Only relevant if `advanced-permissions` is enabled. If it is, you should always include this key.", - "type" : "boolean" + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, - "required" : [ "id" ] - }, - "metabase.util.cron.CronHour" : { - "type" : "integer", - "minimum" : 0, - "maximum" : 23 - }, - "metabase.util.cron.CronMinute" : { - "type" : "integer", - "minimum" : 0, - "maximum" : 59 - }, - "metabase.util.cron.CronScheduleString" : { - "description" : "value must be a valid Quartz cron schedule string.", - "type" : "string", - "minLength" : 1 - }, - "metabase.util.cron.ScheduleMap" : { - "description" : "value must be a valid schedule map. See schema in metabase.util.cron for details.", - "type" : "object", - "properties" : { - "schedule_day" : { - "type" : "string", - "enum" : [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ] + "tags" : [ "/api/alert" ] + } + }, + "/api/analytics/anonymous-stats" : { + "get" : { + "summary" : "GET /api/analytics/anonymous-stats", + "description" : "Anonymous usage stats. Endpoint for testing, and eventually exposing this to instance admins to let them see\n what is being phoned home.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "schedule_frame" : { - "type" : "string", - "enum" : [ "first", "mid", "last" ] + "4XX" : { + "description" : "Client error response" }, - "schedule_hour" : { - "$ref" : "#/components/schemas/metabase.util.cron.CronHour" + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/analytics" ] + } + }, + "/api/api-key/" : { + "post" : { + "summary" : "POST /api/api-key/", + "description" : "Create a new API key (and an associated `User`) with the provided name and group ID.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "schedule_minute" : { - "$ref" : "#/components/schemas/metabase.util.cron.CronMinute" + "4XX" : { + "description" : "Client error response" }, - "schedule_type" : { - "type" : "string", - "enum" : [ "hourly", "daily", "weekly", "monthly" ] + "5XX" : { + "description" : "Server error response" } }, - "required" : [ "schedule_type" ] - }, - "metabase.warehouse-schema.api.table.data-authority-write" : { - "description" : "Schema for writing a valid table data authority.", - "type" : "string", - "enum" : [ "computed", "authoritative", "unconfigured", "ingested" ] - }, - "metabase.warehouses.api.available-settings" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "properties" : { - "enabled" : { - "type" : "boolean" - }, - "reasons" : { - "type" : "array", - "items" : { + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { "type" : "object", "properties" : { - "key" : { - "type" : "string" - }, - "message" : { - "anyOf" : [ { - "type" : "string" - }, { } ] + "group_id" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.id" }, - "type" : { + "name" : { "type" : "string", - "enum" : [ "error", "warning" ] + "minLength" : 1 } }, - "required" : [ "key", "type", "message" ] + "required" : [ "group_id", "name" ] } } - }, - "required" : [ "enabled" ] - } - }, - "metabase.xrays.api.automagic-dashboards.base-64-encoded-json" : { - "description" : "form-encoded base-64-encoded JSON" - }, - "metabase.xrays.api.automagic-dashboards.entity-id-or-query" : { - "description" : "One of these:\n\n * A non-empty string with an Entity ID (including `card__`-encoded Card IDs)\n\n * a form-encoded base-64-encoded JSON-encoded MBQL query\n\n * The name of a transform\n\n (Effectively since the names of transforms are unconstrained this parameter is allowed to be any form-encoded\n string.)", - "type" : "string", - "minLength" : 1 + } + }, + "tags" : [ "/api/api-key" ] }, - "metabot.reaction.redirect" : { - "type" : "object", - "properties" : { - "type" : { - "const" : "metabot.reaction/redirect" + "get" : { + "summary" : "GET /api/api-key/", + "description" : "Get a list of API keys with the default scope. Non-paginated.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "url" : { - "type" : "string" + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, - "required" : [ "type", "url" ] + "tags" : [ "/api/api-key" ] } - } - }, - "paths" : { - "/api/action/" : { + }, + "/api/api-key/count" : { "get" : { - "summary" : "GET /api/action/", - "description" : "Returns actions that can be used for QueryActions. By default lists all viewable actions. Pass optional\n `?model-id=` to limit to actions on a particular model.", - "parameters" : [ { - "in" : "query", - "name" : "model-id", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.card" - } - } ], + "summary" : "GET /api/api-key/count", + "description" : "Get the count of API keys in the DB with the default scope.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "sequence of An Action as it should appear when we `SELECT` it from the app DB.", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.actions.schema.action" - } - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -8846,22 +10043,26 @@ "description" : "Server error response" } }, - "tags" : [ "/api/action" ] - }, - "post" : { - "summary" : "POST /api/action/", - "description" : "Create a new action.", - "parameters" : [ ], + "tags" : [ "/api/api-key" ] + } + }, + "/api/api-key/{id}" : { + "put" : { + "summary" : "PUT /api/api-key/{id}", + "description" : "Update an API key by changing its group and/or its name", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { - "description" : "An Action as it should appear when we `SELECT` it from the app DB.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema.action" - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -8874,29 +10075,82 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema..action.for-insert" + "type" : "object", + "properties" : { + "group_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.name" + } + } } } } }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/api-key" ] + }, + "delete" : { + "summary" : "DELETE /api/api-key/{id}", + "description" : "Delete an ApiKey", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/api-key" ] } }, - "/api/action/public" : { - "get" : { - "summary" : "GET /api/action/public", - "description" : "Fetch a list of Actions with public UUIDs. These actions are publicly-accessible *if* public sharing is enabled.", - "parameters" : [ ], + "/api/api-key/{id}/regenerate" : { + "put" : { + "summary" : "PUT /api/api-key/{id}/regenerate", + "description" : "Regenerate an API Key", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.id" + } + } ], "responses" : { "2XX" : { - "description" : "sequence of An Action as it should appear when we `SELECT` it from the app DB.", + "description" : "map where {:id -> , :unmasked_key -> '.>, :masked_key -> , :prefix -> }", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.actions.schema.action" - } + "type" : "object", + "properties" : { + "id" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.id" + }, + "masked_key" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema..key.masked" + }, + "prefix" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.prefix" + }, + "unmasked_key" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema..key.raw" + } + }, + "required" : [ "id", "unmasked_key", "masked_key", "prefix" ] } } } @@ -8908,16 +10162,16 @@ "description" : "Server error response" } }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/api-key" ] } }, - "/api/action/{action-id}" : { + "/api/automagic-dashboards/database/{id}/candidates" : { "get" : { - "summary" : "GET /api/action/{action-id}", - "description" : "Fetch an Action.", + "summary" : "GET /api/automagic-dashboards/database/{id}/candidates", + "description" : "Return a list of candidates for automagic dashboards ordered by interestingness.", "parameters" : [ { "in" : "path", - "name" : "action-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -8927,14 +10181,7 @@ } ], "responses" : { "2XX" : { - "description" : "An Action as it should appear when we `SELECT` it from the app DB.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema.action" - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -8943,20 +10190,73 @@ "description" : "Server error response" } }, - "tags" : [ "/api/action" ] - }, - "delete" : { - "summary" : "DELETE /api/action/{action-id}", - "description" : "Delete an Action.", + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}", + "description" : "Return an automagic dashboard for an entity detail specified by `entity`\n with id `id` and a primary key of `indexed-value`.", "parameters" : [ { "in" : "path", - "name" : "action-id", + "name" : "model-index-id", + "required" : true, + "schema" : { + "type" : "integer" + } + }, { + "in" : "path", + "name" : "pk-id", + "required" : true, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/{entity}/{entity-id-or-query}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}", + "description" : "Return an automagic dashboard for entity `entity` with id `id`.", + "parameters" : [ { + "in" : "path", + "name" : "entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "const" : "all" + }, { + "type" : "integer", + "minimum" : 0 + } ] + } } ], "responses" : { "2XX" : { @@ -8969,30 +10269,49 @@ "description" : "Server error response" } }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/action/{action-id}/execute" : { + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}" : { "get" : { - "summary" : "GET /api/action/{action-id}/execute", - "description" : "Fetches the values for filling in execution parameters. Pass PK parameters and values to select.", + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}", + "description" : "Return an automagic dashboard analyzing cell in automagic dashboard for entity `entity` defined by query\n `cell-query`.", "parameters" : [ { "in" : "path", - "name" : "action-id", + "name" : "entity", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } }, { - "in" : "query", - "name" : "parameters", + "in" : "path", + "name" : "entity-id-or-query", "required" : true, "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "path", + "name" : "cell-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] }, - "description" : "value must be a valid JSON string." + "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -9005,20 +10324,65 @@ "description" : "Server error response" } }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/action/{id}" : { - "put" : { - "summary" : "PUT /api/action/{id}", - "description" : "Update an Action.", + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}", + "description" : "Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`\n with id `id` defined by query `cell-query`; compared with entity `comparison-entity` with id\n `comparison-entity-id-or-query.`.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "entity", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema.id" + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "path", + "name" : "cell-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + } + }, { + "in" : "path", + "name" : "comparison-entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "segment", "table" ] + }, + "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + }, { + "in" : "path", + "name" : "comparison-entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -9031,29 +10395,60 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema..action.for-update" - } - } - } - }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/action/{id}/execute" : { - "post" : { - "summary" : "POST /api/action/{id}/execute", - "description" : "Execute the Action.\n\n `parameters` should be the mapped dashboard parameters with values.", + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}", + "description" : "Return an automagic dashboard analyzing cell in question with id `id` defined by query `cell-query` using\n dashboard-template `dashboard-template`.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "entity", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema.id" + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "path", + "name" : "prefix", + "required" : true, + "schema" : { } + }, { + "in" : "path", + "name" : "dashboard-template", + "required" : true, + "schema" : { }, + "description" : "invalid value for dashboard template name" + }, { + "in" : "path", + "name" : "cell-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -9066,60 +10461,76 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "parameters" : { - "type" : "object", - "additionalProperties" : { } - } - }, - "optional" : true - } - } - } - }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/action/{id}/public_link" : { - "post" : { - "summary" : "POST /api/action/{id}/public_link", - "description" : "Generate publicly-accessible links for this Action. Returns UUID to be used in public links. (If this\n Action has already been shared, it will return the existing public link rather than creating a new one.) Public\n sharing must be enabled.", + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}", + "description" : "Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`\n with id `id` defined by query `cell-query` using dashboard-template `dashboard-template`; compared with entity\n `comparison-entity` with id `comparison-entity-id-or-query.`.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "entity", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema.id" + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } - }, - "tags" : [ "/api/action" ] - }, - "delete" : { - "summary" : "DELETE /api/action/{id}/public_link", - "description" : "Delete the publicly-accessible link to this Dashboard.", - "parameters" : [ { + }, { + "in" : "path", + "name" : "prefix", + "required" : true, + "schema" : { } + }, { + "in" : "path", + "name" : "dashboard-template", + "required" : true, + "schema" : { }, + "description" : "invalid value for dashboard template name" + }, { + "in" : "path", + "name" : "cell-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + } + }, { + "in" : "path", + "name" : "comparison-entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "segment", "table" ] + }, + "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + }, { "in" : "path", - "name" : "id", + "name" : "comparison-entity-id-or-query", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema.id" + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -9132,52 +10543,59 @@ "description" : "Server error response" } }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/activity/most_recently_viewed_dashboard" : { + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { "get" : { - "summary" : "GET /api/activity/most_recently_viewed_dashboard", - "description" : "Get the most recently viewed dashboard for the current user. Returns a 204 if the user has not viewed any dashboards\n in the last 24 hours.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}", + "description" : "Return an automagic comparison dashboard for entity `entity` with id `id` compared with entity `comparison-entity`\n with id `comparison-entity-id-or-query.`", + "parameters" : [ { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } - }, - "tags" : [ "/api/activity" ] - } - }, - "/api/activity/popular_items" : { - "get" : { - "summary" : "GET /api/activity/popular_items", - "description" : "Get the list of 5 popular things on the instance. Query takes 8 and limits to 5 so that if it finds anything\n archived, deleted, etc it can usually still get 5. ", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" + }, { + "in" : "path", + "name" : "entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "comparison-entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "segment", "table" ] }, - "5XX" : { - "description" : "Server error response" + "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + }, { + "in" : "path", + "name" : "comparison-entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } - }, - "tags" : [ "/api/activity" ] - } - }, - "/api/activity/recent_views" : { - "get" : { - "summary" : "GET /api/activity/recent_views", - "description" : "Get a list of 100 models (cards, models, tables, dashboards, and collections) that the current user has been viewing most\n recently. Return a maximum of 20 model of each, if they've looked at at least 20.", - "parameters" : [ ], + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -9189,31 +10607,27 @@ "description" : "Server error response" } }, - "tags" : [ "/api/activity" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/activity/recents" : { + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata" : { "get" : { - "summary" : "GET /api/activity/recents", - "description" : "Get a list of recent items the current user has been viewing most recently under the `:recents` key.\n Allows for filtering by context: views or selections", + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata", + "description" : "Return all metadata for an automagic dashboard for entity `entity` with id `id`.", "parameters" : [ { - "in" : "query", - "name" : "context", + "in" : "path", + "name" : "entity", "required" : true, "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "selections", "views" ] - } + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] } }, { - "in" : "query", - "name" : "include_metadata", - "required" : false, + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } } ], "responses" : { @@ -9227,72 +10641,53 @@ "description" : "Server error response" } }, - "tags" : [ "/api/activity" ] - }, - "post" : { - "summary" : "POST /api/activity/recents", - "description" : "Adds a model to the list of recently selected items.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "context" : { - "type" : "string", - "enum" : [ "selection" ] - }, - "model" : { - "type" : "string", - "enum" : [ "card", "dataset", "metric", "dashboard", "table", "collection", "document" ] - }, - "model_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "model", "model_id", "context" ] - } - } - } - }, - "tags" : [ "/api/activity" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/alert/" : { + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}" : { "get" : { - "summary" : "GET /api/alert/", - "description" : "Fetch alerts which the current user has created or will receive, or all alerts if the user is an admin.\n The optional `user_id` will return alerts created by the corresponding user, but is ignored for non-admin users.", + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}", + "description" : "Return an automagic dashboard for entity `entity` with id `id` using dashboard-template `dashboard-template`.", "parameters" : [ { - "in" : "query", - "name" : "archived", - "required" : false, + "in" : "path", + "name" : "entity", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } + }, { + "in" : "path", + "name" : "prefix", + "required" : true, + "schema" : { } + }, { + "in" : "path", + "name" : "dashboard-template", + "required" : true, + "schema" : { }, + "description" : "invalid value for dashboard template name" }, { "in" : "query", - "name" : "user_id", + "name" : "show", "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] }, - "description" : "value must be an integer greater than zero." + "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -9305,50 +10700,69 @@ "description" : "Server error response" } }, - "tags" : [ "/api/alert" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/alert/{id}" : { + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { "get" : { - "summary" : "GET /api/alert/{id}", - "description" : "Fetch an alert by ID", + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}", + "description" : "Return an automagic comparison dashboard for entity `entity` with id `id` using dashboard-template\n `dashboard-template`; compared with entity `comparison-entity` with id `comparison-entity-id-or-query.`.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "path", + "name" : "prefix", + "required" : true, + "schema" : { } + }, { + "in" : "path", + "name" : "dashboard-template", + "required" : true, + "schema" : { }, + "description" : "invalid value for dashboard template name" + }, { + "in" : "path", + "name" : "comparison-entity", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" + "type" : "string", + "enum" : [ "adhoc", "segment", "table" ] }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/alert" ] - } - }, - "/api/alert/{id}/subscription" : { - "delete" : { - "summary" : "DELETE /api/alert/{id}/subscription", - "description" : "For users to unsubscribe themselves from the given alert.", - "parameters" : [ { + "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + }, { "in" : "path", - "name" : "id", + "name" : "comparison-entity-id-or-query", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] }, - "description" : "value must be an integer greater than zero." + "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -9361,13 +10775,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/alert" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/analytics/anonymous-stats" : { + "/api/bookmark/" : { "get" : { - "summary" : "GET /api/analytics/anonymous-stats", - "description" : "Anonymous usage stats. Endpoint for testing, and eventually exposing this to instance admins to let them see\n what is being phoned home.", + "summary" : "GET /api/bookmark/", + "description" : "Fetch all bookmarks for the user", "parameters" : [ ], "responses" : { "2XX" : { @@ -9380,13 +10794,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/analytics" ] + "tags" : [ "/api/bookmark" ] } }, - "/api/api-key/" : { - "post" : { - "summary" : "POST /api/api-key/", - "description" : "Create a new API key (and an associated `User`) with the provided name and group ID.", + "/api/bookmark/ordering" : { + "put" : { + "summary" : "PUT /api/bookmark/ordering", + "description" : "Sets the order of bookmarks for user.", "parameters" : [ ], "responses" : { "2XX" : { @@ -9405,63 +10819,46 @@ "schema" : { "type" : "object", "properties" : { - "group_id" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema.id" - }, - "name" : { - "type" : "string", - "minLength" : 1 + "orderings" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "item_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "type" : { + "type" : "string", + "enum" : [ "card", "dashboard", "collection", "document" ] + } + }, + "required" : [ "type", "item_id" ] + } } }, - "required" : [ "group_id", "name" ] + "required" : [ "orderings" ] } } } }, - "tags" : [ "/api/api-key" ] - }, - "get" : { - "summary" : "GET /api/api-key/", - "description" : "Get a list of API keys with the default scope. Non-paginated.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/api-key" ] - } - }, - "/api/api-key/count" : { - "get" : { - "summary" : "GET /api/api-key/count", - "description" : "Get the count of API keys in the DB with the default scope.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/api-key" ] + "tags" : [ "/api/bookmark" ] } }, - "/api/api-key/{id}" : { - "put" : { - "summary" : "PUT /api/api-key/{id}", - "description" : "Update an API key by changing its group and/or its name", + "/api/bookmark/{model}/{id}" : { + "post" : { + "summary" : "POST /api/bookmark/{model}/{id}", + "description" : "Create a new bookmark for user.", "parameters" : [ { + "in" : "path", + "name" : "model", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "card", "dashboard", "collection", "document" ] + } + }, { "in" : "path", "name" : "id", "required" : true, @@ -9482,114 +10879,48 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "group_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "name" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema.name" - } - } - } - } - } - }, - "tags" : [ "/api/api-key" ] + "tags" : [ "/api/bookmark" ] }, "delete" : { - "summary" : "DELETE /api/api-key/{id}", - "description" : "Delete an ApiKey", + "summary" : "DELETE /api/bookmark/{model}/{id}", + "description" : "Delete a bookmark. Will delete a bookmark assigned to the user making the request by model and id.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "model", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema.id" - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + "type" : "string", + "enum" : [ "card", "dashboard", "collection", "document" ] } - }, - "tags" : [ "/api/api-key" ] - } - }, - "/api/api-key/{id}/regenerate" : { - "put" : { - "summary" : "PUT /api/api-key/{id}/regenerate", - "description" : "Regenerate an API Key", - "parameters" : [ { + }, { "in" : "path", "name" : "id", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema.id" - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { - "description" : "map where {:id -> , :unmasked_key -> '.>, :masked_key -> , :prefix -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "id" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema.id" - }, - "masked_key" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema..key.masked" - }, - "prefix" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema.prefix" - }, - "unmasked_key" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema..key.raw" - } - }, - "required" : [ "id", "unmasked_key", "masked_key", "prefix" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/api-key" ] - } - }, - "/api/automagic-dashboards/database/{id}/candidates" : { - "get" : { - "summary" : "GET /api/automagic-dashboards/database/{id}/candidates", - "description" : "Return a list of candidates for automagic dashboards ordered by interestingness.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/bookmark" ] + } + }, + "/api/bug-reporting/connection-pool-details" : { + "get" : { + "summary" : "GET /api/bug-reporting/connection-pool-details", + "description" : "Returns database connection pool info for the current Metabase instance.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -9601,28 +10932,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/bug-reporting" ] } }, - "/api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}" : { + "/api/bug-reporting/details" : { "get" : { - "summary" : "GET /api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}", - "description" : "Return an automagic dashboard for an entity detail specified by `entity`\n with id `id` and a primary key of `indexed-value`.", - "parameters" : [ { - "in" : "path", - "name" : "model-index-id", - "required" : true, - "schema" : { - "type" : "integer" - } - }, { - "in" : "path", - "name" : "pk-id", - "required" : true, - "schema" : { - "type" : "integer" - } - } ], + "summary" : "GET /api/bug-reporting/details", + "description" : "Returns version and system information relevant to filing a bug report against Metabase.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -9634,40 +10951,44 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/bug-reporting" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}" : { + "/api/cache/" : { "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}", - "description" : "Return an automagic dashboard for entity `entity` with id `id`.", + "summary" : "GET /api/cache/", + "description" : "Return cache configuration.", "parameters" : [ { - "in" : "path", - "name" : "entity", + "in" : "query", + "name" : "model", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } + "default" : [ "root" ], + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "root", "database", "dashboard", "question" ] + } + }, + "description" : "Type of model" }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, + "in" : "query", + "name" : "collection", + "required" : false, "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "Collection id to filter results. Returns everything if not supplied." }, { "in" : "query", - "name" : "show", + "name" : "id", "required" : false, "schema" : { - "anyOf" : [ { - "const" : "all" - }, { - "type" : "integer", - "minimum" : 0 - } ] - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "Model id to get configuration for." } ], "responses" : { "2XX" : { @@ -9680,50 +11001,53 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] - } - }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}" : { - "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}", - "description" : "Return an automagic dashboard analyzing cell in automagic dashboard for entity `entity` defined by query\n `cell-query`.", - "parameters" : [ { - "in" : "path", - "name" : "entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } - }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + "tags" : [ "/api/cache" ] + }, + "put" : { + "summary" : "PUT /api/cache/", + "description" : "Store cache configuration.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - }, { - "in" : "path", - "name" : "cell-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "model" : { + "type" : "string", + "enum" : [ "root", "database", "dashboard", "question" ] + }, + "model_id" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "strategy" : { + "$ref" : "#/components/schemas/metabase.cache.api.cache-strategy" + } + }, + "required" : [ "model", "model_id", "strategy" ] + } + } } - }, { - "in" : "query", - "name" : "show", - "required" : false, - "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { - "type" : "integer", - "minimum" : 0 - } ] - }, - "description" : "invalid show value" - } ], + }, + "tags" : [ "/api/cache" ] + }, + "delete" : { + "summary" : "DELETE /api/cache/", + "description" : "Delete cache configurations.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -9735,65 +11059,84 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "model" : { + "type" : "string", + "enum" : [ "root", "database", "dashboard", "question" ] + }, + "model_id" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } + } + }, + "required" : [ "model", "model_id" ] + } + } + } + }, + "tags" : [ "/api/cache" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { - "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}", - "description" : "Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`\n with id `id` defined by query `cell-query`; compared with entity `comparison-entity` with id\n `comparison-entity-id-or-query.`.", + "/api/cache/invalidate" : { + "post" : { + "summary" : "POST /api/cache/invalidate", + "description" : "Invalidate cache entries.\n\n Use it like `/api/cache/invalidate?database=1&dashboard=15` (any number of database/dashboard/question can be\n supplied).\n\n `&include=overrides` controls whenever you want to invalidate cache for a specific cache configuration without\n touching all nested configurations, or you want your invalidation to trickle down to every card.", "parameters" : [ { - "in" : "path", - "name" : "entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } - }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } - }, { - "in" : "path", - "name" : "cell-query", - "required" : true, + "in" : "query", + "name" : "include", + "required" : false, "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" - } + "const" : "overrides" + }, + "description" : "All cache configuration overrides should invalidate cache too" }, { - "in" : "path", - "name" : "comparison-entity", - "required" : true, + "in" : "query", + "name" : "database", + "required" : false, "schema" : { - "type" : "string", - "enum" : [ "adhoc", "segment", "table" ] + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } }, - "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + "description" : "A list of database ids" }, { - "in" : "path", - "name" : "comparison-entity-id-or-query", - "required" : true, + "in" : "query", + "name" : "dashboard", + "required" : false, "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } + }, + "description" : "A list of dashboard ids" }, { "in" : "query", - "name" : "show", + "name" : "question", "required" : false, "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", "type" : "integer", "minimum" : 0 - } ] + } }, - "description" : "invalid show value" + "description" : "A list of question ids" } ], "responses" : { "2XX" : { @@ -9806,60 +11149,31 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/cache" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}" : { + "/api/card/" : { "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}", - "description" : "Return an automagic dashboard analyzing cell in question with id `id` defined by query `cell-query` using\n dashboard-template `dashboard-template`.", + "summary" : "GET /api/card/", + "description" : "Get all the Cards. Option filter param `f` can be used to change the set of Cards that are returned; default is\n `all`, but other options include `mine`, `bookmarked`, `database`, `table`, `using_model`, `using_segment`, and\n `archived`. See corresponding implementation functions above for the specific behavior of each filter\n option. :card_index:", "parameters" : [ { - "in" : "path", - "name" : "entity", + "in" : "query", + "name" : "f", "required" : true, "schema" : { + "default" : "all", "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } - }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } - }, { - "in" : "path", - "name" : "prefix", - "required" : true, - "schema" : { } - }, { - "in" : "path", - "name" : "dashboard-template", - "required" : true, - "schema" : { }, - "description" : "invalid value for dashboard template name" - }, { - "in" : "path", - "name" : "cell-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + "enum" : [ "archived", "table", "using_model", "bookmarked", "using_segment", "all", "mine", "database" ] } }, { "in" : "query", - "name" : "show", + "name" : "model_id", "required" : false, "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { - "type" : "integer", - "minimum" : 0 - } ] + "type" : "integer", + "minimum" : 1 }, - "description" : "invalid show value" + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -9872,76 +11186,177 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/card" ] + }, + "post" : { + "summary" : "POST /api/card/", + "description" : "Create a new `Card`. Card `type` can be `question`, `metric`, or `model`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "dashboard_tab_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "entity_id" : { + "type" : "string", + "minLength" : 1 + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "result_metadata" : { + "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "type" : { + "$ref" : "#/components/schemas/metabase.queries.schema.card-type" + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "description" : { + "type" : "string", + "minLength" : 1 + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "name", "dataset_query", "display", "visualization_settings" ] + } + } + } + }, + "tags" : [ "/api/card" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { - "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}", - "description" : "Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`\n with id `id` defined by query `cell-query` using dashboard-template `dashboard-template`; compared with entity\n `comparison-entity` with id `comparison-entity-id-or-query.`.", - "parameters" : [ { - "in" : "path", - "name" : "entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } - }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + "/api/card/collections" : { + "post" : { + "summary" : "POST /api/card/collections", + "description" : "Bulk update endpoint for Card Collections. Move a set of `Cards` with `card_ids` into a `Collection` with\n `collection_id`, or remove them from any Collections by passing a `null` `collection_id`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - }, { - "in" : "path", - "name" : "prefix", - "required" : true, - "schema" : { } - }, { - "in" : "path", - "name" : "dashboard-template", - "required" : true, - "schema" : { }, - "description" : "invalid value for dashboard template name" - }, { - "in" : "path", - "name" : "cell-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "card_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "card_ids" ] + } + } } - }, { - "in" : "path", - "name" : "comparison-entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "segment", "table" ] + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/embeddable" : { + "get" : { + "summary" : "GET /api/card/embeddable", + "description" : "Fetch a list of Cards where `enable_embedding` is `true`. The cards can be embedded using the embedding endpoints\n and a signed JWT.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" - }, { + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/pivot/{card-id}/query" : { + "post" : { + "summary" : "POST /api/card/pivot/{card-id}/query", + "description" : "Run the query associated with a Card.", + "parameters" : [ { "in" : "path", - "name" : "comparison-entity-id-or-query", + "name" : "card-id", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } - }, { - "in" : "query", - "name" : "show", - "required" : false, - "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { - "type" : "integer", - "minimum" : 0 - } ] + "type" : "integer", + "minimum" : 1 }, - "description" : "invalid show value" + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -9954,58 +11369,70 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "ignore_cache" : { + "type" : "boolean" + } + } + } + } + } + }, + "tags" : [ "/api/card" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { + "/api/card/public" : { "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}", - "description" : "Return an automagic comparison dashboard for entity `entity` with id `id` compared with entity `comparison-entity`\n with id `comparison-entity-id-or-query.`", + "summary" : "GET /api/card/public", + "description" : "Fetch a list of Cards with public UUIDs. These cards are publicly-accessible *if* public sharing is enabled.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{card-id}/params/{param-key}/search/{query}" : { + "get" : { + "summary" : "GET /api/card/{card-id}/params/{param-key}/search/{query}", + "description" : "Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`.\n\n ;; fetch values for Card 1 parameter 'abc' that contain 'Orange';\n GET /api/card/1/params/abc/search/Orange\n\n Currently limited to first 1000 results.", "parameters" : [ { "in" : "path", - "name" : "entity-id-or-query", + "name" : "card-id", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." }, { "in" : "path", - "name" : "entity", + "name" : "param-key", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" } }, { "in" : "path", - "name" : "comparison-entity", + "name" : "query", "required" : true, "schema" : { "type" : "string", - "enum" : [ "adhoc", "segment", "table" ] - }, - "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" - }, { - "in" : "path", - "name" : "comparison-entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + "minLength" : 1 } - }, { - "in" : "query", - "name" : "show", - "required" : false, - "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { - "type" : "integer", - "minimum" : 0 - } ] - }, - "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -10018,27 +11445,28 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/card" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata" : { + "/api/card/{card-id}/params/{param-key}/values" : { "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata", - "description" : "Return all metadata for an automagic dashboard for entity `entity` with id `id`.", + "summary" : "GET /api/card/{card-id}/params/{param-key}/values", + "description" : "Fetch possible values of the parameter whose ID is `:param-key`.\n\n ;; fetch values for Card 1 parameter 'abc' that are possible\n GET /api/card/1/params/abc/values", "parameters" : [ { "in" : "path", - "name" : "entity", + "name" : "card-id", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." }, { "in" : "path", - "name" : "entity-id-or-query", + "name" : "param-key", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" } } ], "responses" : { @@ -10052,53 +11480,22 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/card" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}" : { - "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}", - "description" : "Return an automagic dashboard for entity `entity` with id `id` using dashboard-template `dashboard-template`.", + "/api/card/{card-id}/public_link" : { + "post" : { + "summary" : "POST /api/card/{card-id}/public_link", + "description" : "Generate publicly-accessible links for this Card. Returns UUID to be used in public links. (If this Card has\n already been shared, it will return the existing public link rather than creating a new one.) Public sharing must\n be enabled.", "parameters" : [ { "in" : "path", - "name" : "entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } - }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } - }, { - "in" : "path", - "name" : "prefix", - "required" : true, - "schema" : { } - }, { - "in" : "path", - "name" : "dashboard-template", + "name" : "card-id", "required" : true, - "schema" : { }, - "description" : "invalid value for dashboard template name" - }, { - "in" : "query", - "name" : "show", - "required" : false, "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { - "type" : "integer", - "minimum" : 0 - } ] + "type" : "integer", + "minimum" : 1 }, - "description" : "invalid show value" + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -10111,69 +11508,20 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] - } - }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { - "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}", - "description" : "Return an automagic comparison dashboard for entity `entity` with id `id` using dashboard-template\n `dashboard-template`; compared with entity `comparison-entity` with id `comparison-entity-id-or-query.`.", - "parameters" : [ { - "in" : "path", - "name" : "entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } - }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } - }, { - "in" : "path", - "name" : "prefix", - "required" : true, - "schema" : { } - }, { - "in" : "path", - "name" : "dashboard-template", - "required" : true, - "schema" : { }, - "description" : "invalid value for dashboard template name" - }, { - "in" : "path", - "name" : "comparison-entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "segment", "table" ] - }, - "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" - }, { - "in" : "path", - "name" : "comparison-entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } - }, { - "in" : "query", - "name" : "show", - "required" : false, - "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { - "type" : "integer", - "minimum" : 0 - } ] + "tags" : [ "/api/card" ] + }, + "delete" : { + "summary" : "DELETE /api/card/{card-id}/public_link", + "description" : "Delete the publicly-accessible link to this Card.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 }, - "description" : "invalid show value" + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -10186,14 +11534,29 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/card" ] } }, - "/api/bookmark/" : { - "get" : { - "summary" : "GET /api/bookmark/", - "description" : "Fetch all bookmarks for the user", - "parameters" : [ ], + "/api/card/{card-id}/query" : { + "post" : { + "summary" : "POST /api/card/{card-id}/query", + "description" : "Run the query associated with a Card.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -10205,14 +11568,54 @@ "description" : "Server error response" } }, - "tags" : [ "/api/bookmark" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "collection_preview" : { + "type" : "boolean" + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "ignore_cache" : { + "default" : false, + "type" : "boolean" + } + }, + "required" : [ "ignore_cache" ] + } + } + } + }, + "tags" : [ "/api/card" ] } }, - "/api/bookmark/ordering" : { - "put" : { - "summary" : "PUT /api/bookmark/ordering", - "description" : "Sets the order of bookmarks for user.", - "parameters" : [ ], + "/api/card/{card-id}/query/{export-format}" : { + "post" : { + "summary" : "POST /api/card/{card-id}/query/{export-format}", + "description" : "Run the query associated with a Card, and return its results as a file in the specified format.\n\n `parameters`, `pivot-results?` and `format-rows?` should be passed as application/x-www-form-urlencoded form content\n or json in the body. This is because this endpoint is normally used to power 'Download Results' buttons that use\n HTML `form` actions).", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "export-format", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" + } + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -10230,46 +11633,75 @@ "schema" : { "type" : "object", "properties" : { - "orderings" : { + "format_rows" : { + "default" : false, + "type" : "boolean" + }, + "parameters" : { "type" : "array", "items" : { "type" : "object", - "properties" : { - "item_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "type" : { - "type" : "string", - "enum" : [ "card", "dashboard", "collection", "document" ] - } - }, - "required" : [ "type", "item_id" ] + "additionalProperties" : { } } + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" } }, - "required" : [ "orderings" ] + "required" : [ "format_rows", "pivot_results" ] } } } }, - "tags" : [ "/api/bookmark" ] + "tags" : [ "/api/card" ] } }, - "/api/bookmark/{model}/{id}" : { - "post" : { - "summary" : "POST /api/bookmark/{model}/{id}", - "description" : "Create a new bookmark for user.", + "/api/card/{id}" : { + "get" : { + "summary" : "GET /api/card/{id}", + "description" : "Get `Card` with ID.\n\n As of v57, returns the MBQL query (`dataset_query`) as MBQL 5; to return the query as MBQL 4 (aka legacy MBQL)\n instead, you can specify `?legacy-mbql=true`.", "parameters" : [ { "in" : "path", - "name" : "model", + "name" : "id", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "card", "dashboard", "collection", "document" ] + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] } }, { + "in" : "query", + "name" : "legacy-mbql", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + }, + "put" : { + "summary" : "PUT /api/card/{id}", + "description" : "Update a `Card`.", + "parameters" : [ { "in" : "path", "name" : "id", "required" : true, @@ -10278,6 +11710,13 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "delete_old_dashcards", + "required" : false, + "schema" : { + "type" : "boolean" + } } ], "responses" : { "2XX" : { @@ -10290,20 +11729,98 @@ "description" : "Server error response" } }, - "tags" : [ "/api/bookmark" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "enable_embedding" : { + "type" : "boolean" + }, + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "dashboard_tab_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "collection_preview" : { + "type" : "boolean" + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "archived" : { + "type" : "boolean" + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "embedding_params" : { + "type" : "object", + "additionalProperties" : { + "type" : "string", + "enum" : [ "disabled", "enabled", "locked" ] + }, + "description" : "value must be a valid embedding params map." + }, + "result_metadata" : { + "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "type" : { + "$ref" : "#/components/schemas/metabase.queries.schema.card-type" + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "description" : { + "type" : "string" + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + } + } + } + } + }, + "tags" : [ "/api/card" ] }, "delete" : { - "summary" : "DELETE /api/bookmark/{model}/{id}", - "description" : "Delete a bookmark. Will delete a bookmark assigned to the user making the request by model and id.", + "summary" : "DELETE /api/card/{id}", + "description" : "Hard delete a Card. To soft delete, use `PUT /api/card/:id`", "parameters" : [ { - "in" : "path", - "name" : "model", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "card", "dashboard", "collection", "document" ] - } - }, { "in" : "path", "name" : "id", "required" : true, @@ -10324,14 +11841,23 @@ "description" : "Server error response" } }, - "tags" : [ "/api/bookmark" ] + "tags" : [ "/api/card" ] } }, - "/api/bug-reporting/connection-pool-details" : { - "get" : { - "summary" : "GET /api/bug-reporting/connection-pool-details", - "description" : "Returns database connection pool info for the current Metabase instance.", - "parameters" : [ ], + "/api/card/{id}/copy" : { + "post" : { + "summary" : "POST /api/card/{id}/copy", + "description" : "Copy a `Card`, with the new name 'Copy of _name_'", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -10343,14 +11869,23 @@ "description" : "Server error response" } }, - "tags" : [ "/api/bug-reporting" ] + "tags" : [ "/api/card" ] } }, - "/api/bug-reporting/details" : { + "/api/card/{id}/dashboards" : { "get" : { - "summary" : "GET /api/bug-reporting/details", - "description" : "Returns version and system information relevant to filing a bug report against Metabase.", - "parameters" : [ ], + "summary" : "GET /api/card/{id}/dashboards", + "description" : "Get a list of `{:name ... :id ...}` pairs for all the dashboards this card appears in.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -10362,103 +11897,35 @@ "description" : "Server error response" } }, - "tags" : [ "/api/bug-reporting" ] + "tags" : [ "/api/card" ] } }, - "/api/cache/" : { + "/api/card/{id}/params/{param-key}/remapping" : { "get" : { - "summary" : "GET /api/cache/", - "description" : "Return cache configuration.", + "summary" : "GET /api/card/{id}/params/{param-key}/remapping", + "description" : "Fetch the remapped value for a given value of the parameter with ID `:param-key`.\n\n ;; fetch the remapped value for Card 1 parameter 'abc' for value 100\n GET /api/card/1/params/abc/remapping?value=100", "parameters" : [ { - "in" : "query", - "name" : "model", + "in" : "path", + "name" : "id", "required" : true, "schema" : { - "default" : [ "root" ], - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "root", "database", "dashboard", "question" ] - } - }, - "description" : "Type of model" + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + } }, { - "in" : "query", - "name" : "collection", - "required" : false, + "in" : "path", + "name" : "param-key", + "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "Collection id to filter results. Returns everything if not supplied." + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" + } }, { "in" : "query", - "name" : "id", - "required" : false, + "name" : "value", + "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "Model id to get configuration for." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/cache" ] - }, - "put" : { - "summary" : "PUT /api/cache/", - "description" : "Store cache configuration.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "model" : { - "type" : "string", - "enum" : [ "root", "database", "dashboard", "question" ] - }, - "model_id" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - }, - "strategy" : { - "$ref" : "#/components/schemas/metabase.cache.api.cache-strategy" - } - }, - "required" : [ "model", "model_id", "strategy" ] - } - } + "type" : "string" } - }, - "tags" : [ "/api/cache" ] - }, - "delete" : { - "summary" : "DELETE /api/cache/", - "description" : "Delete cache configurations.", - "parameters" : [ ], + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -10470,84 +11937,28 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "model" : { - "type" : "string", - "enum" : [ "root", "database", "dashboard", "question" ] - }, - "model_id" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - } - } - }, - "required" : [ "model", "model_id" ] - } - } - } - }, - "tags" : [ "/api/cache" ] + "tags" : [ "/api/card" ] } }, - "/api/cache/invalidate" : { - "post" : { - "summary" : "POST /api/cache/invalidate", - "description" : "Invalidate cache entries.\n\n Use it like `/api/cache/invalidate?database=1&dashboard=15` (any number of database/dashboard/question can be\n supplied).\n\n `&include=overrides` controls whenever you want to invalidate cache for a specific cache configuration without\n touching all nested configurations, or you want your invalidation to trickle down to every card.", + "/api/card/{id}/query_metadata" : { + "get" : { + "summary" : "GET /api/card/{id}/query_metadata", + "description" : "Get all of the required query metadata for a card.", "parameters" : [ { - "in" : "query", - "name" : "include", - "required" : false, - "schema" : { - "const" : "overrides" - }, - "description" : "All cache configuration overrides should invalidate cache too" - }, { - "in" : "query", - "name" : "database", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - } - }, - "description" : "A list of database ids" - }, { - "in" : "query", - "name" : "dashboard", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - } - }, - "description" : "A list of dashboard ids" - }, { - "in" : "query", - "name" : "question", - "required" : false, + "in" : "path", + "name" : "id", + "required" : true, "schema" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater or equal to than zero.", + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", "type" : "integer", - "minimum" : 0 - } - }, - "description" : "A list of question ids" + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } } ], "responses" : { "2XX" : { @@ -10560,31 +11971,42 @@ "description" : "Server error response" } }, - "tags" : [ "/api/cache" ] + "tags" : [ "/api/card" ] } }, - "/api/card/" : { + "/api/card/{id}/series" : { "get" : { - "summary" : "GET /api/card/", - "description" : "Get all the Cards. Option filter param `f` can be used to change the set of Cards that are returned; default is\n `all`, but other options include `mine`, `bookmarked`, `database`, `table`, `using_model`, `using_segment`, and\n `archived`. See corresponding implementation functions above for the specific behavior of each filter\n option. :card_index:", - "parameters" : [ { - "in" : "query", - "name" : "f", + "summary" : "GET /api/card/{id}/series", + "description" : "Fetches a list of compatible series with the card with id `card_id`.\n\n - `last_cursor` with value is the id of the last card from the previous page to fetch the next page.\n - `query` to search card by name.\n - `exclude_ids` to filter out a list of card ids", + "parameters" : [ { + "in" : "path", + "name" : "id", "required" : true, "schema" : { - "default" : "all", - "type" : "string", - "enum" : [ "archived", "table", "using_model", "bookmarked", "using_segment", "all", "mine", "database" ] + "type" : "integer" } }, { "in" : "query", - "name" : "model_id", + "name" : "last_cursor", "required" : false, "schema" : { "type" : "integer", "minimum" : 1 }, "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "query", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "exclude_ids", + "required" : false, + "schema" : { } } ], "responses" : { "2XX" : { @@ -10598,10 +12020,12 @@ } }, "tags" : [ "/api/card" ] - }, + } + }, + "/api/cards/dashboards" : { "post" : { - "summary" : "POST /api/card/", - "description" : "Create a new `Card`. Card `type` can be `question`, `metric`, or `model`.", + "summary" : "POST /api/cards/dashboards", + "description" : "Get the dashboards that multiple cards appear in. The response is a sequence of maps, each of which has a `card_id`\n and `dashboards`. `dashboard` may include an `:error` key, either `:unreadable-dashboard` or\n `:unwritable-dashboard`. In the case of an `unreadable-dashboard` the dashboard details (name, ID) will NOT be\n present.", "parameters" : [ ], "responses" : { "2XX" : { @@ -10620,82 +12044,27 @@ "schema" : { "type" : "object", "properties" : { - "visualization_settings" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "dashboard_tab_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "entity_id" : { - "type" : "string", - "minLength" : 1 - }, - "dataset_query" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "parameter_mappings" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "result_metadata" : { - "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "type" : { - "$ref" : "#/components/schemas/metabase.queries.schema.card-type" - }, - "display" : { - "type" : "string", - "minLength" : 1 - }, - "parameters" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" - }, - "description" : { - "type" : "string", - "minLength" : 1 - }, - "dashboard_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "card_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } } }, - "required" : [ "name", "dataset_query", "display", "visualization_settings" ] + "required" : [ "card_ids" ] } } } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/cards" ] } }, - "/api/card/collections" : { + "/api/cards/move" : { "post" : { - "summary" : "POST /api/card/collections", - "description" : "Bulk update endpoint for Card Collections. Move a set of `Cards` with `card_ids` into a `Collection` with\n `collection_id`, or remove them from any Collections by passing a `null` `collection_id`.", + "summary" : "POST /api/cards/move", + "description" : "Moves a number of Cards to a single collection or dashboard.\n\n For now, just either succeed or fail as a batch - we can think more about error handling later down the road.", "parameters" : [ ], "responses" : { "2XX" : { @@ -10726,6 +12095,11 @@ "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 } }, "required" : [ "card_ids" ] @@ -10733,13 +12107,13 @@ } } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/cards" ] } }, - "/api/card/embeddable" : { + "/api/channel/" : { "get" : { - "summary" : "GET /api/card/embeddable", - "description" : "Fetch a list of Cards where `enable_embedding` is `true`. The cards can be embedded using the embedding endpoints\n and a signed JWT.", + "summary" : "GET /api/channel/", + "description" : "Get all channels", "parameters" : [ ], "responses" : { "2XX" : { @@ -10752,55 +12126,26 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] - } - }, - "/api/card/pivot/{card-id}/query" : { - "post" : { - "summary" : "POST /api/card/pivot/{card-id}/query", - "description" : "Run the query associated with a Card.", - "parameters" : [ { - "in" : "path", - "name" : "card-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, "requestBody" : { "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "ignore_cache" : { - "type" : "boolean" + "include_inactive" : { + "type" : "boolean", + "default" : false } } } } } }, - "tags" : [ "/api/card" ] - } - }, - "/api/card/public" : { - "get" : { - "summary" : "GET /api/card/public", - "description" : "Fetch a list of Cards with public UUIDs. These cards are publicly-accessible *if* public sharing is enabled.", + "tags" : [ "/api/channel" ] + }, + "post" : { + "summary" : "POST /api/channel/", + "description" : "Create a channel", "parameters" : [ ], "responses" : { "2XX" : { @@ -10813,73 +12158,45 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] - } - }, - "/api/card/{card-id}/params/{param-key}/search/{query}" : { - "get" : { - "summary" : "GET /api/card/{card-id}/params/{param-key}/search/{query}", - "description" : "Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`.\n\n ;; fetch values for Card 1 parameter 'abc' that contain 'Orange';\n GET /api/card/1/params/abc/search/Orange\n\n Currently limited to first 1000 results.", - "parameters" : [ { - "in" : "path", - "name" : "card-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "param-key", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" - } - }, { - "in" : "path", - "name" : "query", - "required" : true, - "schema" : { - "type" : "string", - "minLength" : 1 - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/card" ] - } - }, - "/api/card/{card-id}/params/{param-key}/values" : { - "get" : { - "summary" : "GET /api/card/{card-id}/params/{param-key}/values", - "description" : "Fetch possible values of the parameter whose ID is `:param-key`.\n\n ;; fetch values for Card 1 parameter 'abc' that are possible\n GET /api/card/1/params/abc/values", - "parameters" : [ { - "in" : "path", - "name" : "card-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "param-key", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "active" : { + "type" : "boolean", + "default" : true + }, + "description" : { + "type" : "string", + "minLength" : 1 + }, + "details" : { + "type" : "object", + "properties" : { } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "type" : { + "description" : "Must be a namespaced channel. E.g: channel/http" + } + }, + "required" : [ "name", "type", "details" ] + } + } } - } ], + }, + "tags" : [ "/api/channel" ] + } + }, + "/api/channel/test" : { + "post" : { + "summary" : "POST /api/channel/test", + "description" : "Test a channel connection", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -10891,16 +12208,35 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "details" : { + "type" : "object", + "properties" : { } + }, + "type" : { + "description" : "Must be a namespaced channel. E.g: channel/http" + } + }, + "required" : [ "type", "details" ] + } + } + } + }, + "tags" : [ "/api/channel" ] } }, - "/api/card/{card-id}/public_link" : { - "post" : { - "summary" : "POST /api/card/{card-id}/public_link", - "description" : "Generate publicly-accessible links for this Card. Returns UUID to be used in public links. (If this Card has\n already been shared, it will return the existing public link rather than creating a new one.) Public sharing must\n be enabled.", + "/api/channel/{id}" : { + "get" : { + "summary" : "GET /api/channel/{id}", + "description" : "Get a channel", "parameters" : [ { "in" : "path", - "name" : "card-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -10919,14 +12255,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/channel" ] }, - "delete" : { - "summary" : "DELETE /api/card/{card-id}/public_link", - "description" : "Delete the publicly-accessible link to this Card.", + "put" : { + "summary" : "PUT /api/channel/{id}", + "description" : "Update a channel", "parameters" : [ { "in" : "path", - "name" : "card-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -10945,88 +12281,60 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] - } - }, - "/api/card/{card-id}/query" : { - "post" : { - "summary" : "POST /api/card/{card-id}/query", - "description" : "Run the query associated with a Card.", - "parameters" : [ { - "in" : "path", - "name" : "card-id", - "required" : true, - "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, "requestBody" : { "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "collection_preview" : { + "active" : { "type" : "boolean" }, - "dashboard_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "description" : { + "type" : "string", + "minLength" : 1 }, - "ignore_cache" : { - "default" : false, - "type" : "boolean" + "details" : { + "type" : "object", + "properties" : { } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "type" : { + "description" : "Must be a namespaced channel. E.g: channel/http" } - }, - "required" : [ "ignore_cache" ] + } } } } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/channel" ] } }, - "/api/card/{card-id}/query/{export-format}" : { + "/api/cloud-migration/" : { "post" : { - "summary" : "POST /api/card/{card-id}/query/{export-format}", - "description" : "Run the query associated with a Card, and return its results as a file in the specified format.\n\n `parameters`, `pivot-results?` and `format-rows?` should be passed as application/x-www-form-urlencoded form content\n or json in the body. This is because this endpoint is normally used to power 'Download Results' buttons that use\n HTML `form` actions).", - "parameters" : [ { - "in" : "path", - "name" : "card-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 + "summary" : "POST /api/cloud-migration/", + "description" : "Initiate a new cloud migration.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "export-format", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - } ], + }, + "tags" : [ "/api/cloud-migration" ] + }, + "get" : { + "summary" : "GET /api/cloud-migration/", + "description" : "Get the latest cloud migration, if any.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11038,95 +12346,63 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "format_rows" : { - "default" : false, - "type" : "boolean" - }, - "parameters" : { - "type" : "array", - "items" : { - "type" : "object", - "additionalProperties" : { } - } - }, - "pivot_results" : { - "default" : false, - "type" : "boolean" - } - }, - "required" : [ "format_rows", "pivot_results" ] - } - } + "tags" : [ "/api/cloud-migration" ] + } + }, + "/api/cloud-migration/cancel" : { + "put" : { + "summary" : "PUT /api/cloud-migration/cancel", + "description" : "Cancel any ongoing cloud migrations, if any.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/cloud-migration" ] } }, - "/api/card/{id}" : { + "/api/collection/" : { "get" : { - "summary" : "GET /api/card/{id}", - "description" : "Get `Card` with ID.\n\n As of v57, returns the MBQL query (`dataset_query`) as MBQL 5; to return the query as MBQL 4 (aka legacy MBQL)\n instead, you can specify `?legacy-mbql=true`.", + "summary" : "GET /api/collection/", + "description" : "Fetch a list of all Collections that the current user has read permissions for (`:can_write` is returned as an\n additional property of each Collection so you can tell which of these you have write permissions for.)\n\n By default, this returns non-archived Collections, but instead you can show archived ones by passing\n `?archived=true`.\n\n By default, admin users will see all collections. To hide other user's collections pass in\n `?exclude-other-user-collections=true`.\n\n If personal-only is `true`, then return only personal collections where `personal_owner_id` is not `nil`.", "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, + "in" : "query", + "name" : "archived", + "required" : false, "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] + "type" : "boolean", + "default" : false } }, { "in" : "query", - "name" : "legacy-mbql", + "name" : "exclude-other-user-collections", "required" : false, "schema" : { "type" : "boolean", "default" : false } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/card" ] - }, - "put" : { - "summary" : "PUT /api/card/{id}", - "description" : "Update a `Card`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, + }, { + "in" : "query", + "name" : "namespace", + "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "minLength" : 1 + } }, { "in" : "query", - "name" : "delete_old_dashcards", + "name" : "personal-only", "required" : false, "schema" : { - "type" : "boolean" + "type" : "boolean", + "default" : false } } ], "responses" : { @@ -11140,134 +12416,75 @@ "description" : "Server error response" } }, + "tags" : [ "/api/collection" ] + }, + "post" : { + "summary" : "POST /api/collection/", + "description" : "Create a new Collection.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, "requestBody" : { "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "enable_embedding" : { - "type" : "boolean" - }, - "visualization_settings" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "dashboard_tab_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "collection_preview" : { - "type" : "boolean" - }, - "dataset_query" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } + "authority_level" : { + "type" : "string", + "enum" : [ "official" ] }, - "parameter_mappings" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + "description" : { + "type" : "string", + "minLength" : 1 }, "name" : { "type" : "string", "minLength" : 1 }, - "archived" : { - "type" : "boolean" - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "embedding_params" : { - "type" : "object", - "additionalProperties" : { - "type" : "string", - "enum" : [ "disabled", "enabled", "locked" ] - }, - "description" : "value must be a valid embedding params map." - }, - "result_metadata" : { - "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "namespace" : { + "type" : "string", + "minLength" : 1 }, - "cache_ttl" : { + "parent_id" : { "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 }, "type" : { - "$ref" : "#/components/schemas/metabase.queries.schema.card-type" - }, - "display" : { "type" : "string", - "minLength" : 1 - }, - "parameters" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" - }, - "description" : { - "type" : "string" - }, - "dashboard_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "enum" : [ "remote-synced" ] } - } + }, + "required" : [ "name" ] } } } }, - "tags" : [ "/api/card" ] - }, - "delete" : { - "summary" : "DELETE /api/card/{id}", - "description" : "Hard delete a Card. To soft delete, use `PUT /api/card/:id`", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/collection" ] } }, - "/api/card/{id}/copy" : { - "post" : { - "summary" : "POST /api/card/{id}/copy", - "description" : "Copy a `Card`, with the new name 'Copy of _name_'", + "/api/collection/graph" : { + "get" : { + "summary" : "GET /api/collection/graph", + "description" : "Fetch a graph of all Collection Permissions.", "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, + "in" : "query", + "name" : "namespace", + "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "minLength" : 1 + } } ], "responses" : { "2XX" : { @@ -11280,22 +12497,27 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] - } - }, - "/api/card/{id}/dashboards" : { - "get" : { - "summary" : "GET /api/card/{id}/dashboards", - "description" : "Get a list of `{:name ... :id ...}` pairs for all the dashboards this card appears in.", + "tags" : [ "/api/collection" ] + }, + "put" : { + "summary" : "PUT /api/collection/graph", + "description" : "Do a batch update of Collections Permissions by passing in a modified graph. Will overwrite parts of the graph that\n are present in the request, and leave the rest unchanged.\n\n If the `force` query parameter is `true`, a `revision` number is not required. The provided graph will be persisted\n as-is, and has the potential to clobber other writes that happened since the last read.\n\n If the `skip_graph` query parameter is `true`, it will only return the current revision, not the entire permissions\n graph.", "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, + "in" : "query", + "name" : "force", + "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "skip-graph", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } } ], "responses" : { "2XX" : { @@ -11308,33 +12530,44 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "groups" : { + "type" : "object", + "properties" : { } + }, + "namespace" : { + "type" : "string", + "minLength" : 1 + }, + "revision" : { + "description" : "value must be an integer.", + "type" : "integer" + } + }, + "required" : [ "groups" ] + } + } + } + }, + "tags" : [ "/api/collection" ] } }, - "/api/card/{id}/params/{param-key}/remapping" : { + "/api/collection/root" : { "get" : { - "summary" : "GET /api/card/{id}/params/{param-key}/remapping", - "description" : "Fetch the remapped value for a given value of the parameter with ID `:param-key`.\n\n ;; fetch the remapped value for Card 1 parameter 'abc' for value 100\n GET /api/card/1/params/abc/remapping?value=100", + "summary" : "GET /api/collection/root", + "description" : "Return the 'Root' Collection object with standard details added", "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.card" - } - }, { - "in" : "path", - "name" : "param-key", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" - } - }, { "in" : "query", - "name" : "value", - "required" : true, + "name" : "namespace", + "required" : false, "schema" : { - "type" : "string" + "type" : "string", + "minLength" : 1 } } ], "responses" : { @@ -11348,32 +12581,24 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/collection" ] } }, - "/api/card/{id}/query_metadata" : { + "/api/collection/root/dashboard-question-candidates" : { "get" : { - "summary" : "GET /api/card/{id}/query_metadata", - "description" : "Get all of the required query metadata for a card.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] - } - } ], + "summary" : "GET /api/collection/root/dashboard-question-candidates", + "description" : "Find cards in the root collection that can be moved into dashboards in the root collection. (Same as the above\n endpoint, but for the root collection)", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:data -> , :name -> , :description -> , :sole_dashboard_info -> , :name -> , :description -> }>}>, :total -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.collections.api.DashboardQuestionCandidatesResponse" + } + } + } }, "4XX" : { "description" : "Client error response" @@ -11382,32 +12607,51 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/collection" ] } }, - "/api/card/{id}/series" : { + "/api/collection/root/items" : { "get" : { - "summary" : "GET /api/card/{id}/series", - "description" : "Fetches a list of compatible series with the card with id `card_id`.\n\n - `last_cursor` with value is the id of the last card from the previous page to fetch the next page.\n - `query` to search card by name.\n - `exclude_ids` to filter out a list of card ids", + "summary" : "GET /api/collection/root/items", + "description" : "Fetch objects that the current user should see at their root level. As mentioned elsewhere, the 'Root' Collection\n doesn't actually exist as a row in the application DB: it's simply a virtual Collection where things with no\n `collection_id` exist. It does, however, have its own set of Permissions.\n\n This endpoint will actually show objects with no `collection_id` for Users that have Root Collection\n permissions, but for people without Root Collection perms, we'll just show the objects that have an effective\n location of `/`.\n\n This endpoint is intended to power a 'Root Folder View' for the Current User, so regardless you'll see all the\n top-level objects you're allowed to access.\n\n By default, this will show the 'normal' Collections namespace; to view a different Collections namespace, such as\n `snippets`, you can pass the `?namespace=` parameter.\n\n Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is\n changed, that should too.", "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, + "in" : "query", + "name" : "models", + "required" : false, "schema" : { - "type" : "integer" + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "dashboard", "dataset", "no_models", "timeline", "snippet", "collection", "document", "pulse", "metric", "card" ] + } } }, { "in" : "query", - "name" : "last_cursor", + "name" : "collection_type", "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "enum" : [ "remote-synced" ] + } }, { "in" : "query", - "name" : "query", + "name" : "include_can_run_adhoc_query", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "namespace", "required" : false, "schema" : { "type" : "string", @@ -11415,9 +12659,42 @@ } }, { "in" : "query", - "name" : "exclude_ids", + "name" : "pinned_state", "required" : false, - "schema" : { } + "schema" : { + "type" : "string", + "enum" : [ "is_not_pinned", "is_pinned", "all" ] + } + }, { + "in" : "query", + "name" : "sort_column", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "model", "name", "last_edited_by", "last_edited_at" ] + } + }, { + "in" : "query", + "name" : "sort_direction", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "desc", "asc" ] + } + }, { + "in" : "query", + "name" : "official_collections_first", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "show_dashboard_questions", + "required" : false, + "schema" : { + "type" : "boolean" + } } ], "responses" : { "2XX" : { @@ -11430,17 +12707,24 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/collection" ] } }, - "/api/cards/dashboards" : { + "/api/collection/root/move-dashboard-question-candidates" : { "post" : { - "summary" : "POST /api/cards/dashboards", - "description" : "Get the dashboards that multiple cards appear in. The response is a sequence of maps, each of which has a `card_id`\n and `dashboards`. `dashboard` may include an `:error` key, either `:unreadable-dashboard` or\n `:unwritable-dashboard`. In the case of an `unreadable-dashboard` the dashboard details (name, ID) will NOT be\n present.", + "summary" : "POST /api/collection/root/move-dashboard-question-candidates", + "description" : "Move candidate cards to the dashboards they appear in (for the root collection)", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:moved -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.collections.api.MoveDashboardQuestionCandidatesResponse" + } + } + } }, "4XX" : { "description" : "Client error response" @@ -11461,21 +12745,22 @@ "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 - } + }, + "uniqueItems" : true } }, - "required" : [ "card_ids" ] + "optional" : true } } } }, - "tags" : [ "/api/cards" ] + "tags" : [ "/api/collection" ] } }, - "/api/cards/move" : { - "post" : { - "summary" : "POST /api/cards/move", - "description" : "Moves a number of Cards to a single collection or dashboard.\n\n For now, just either succeed or fail as a batch - we can think more about error handling later down the road.", + "/api/collection/trash" : { + "get" : { + "summary" : "GET /api/collection/trash", + "description" : "Fetch the trash collection, as in `/api/collection/:trash-id`", "parameters" : [ ], "responses" : { "2XX" : { @@ -11488,44 +12773,55 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "card_ids" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "dashboard_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "card_ids" ] - } - } - } - }, - "tags" : [ "/api/cards" ] + "tags" : [ "/api/collection" ] } }, - "/api/channel/" : { + "/api/collection/tree" : { "get" : { - "summary" : "GET /api/channel/", - "description" : "Get all channels", - "parameters" : [ ], + "summary" : "GET /api/collection/tree", + "description" : "Similar to `GET /`, but returns Collections in a tree structure, e.g.\n\n ```\n [{:name \"A\"\n :below #{:card :dataset}\n :children [{:name \"B\"}\n {:name \"C\"\n :here #{:dataset :card}\n :below #{:dataset :card}\n :children [{:name \"D\"\n :here #{:dataset}\n :children [{:name \"E\"}]}\n {:name \"F\"\n :here #{:card}\n :children [{:name \"G\"}]}]}]}\n {:name \"H\"}]\n ```\n\n The here and below keys indicate the types of items at this particular level of the tree (here) and in its\n subtree (below).\n\n TODO: for historical reasons this returns Saved Questions AS 'card' AND Models as 'dataset'; we should fix this at\n some point in the future.", + "parameters" : [ { + "in" : "query", + "name" : "exclude-archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "exclude-other-user-collections", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "namespace", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "shallow", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "collection-id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11537,27 +12833,55 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "include_inactive" : { - "type" : "boolean", - "default" : false - } - } - } - } + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/{id}" : { + "get" : { + "summary" : "GET /api/collection/{id}", + "description" : "Fetch a specific Collection with standard details added", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, - "tags" : [ "/api/channel" ] + "tags" : [ "/api/collection" ] }, - "post" : { - "summary" : "POST /api/channel/", - "description" : "Create a channel", - "parameters" : [ ], + "put" : { + "summary" : "PUT /api/collection/{id}", + "description" : "Modify an existing Collection, including archiving or unarchiving it, or moving it.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11575,39 +12899,52 @@ "schema" : { "type" : "object", "properties" : { - "active" : { + "archived" : { "type" : "boolean", - "default" : true + "default" : false + }, + "authority_level" : { + "type" : "string", + "enum" : [ "official" ] }, "description" : { "type" : "string", "minLength" : 1 }, - "details" : { - "type" : "object", - "properties" : { } - }, "name" : { "type" : "string", "minLength" : 1 }, + "parent_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, "type" : { - "description" : "Must be a namespaced channel. E.g: channel/http" + "type" : "string", + "enum" : [ "remote-synced" ] } }, - "required" : [ "name", "type", "details" ] + "required" : [ ] } } } }, - "tags" : [ "/api/channel" ] - } - }, - "/api/channel/test" : { - "post" : { - "summary" : "POST /api/channel/test", - "description" : "Test a channel connection", - "parameters" : [ ], + "tags" : [ "/api/collection" ] + }, + "delete" : { + "summary" : "DELETE /api/collection/{id}", + "description" : "Deletes a collection permanently", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11619,32 +12956,13 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "details" : { - "type" : "object", - "properties" : { } - }, - "type" : { - "description" : "Must be a namespaced channel. E.g: channel/http" - } - }, - "required" : [ "type", "details" ] - } - } - } - }, - "tags" : [ "/api/channel" ] + "tags" : [ "/api/collection" ] } }, - "/api/channel/{id}" : { + "/api/collection/{id}/dashboard-question-candidates" : { "get" : { - "summary" : "GET /api/channel/{id}", - "description" : "Get a channel", + "summary" : "GET /api/collection/{id}/dashboard-question-candidates", + "description" : "Find cards in this collection that can be moved into dashboards in this collection.\n\n To be eligible, a card must only appear in one dashboard (which is also in this collection), and must not already be a\n dashboard question.", "parameters" : [ { "in" : "path", "name" : "id", @@ -11655,6 +12973,113 @@ }, "description" : "value must be an integer greater than zero." } ], + "responses" : { + "2XX" : { + "description" : "map where {:data -> , :name -> , :description -> , :sole_dashboard_info -> , :name -> , :description -> }>}>, :total -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.collections.api.DashboardQuestionCandidatesResponse" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/{id}/items" : { + "get" : { + "summary" : "GET /api/collection/{id}/items", + "description" : "Fetch a specific Collection's items with the following options:\n\n * `models` - only include objects of a specific set of `models`. If unspecified, returns objects of all models\n * `archived` - when `true`, return archived objects *instead* of unarchived ones. Defaults to `false`.\n * `pinned_state` - when `is_pinned`, return pinned objects only.\n when `is_not_pinned`, return non pinned objects only.\n when `all`, return everything. By default returns everything.\n * `include_can_run_adhoc_query` - when this is true hydrates the `can_run_adhoc_query` flag on card models\n\n Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is\n changed, that should too.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + }, { + "in" : "query", + "name" : "models", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "dashboard", "dataset", "no_models", "timeline", "snippet", "collection", "document", "pulse", "metric", "card" ] + } + } + }, { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_can_run_adhoc_query", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "pinned_state", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "is_not_pinned", "is_pinned", "all" ] + } + }, { + "in" : "query", + "name" : "sort_column", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "model", "name", "last_edited_by", "last_edited_at" ] + } + }, { + "in" : "query", + "name" : "sort_direction", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "desc", "asc" ] + } + }, { + "in" : "query", + "name" : "official_collections_first", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "show_dashboard_questions", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11666,11 +13091,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/channel" ] - }, - "put" : { - "summary" : "PUT /api/channel/{id}", - "description" : "Update a channel", + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/{id}/move-dashboard-question-candidates" : { + "post" : { + "summary" : "POST /api/collection/{id}/move-dashboard-question-candidates", + "description" : "Move candidate cards to the dashboards they appear in.", "parameters" : [ { "in" : "path", "name" : "id", @@ -11681,6 +13108,78 @@ }, "description" : "value must be an integer greater than zero." } ], + "responses" : { + "2XX" : { + "description" : "map where {:moved -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.collections.api.MoveDashboardQuestionCandidatesResponse" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "card_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "uniqueItems" : true + } + }, + "optional" : true + } + } + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/dashboard/" : { + "get" : { + "summary" : "GET /api/dashboard/", + "description" : "This endpoint is currently unused by the Metabase frontend and may be out of date with the rest of the application.\n It only exists for backwards compatibility and may be removed in the future.\n\n Get `Dashboards`. With filter option `f` (default `all`), restrict results as follows:\n * `all` - Return all Dashboards.\n * `mine` - Return Dashboards created by the current user.\n * `archived` - Return Dashboards that have been archived. (By default, these are *excluded*.)", + "parameters" : [ { + "in" : "query", + "name" : "f", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "all", "mine", "archived" ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + }, + "post" : { + "summary" : "POST /api/dashboard/", + "description" : "Create a new Dashboard.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11698,36 +13197,44 @@ "schema" : { "type" : "object", "properties" : { - "active" : { - "type" : "boolean" + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 }, - "description" : { - "type" : "string", - "minLength" : 1 + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 }, - "details" : { - "type" : "object", - "properties" : { } + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "description" : { + "type" : "string" }, "name" : { "type" : "string", "minLength" : 1 }, - "type" : { - "description" : "Must be a namespaced channel. E.g: channel/http" + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" } - } + }, + "required" : [ "name" ] } } } }, - "tags" : [ "/api/channel" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/cloud-migration/" : { - "post" : { - "summary" : "POST /api/cloud-migration/", - "description" : "Initiate a new cloud migration.", + "/api/dashboard/embeddable" : { + "get" : { + "summary" : "GET /api/dashboard/embeddable", + "description" : "Fetch a list of Dashboards where `enable_embedding` is `true`. The dashboards can be embedded using the embedding\n endpoints and a signed JWT.", "parameters" : [ ], "responses" : { "2XX" : { @@ -11740,12 +13247,34 @@ "description" : "Server error response" } }, - "tags" : [ "/api/cloud-migration" ] - }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/params/valid-filter-fields" : { "get" : { - "summary" : "GET /api/cloud-migration/", - "description" : "Get the latest cloud migration, if any.", - "parameters" : [ ], + "summary" : "GET /api/dashboard/params/valid-filter-fields", + "description" : "Utility endpoint for powering Dashboard UI. Given some set of `filtered` Field IDs (presumably Fields used in\n parameters) and a set of `filtering` Field IDs that will be used to restrict values of `filtered` Fields, for each\n `filtered` Field ID return the subset of `filtering` Field IDs that would actually be used in a chain filter query\n with these Fields.\n\n e.g. in a chain filter query like\n\n GET /api/dashboard/10/params/PARAM_1/values?PARAM_2=100\n\n Assume `PARAM_1` maps to Field 1 and `PARAM_2` maps to Fields 2 and 3. The underlying MBQL query may or may not\n filter against Fields 2 and 3, depending on whether an FK relationship that lets us create a join against Field 1\n can be found. You can use this endpoint to determine which of those Fields is actually used:\n\n GET /api/dashboard/params/valid-filter-fields?filtered=1&filtering=2&filtering=3\n ;; ->\n {1 [2 3]}\n\n Results are returned as a map of\n\n `filtered` Field ID -> subset of `filtering` Field IDs that would be used in chain filter query", + "parameters" : [ { + "in" : "query", + "name" : "filtered", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + } + }, { + "in" : "query", + "name" : "filtering", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + } + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11757,14 +13286,41 @@ "description" : "Server error response" } }, - "tags" : [ "/api/cloud-migration" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/cloud-migration/cancel" : { - "put" : { - "summary" : "PUT /api/cloud-migration/cancel", - "description" : "Cancel any ongoing cloud migrations, if any.", - "parameters" : [ ], + "/api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : { + "post" : { + "summary" : "POST /api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query", + "description" : "Run a pivot table query for a specific DashCard.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "dashcard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11776,46 +13332,44 @@ "description" : "Server error response" } }, - "tags" : [ "/api/cloud-migration" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "parameters" : { + "type" : "array", + "items" : { + "description" : "value must be a parameter map with an 'id' key", + "allOf" : [ { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id" ] + }, { + "type" : "object", + "additionalProperties" : { } + } ] + } + } + } + } + } + } + }, + "tags" : [ "/api/dashboard" ] } }, - "/api/collection/" : { + "/api/dashboard/public" : { "get" : { - "summary" : "GET /api/collection/", - "description" : "Fetch a list of all Collections that the current user has read permissions for (`:can_write` is returned as an\n additional property of each Collection so you can tell which of these you have write permissions for.)\n\n By default, this returns non-archived Collections, but instead you can show archived ones by passing\n `?archived=true`.\n\n By default, admin users will see all collections. To hide other user's collections pass in\n `?exclude-other-user-collections=true`.\n\n If personal-only is `true`, then return only personal collections where `personal_owner_id` is not `nil`.", - "parameters" : [ { - "in" : "query", - "name" : "archived", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "exclude-other-user-collections", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "namespace", - "required" : false, - "schema" : { - "type" : "string", - "minLength" : 1 - } - }, { - "in" : "query", - "name" : "personal-only", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - } ], + "summary" : "GET /api/dashboard/public", + "description" : "Fetch a list of Dashboards with public UUIDs. These dashboards are publicly-accessible *if* public sharing is\n enabled.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11827,11 +13381,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] - }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/save" : { "post" : { - "summary" : "POST /api/collection/", - "description" : "Create a new Collection.", + "summary" : "POST /api/dashboard/save", + "description" : "Save a denormalized description of dashboard.", "parameters" : [ ], "responses" : { "2XX" : { @@ -11844,54 +13400,22 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "authority_level" : { - "type" : "string", - "enum" : [ "official" ] - }, - "description" : { - "type" : "string", - "minLength" : 1 - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "namespace" : { - "type" : "string", - "minLength" : 1 - }, - "parent_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "name" ] - } - } - } - }, - "tags" : [ "/api/collection" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/collection/graph" : { - "get" : { - "summary" : "GET /api/collection/graph", - "description" : "Fetch a graph of all Collection Permissions.", - "parameters" : [ { - "in" : "query", - "name" : "namespace", - "required" : false, + "/api/dashboard/save/collection/{parent-collection-id}" : { + "post" : { + "summary" : "POST /api/dashboard/save/collection/{parent-collection-id}", + "description" : "Save a denormalized description of dashboard into collection with ID `:parent-collection-id`.", + "parameters" : [ { + "in" : "path", + "name" : "parent-collection-id", + "required" : true, "schema" : { - "type" : "string", - "minLength" : 1 - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -11904,27 +13428,40 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] - }, - "put" : { - "summary" : "PUT /api/collection/graph", - "description" : "Do a batch update of Collections Permissions by passing in a modified graph. Will overwrite parts of the graph that\n are present in the request, and leave the rest unchanged.\n\n If the `force` query parameter is `true`, a `revision` number is not required. The provided graph will be persisted\n as-is, and has the potential to clobber other writes that happened since the last read.\n\n If the `skip_graph` query parameter is `true`, it will only return the current revision, not the entire permissions\n graph.", + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : { + "post" : { + "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query", + "description" : "Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it.", "parameters" : [ { - "in" : "query", - "name" : "force", - "required" : false, + "in" : "path", + "name" : "dashboard-id", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." }, { - "in" : "query", - "name" : "skip-graph", - "required" : false, + "in" : "path", + "name" : "dashcard-id", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -11943,38 +13480,74 @@ "schema" : { "type" : "object", "properties" : { - "groups" : { - "type" : "object", - "properties" : { } - }, - "namespace" : { + "dashboard_load_id" : { "type" : "string", "minLength" : 1 }, - "revision" : { - "description" : "value must be an integer.", - "type" : "integer" + "parameters" : { + "type" : "array", + "items" : { + "description" : "value must be a parameter map with an 'id' key", + "allOf" : [ { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id" ] + }, { + "type" : "object", + "additionalProperties" : { } + } ] + } } - }, - "required" : [ "groups" ] + } } } } }, - "tags" : [ "/api/collection" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/collection/root" : { - "get" : { - "summary" : "GET /api/collection/root", - "description" : "Return the 'Root' Collection object with standard details added", + "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}" : { + "post" : { + "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}", + "description" : "Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it, and return\n its results as a file in the specified format.\n\n `parameters` should be passed as query parameter encoded as a serialized JSON string (this is because this endpoint\n is normally used to power 'Download Results' buttons that use HTML `form` actions).", "parameters" : [ { - "in" : "query", - "name" : "namespace", - "required" : false, + "in" : "path", + "name" : "dashboard-id", + "required" : true, "schema" : { - "type" : "string", - "minLength" : 1 + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "dashcard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "export-format", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" } } ], "responses" : { @@ -11988,112 +13561,83 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] - } - }, - "/api/collection/root/dashboard-question-candidates" : { - "get" : { - "summary" : "GET /api/collection/root/dashboard-question-candidates", - "description" : "Find cards in the root collection that can be moved into dashboards in the root collection. (Same as the above\n endpoint, but for the root collection)", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "map where {:data -> , :name -> , :description -> , :sole_dashboard_info -> , :name -> , :description -> }>}>, :total -> }", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.collections.api.DashboardQuestionCandidatesResponse" - } + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "format_rows" : { + "default" : false, + "type" : "boolean" + }, + "parameters" : { + "anyOf" : [ { + "type" : "array", + "items" : { + "description" : "value must be a parameter map with an 'id' key", + "allOf" : [ { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id" ] + }, { + "type" : "object", + "additionalProperties" : { } + } ] + } + }, { + "description" : "value must be a valid JSON string.", + "type" : "string" + } ] + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" + } + }, + "required" : [ "format_rows", "pivot_results" ] } } - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/collection" ] - } - }, - "/api/collection/root/items" : { - "get" : { - "summary" : "GET /api/collection/root/items", - "description" : "Fetch objects that the current user should see at their root level. As mentioned elsewhere, the 'Root' Collection\n doesn't actually exist as a row in the application DB: it's simply a virtual Collection where things with no\n `collection_id` exist. It does, however, have its own set of Permissions.\n\n This endpoint will actually show objects with no `collection_id` for Users that have Root Collection\n permissions, but for people without Root Collection perms, we'll just show the objects that have an effective\n location of `/`.\n\n This endpoint is intended to power a 'Root Folder View' for the Current User, so regardless you'll see all the\n top-level objects you're allowed to access.\n\n By default, this will show the 'normal' Collections namespace; to view a different Collections namespace, such as\n `snippets`, you can pass the `?namespace=` parameter.\n\n Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is\n changed, that should too.", - "parameters" : [ { - "in" : "query", - "name" : "models", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "dashboard", "dataset", "no_models", "timeline", "snippet", "collection", "document", "pulse", "metric", "card" ] - } - } - }, { - "in" : "query", - "name" : "include_can_run_adhoc_query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "archived", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "namespace", - "required" : false, - "schema" : { - "type" : "string", - "minLength" : 1 - } - }, { - "in" : "query", - "name" : "pinned_state", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "is_not_pinned", "is_pinned", "all" ] - } - }, { - "in" : "query", - "name" : "sort_column", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "model", "name", "last_edited_by", "last_edited_at" ] } - }, { - "in" : "query", - "name" : "sort_direction", - "required" : false, + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute" : { + "get" : { + "summary" : "GET /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute", + "description" : "Fetches the values for filling in execution parameters. Pass PK parameters and values to select.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, "schema" : { - "type" : "string", - "enum" : [ "desc", "asc" ] - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." }, { - "in" : "query", - "name" : "official_collections_first", - "required" : false, + "in" : "path", + "name" : "dashcard-id", + "required" : true, "schema" : { - "type" : "boolean" - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." }, { "in" : "query", - "name" : "show_dashboard_questions", + "name" : "parameters", "required" : false, "schema" : { - "type" : "boolean" - } + "type" : "string" + }, + "description" : "value must be a valid JSON string." } ], "responses" : { "2XX" : { @@ -12106,24 +13650,33 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] - } - }, - "/api/collection/root/move-dashboard-question-candidates" : { + "tags" : [ "/api/dashboard" ] + }, "post" : { - "summary" : "POST /api/collection/root/move-dashboard-question-candidates", - "description" : "Move candidate cards to the dashboards they appear in (for the root collection)", - "parameters" : [ ], + "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute", + "description" : "Execute the associated Action in the context of a `Dashboard` and `DashboardCard` that includes it.\n\n `parameters` should be the mapped dashboard parameters with values.\n `extra_parameters` should be the extra, user entered parameter values.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "dashcard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { - "description" : "map where {:moved -> }", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.collections.api.MoveDashboardQuestionCandidatesResponse" - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -12138,29 +13691,32 @@ "schema" : { "type" : "object", "properties" : { - "card_ids" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "uniqueItems" : true + "parameters" : { + "type" : "object", + "additionalProperties" : { } } - }, - "optional" : true + } } } } }, - "tags" : [ "/api/collection" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/collection/trash" : { - "get" : { - "summary" : "GET /api/collection/trash", - "description" : "Fetch the trash collection, as in `/api/collection/:trash-id`", - "parameters" : [ ], + "/api/dashboard/{dashboard-id}/public_link" : { + "post" : { + "summary" : "POST /api/dashboard/{dashboard-id}/public_link", + "description" : "Generate publicly-accessible links for this Dashboard. Returns UUID to be used in public links. (If this\n Dashboard has already been shared, it will return the existing public link rather than creating a new one.) Public\n sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -12172,49 +13728,43 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] - } - }, - "/api/collection/tree" : { - "get" : { - "summary" : "GET /api/collection/tree", - "description" : "Similar to `GET /`, but returns Collections in a tree structure, e.g.\n\n ```\n [{:name \"A\"\n :below #{:card :dataset}\n :children [{:name \"B\"}\n {:name \"C\"\n :here #{:dataset :card}\n :below #{:dataset :card}\n :children [{:name \"D\"\n :here #{:dataset}\n :children [{:name \"E\"}]}\n {:name \"F\"\n :here #{:card}\n :children [{:name \"G\"}]}]}]}\n {:name \"H\"}]\n ```\n\n The here and below keys indicate the types of items at this particular level of the tree (here) and in its\n subtree (below).\n\n TODO: for historical reasons this returns Saved Questions AS 'card' AND Models as 'dataset'; we should fix this at\n some point in the future.", + "tags" : [ "/api/dashboard" ] + }, + "delete" : { + "summary" : "DELETE /api/dashboard/{dashboard-id}/public_link", + "description" : "Delete the publicly-accessible link to this Dashboard.", "parameters" : [ { - "in" : "query", - "name" : "exclude-archived", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "exclude-other-user-collections", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "namespace", - "required" : false, - "schema" : { - "type" : "string", - "minLength" : 1 - } - }, { - "in" : "query", - "name" : "shallow", - "required" : false, + "in" : "path", + "name" : "dashboard-id", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - }, { - "in" : "query", - "name" : "collection-id", - "required" : false, + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{from-dashboard-id}/copy" : { + "post" : { + "summary" : "POST /api/dashboard/{from-dashboard-id}/copy", + "description" : "Copy a Dashboard.", + "parameters" : [ { + "in" : "path", + "name" : "from-dashboard-id", + "required" : true, "schema" : { "type" : "integer", "minimum" : 1 @@ -12232,28 +13782,87 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] - } - }, - "/api/collection/{id}" : { - "get" : { - "summary" : "GET /api/collection/{id}", - "description" : "Fetch a specific Collection with standard details added", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "description" : { + "type" : "string" + }, + "is_deep_copy" : { + "type" : "boolean", + "default" : false + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ ] + } + } + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}" : { + "get" : { + "summary" : "GET /api/dashboard/{id}", + "description" : "Get Dashboard with ID.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + }, + "delete" : { + "summary" : "DELETE /api/dashboard/{id}", + "description" : "Hard delete a Dashboard. To soft delete, use `PUT /api/dashboard/:id`\n\n This will remove also any questions/models/segments/metrics that use this database.", "parameters" : [ { "in" : "path", "name" : "id", "required" : true, "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -12266,11 +13875,11 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] + "tags" : [ "/api/dashboard" ] }, "put" : { - "summary" : "PUT /api/collection/{id}", - "description" : "Modify an existing Collection, including archiving or unarchiving it, or moving it.", + "summary" : "PUT /api/dashboard/{id}", + "description" : "Update a Dashboard, and optionally the `dashcards` and `tabs` of a Dashboard. The request body should be a JSON object with the same\n structure as the response from `GET /api/dashboard/:id`.", "parameters" : [ { "in" : "path", "name" : "id", @@ -12298,38 +13907,249 @@ "schema" : { "type" : "object", "properties" : { - "archived" : { - "type" : "boolean", - "default" : false + "points_of_interest" : { + "type" : "string" }, - "authority_level" : { - "type" : "string", - "enum" : [ "official" ] + "enable_embedding" : { + "type" : "boolean" }, - "description" : { + "width" : { "type" : "string", - "minLength" : 1 + "enum" : [ "fixed", "full" ] + }, + "show_in_getting_started" : { + "type" : "boolean" + }, + "position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 }, "name" : { "type" : "string", "minLength" : 1 }, - "parent_id" : { + "archived" : { + "type" : "boolean" + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "embedding_params" : { + "type" : "object", + "additionalProperties" : { + "type" : "string", + "enum" : [ "disabled", "enabled", "locked" ] + }, + "description" : "value must be a valid embedding params map." + }, + "tabs" : { + "description" : "value must be seq of maps in which ids are unique", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer.", + "type" : "integer" + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id", "name" ] + } + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "cache_ttl" : { "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 + }, + "caveats" : { + "type" : "string" + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "dashcards" : { + "description" : "value must be seq of maps in which ids are unique", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "col" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "id" : { + "type" : "integer" + }, + "inline_parameters" : { + "type" : "array", + "items" : { + "type" : "string", + "minLength" : 1 + } + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "row" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "series" : { + "type" : "array", + "items" : { + "type" : "object" + } + }, + "size_x" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "size_y" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "id", "size_x", "size_y", "row", "col" ] + } + }, + "description" : { + "type" : "string" + } + } + } + } + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}/cards" : { + "put" : { + "summary" : "PUT /api/dashboard/{id}/cards", + "description" : "(DEPRECATED -- Use the `PUT /api/dashboard/:id` endpoint instead.)\n Update `Cards` and `Tabs` on a Dashboard. Request body should have the form:\n\n {:cards [{:id ... ; DashboardCard ID\n :size_x ...\n :size_y ...\n :row ...\n :col ...\n :parameter_mappings ...\n :series [{:id 123\n ...}]}\n ...]\n :tabs [{:id ... ; DashboardTab ID\n :name ...}]}", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "cards" : { + "description" : "value must be seq of maps in which ids are unique", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "col" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "id" : { + "type" : "integer" + }, + "inline_parameters" : { + "type" : "array", + "items" : { + "type" : "string", + "minLength" : 1 + } + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "row" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "series" : { + "type" : "array", + "items" : { + "type" : "object" + } + }, + "size_x" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "size_y" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "id", "size_x", "size_y", "row", "col" ] + } + }, + "tabs" : { + "description" : "value must be seq of maps in which ids are unique", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer.", + "type" : "integer" + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id", "name" ] + } } }, - "required" : [ ] + "required" : [ "cards" ] } } } }, - "tags" : [ "/api/collection" ] - }, - "delete" : { - "summary" : "DELETE /api/collection/{id}", - "description" : "Deletes a collection permanently", + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}/items" : { + "get" : { + "summary" : "GET /api/dashboard/{id}/items", + "description" : "Get Dashboard with ID.", "parameters" : [ { "in" : "path", "name" : "id", @@ -12351,13 +14171,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/collection/{id}/dashboard-question-candidates" : { + "/api/dashboard/{id}/params/{param-key}/remapping" : { "get" : { - "summary" : "GET /api/collection/{id}/dashboard-question-candidates", - "description" : "Find cards in this collection that can be moved into dashboards in this collection.\n\n To be eligible, a card must only appear in one dashboard (which is also in this collection), and must not already be a\n dashboard question.", + "summary" : "GET /api/dashboard/{id}/params/{param-key}/remapping", + "description" : "Fetch the remapped value for a given value of the parameter with ID `:param-key`.\n\n ;; fetch the remapped value for Dashboard 1 parameter 'abc' for value 100\n GET /api/dashboard/1/params/abc/remapping?value=100", "parameters" : [ { "in" : "path", "name" : "id", @@ -12367,112 +14187,19 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "map where {:data -> , :name -> , :description -> , :sole_dashboard_info -> , :name -> , :description -> }>}>, :total -> }", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.collections.api.DashboardQuestionCandidatesResponse" - } - } - } - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/collection" ] - } - }, - "/api/collection/{id}/items" : { - "get" : { - "summary" : "GET /api/collection/{id}/items", - "description" : "Fetch a specific Collection's items with the following options:\n\n * `models` - only include objects of a specific set of `models`. If unspecified, returns objects of all models\n * `archived` - when `true`, return archived objects *instead* of unarchived ones. Defaults to `false`.\n * `pinned_state` - when `is_pinned`, return pinned objects only.\n when `is_not_pinned`, return non pinned objects only.\n when `all`, return everything. By default returns everything.\n * `include_can_run_adhoc_query` - when this is true hydrates the `can_run_adhoc_query` flag on card models\n\n Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is\n changed, that should too.", - "parameters" : [ { + }, { "in" : "path", - "name" : "id", + "name" : "param-key", "required" : true, "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] - } - }, { - "in" : "query", - "name" : "models", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "dashboard", "dataset", "no_models", "timeline", "snippet", "collection", "document", "pulse", "metric", "card" ] - } - } - }, { - "in" : "query", - "name" : "archived", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "include_can_run_adhoc_query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "pinned_state", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "is_not_pinned", "is_pinned", "all" ] - } - }, { - "in" : "query", - "name" : "sort_column", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "model", "name", "last_edited_by", "last_edited_at" ] - } - }, { - "in" : "query", - "name" : "sort_direction", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "desc", "asc" ] - } - }, { - "in" : "query", - "name" : "official_collections_first", - "required" : false, - "schema" : { - "type" : "boolean" + "type" : "string" } }, { "in" : "query", - "name" : "show_dashboard_questions", - "required" : false, + "name" : "value", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false + "type" : "string" } } ], "responses" : { @@ -12486,13 +14213,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/collection/{id}/move-dashboard-question-candidates" : { - "post" : { - "summary" : "POST /api/collection/{id}/move-dashboard-question-candidates", - "description" : "Move candidate cards to the dashboards they appear in.", + "/api/dashboard/{id}/params/{param-key}/search/{query}" : { + "get" : { + "summary" : "GET /api/dashboard/{id}/params/{param-key}/search/{query}", + "description" : "Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`. Optionally restrict\n these values by passing query parameters like `other-parameter=value` e.g.\n\n ;; fetch values for Dashboard 1 parameter 'abc' that contain 'Cam' and are possible when parameter 'def' is set\n ;; to 100\n GET /api/dashboard/1/params/abc/search/Cam?def=100\n\n Currently limited to first 1000 results.", "parameters" : [ { "in" : "path", "name" : "id", @@ -12502,60 +14229,13 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "map where {:moved -> }", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.collections.api.MoveDashboardQuestionCandidatesResponse" - } - } - } - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "card_ids" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "uniqueItems" : true - } - }, - "optional" : true - } - } - } - }, - "tags" : [ "/api/collection" ] - } - }, - "/api/dashboard/" : { - "get" : { - "summary" : "GET /api/dashboard/", - "description" : "This endpoint is currently unused by the Metabase frontend and may be out of date with the rest of the application.\n It only exists for backwards compatibility and may be removed in the future.\n\n Get `Dashboards`. With filter option `f` (default `all`), restrict results as follows:\n * `all` - Return all Dashboards.\n * `mine` - Return Dashboards created by the current user.\n * `archived` - Return Dashboards that have been archived. (By default, these are *excluded*.)", - "parameters" : [ { - "in" : "query", - "name" : "f", - "required" : false, + }, { + "in" : "path", + "name" : "query", + "required" : true, "schema" : { "type" : "string", - "enum" : [ "all", "mine", "archived" ] + "minLength" : 1 } } ], "responses" : { @@ -12563,74 +14243,29 @@ "description" : "Successful response" }, "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/dashboard" ] - }, - "post" : { - "summary" : "POST /api/dashboard/", - "description" : "Create a new Dashboard.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "description" : { - "type" : "string" - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "parameters" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" - } - }, - "required" : [ "name" ] - } - } + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, "tags" : [ "/api/dashboard" ] } }, - "/api/dashboard/embeddable" : { + "/api/dashboard/{id}/params/{param-key}/values" : { "get" : { - "summary" : "GET /api/dashboard/embeddable", - "description" : "Fetch a list of Dashboards where `enable_embedding` is `true`. The dashboards can be embedded using the embedding\n endpoints and a signed JWT.", - "parameters" : [ ], + "summary" : "GET /api/dashboard/{id}/params/{param-key}/values", + "description" : "Fetch possible values of the parameter whose ID is `:param-key`. If the values come directly from a query, optionally\n restrict these values by passing query parameters like `other-parameter=value` e.g.\n\n ;; fetch values for Dashboard 1 parameter 'abc' that are possible when parameter 'def' is set to 100\n GET /api/dashboard/1/params/abc/values?def=100", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -12645,29 +14280,24 @@ "tags" : [ "/api/dashboard" ] } }, - "/api/dashboard/params/valid-filter-fields" : { + "/api/dashboard/{id}/query_metadata" : { "get" : { - "summary" : "GET /api/dashboard/params/valid-filter-fields", - "description" : "Utility endpoint for powering Dashboard UI. Given some set of `filtered` Field IDs (presumably Fields used in\n parameters) and a set of `filtering` Field IDs that will be used to restrict values of `filtered` Fields, for each\n `filtered` Field ID return the subset of `filtering` Field IDs that would actually be used in a chain filter query\n with these Fields.\n\n e.g. in a chain filter query like\n\n GET /api/dashboard/10/params/PARAM_1/values?PARAM_2=100\n\n Assume `PARAM_1` maps to Field 1 and `PARAM_2` maps to Fields 2 and 3. The underlying MBQL query may or may not\n filter against Fields 2 and 3, depending on whether an FK relationship that lets us create a join against Field 1\n can be found. You can use this endpoint to determine which of those Fields is actually used:\n\n GET /api/dashboard/params/valid-filter-fields?filtered=1&filtering=2&filtering=3\n ;; ->\n {1 [2 3]}\n\n Results are returned as a map of\n\n `filtered` Field ID -> subset of `filtering` Field IDs that would be used in chain filter query", + "summary" : "GET /api/dashboard/{id}/query_metadata", + "description" : "Get all of the required query metadata for the cards on dashboard.", "parameters" : [ { - "in" : "query", - "name" : "filtered", + "in" : "path", + "name" : "id", "required" : true, "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.field" - } - } - }, { - "in" : "query", - "name" : "filtering", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.field" - } + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] } } ], "responses" : { @@ -12684,32 +14314,90 @@ "tags" : [ "/api/dashboard" ] } }, - "/api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : { - "post" : { - "summary" : "POST /api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query", - "description" : "Run a pivot table query for a specific DashCard.", + "/api/dashboard/{id}/related" : { + "get" : { + "summary" : "GET /api/dashboard/{id}/related", + "description" : "Return related entities.", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", "minimum" : 1 }, "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "dashcard-id", - "required" : true, + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/database/" : { + "get" : { + "summary" : "GET /api/database/", + "description" : "Fetch all `Databases`.\n\n * `include=tables` means we should hydrate the Tables belonging to each DB. Default: `false`.\n\n * `saved` means we should include the saved questions virtual database. Default: `false`.\n\n * `include_editable_data_model` will only include DBs for which the current user has data model editing\n permissions. (If `include=tables`, this also applies to the list of tables in each DB). Should only be used if\n Enterprise Edition code is available the advanced-permissions feature is enabled.\n\n * `exclude_uneditable_details` will only include DBs for which the current user can edit the DB details. Has no\n effect unless Enterprise Edition code is available and the advanced-permissions feature is enabled.\n\n * `include_only_uploadable` will only include DBs into which Metabase can insert new data.\n\n Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in\n [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for\n `:model/Database` in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user\n lacks permission to change the database details.", + "parameters" : [ { + "in" : "query", + "name" : "include", + "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 + "const" : "tables" }, - "description" : "value must be an integer greater than zero." + "description" : "include must be either empty or the value 'tables'" }, { - "in" : "path", - "name" : "card-id", - "required" : true, + "in" : "query", + "name" : "include_analytics", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "saved", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "exclude_uneditable_details", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_only_uploadable", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "router_database_id", + "required" : false, "schema" : { "type" : "integer", "minimum" : 1 @@ -12727,43 +14415,83 @@ "description" : "Server error response" } }, + "tags" : [ "/api/database" ] + }, + "post" : { + "summary" : "POST /api/database/", + "description" : "Add a new `Database`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, "requestBody" : { "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "parameters" : { - "type" : "array", - "items" : { - "description" : "value must be a parameter map with an 'id' key", - "allOf" : [ { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "id" ] - }, { - "type" : "object", - "additionalProperties" : { } - } ] - } + "provider_name" : { + "type" : "string" + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "is_on_demand" : { + "type" : "boolean", + "default" : false + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "engine" : { + "description" : "value must be a valid database engine.", + "type" : "string", + "minLength" : 1 + }, + "details" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "is_full_sync" : { + "type" : "boolean", + "default" : true + }, + "connection_source" : { + "type" : "string", + "enum" : [ "admin", "setup" ], + "default" : "admin" + }, + "auto_run_queries" : { + "type" : "boolean" + }, + "schedules" : { + "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap" } - } + }, + "required" : [ "name", "engine", "details" ] } } } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/public" : { - "get" : { - "summary" : "GET /api/dashboard/public", - "description" : "Fetch a list of Dashboards with public UUIDs. These dashboards are publicly-accessible *if* public sharing is\n enabled.", + "/api/database/sample_database" : { + "post" : { + "summary" : "POST /api/database/sample_database", + "description" : "Add the sample database as a new `Database`.", "parameters" : [ ], "responses" : { "2XX" : { @@ -12776,13 +14504,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/save" : { + "/api/database/validate" : { "post" : { - "summary" : "POST /api/dashboard/save", - "description" : "Save a denormalized description of dashboard.", + "summary" : "POST /api/database/validate", + "description" : "Validate that we can connect to a database given a set of details.", "parameters" : [ ], "responses" : { "2XX" : { @@ -12795,22 +14523,71 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "details" : { + "type" : "object", + "properties" : { + "details" : { + "type" : "object", + "properties" : { } + }, + "engine" : { + "description" : "value must be a valid database engine.", + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "engine", "details" ] + } + }, + "required" : [ "details" ] + } + } + } + }, + "tags" : [ "/api/database" ] } }, - "/api/dashboard/save/collection/{parent-collection-id}" : { - "post" : { - "summary" : "POST /api/dashboard/save/collection/{parent-collection-id}", - "description" : "Save a denormalized description of dashboard into collection with ID `:parent-collection-id`.", + "/api/database/{id}" : { + "get" : { + "summary" : "GET /api/database/{id}", + "description" : "Get a single Database with `id`. Optionally pass `?include=tables` or `?include=tables.fields` to include the Tables\n belonging to this database, or the Tables and Fields, respectively. If the requestor has write permissions for the\n DB\n (i.e. is an admin or has data model permissions), then certain inferred secret values will also be included in the\n returned details (see [[metabase.secrets.models.secret/expand-db-details-inferred-secret-values]] for full details).\n\n Passing include_editable_data_model will only return tables for which the current user has data model editing\n permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present.\n In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID\n and tables, with no additional metadata.\n\n Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in\n [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for `:model/Database`\n in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user lacks permission to change the\n database details.", "parameters" : [ { "in" : "path", - "name" : "parent-collection-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", "minimum" : 1 }, "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "tables", "tables.fields" ] + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "exclude_uneditable_details", + "required" : false, + "schema" : { + "type" : "boolean" + } } ], "responses" : { "2XX" : { @@ -12823,34 +14600,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] - } - }, - "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : { - "post" : { - "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query", - "description" : "Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it.", + "tags" : [ "/api/database" ] + }, + "put" : { + "summary" : "PUT /api/database/{id}", + "description" : "Update a `Database`.", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "dashcard-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "card-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -12875,53 +14632,92 @@ "schema" : { "type" : "object", "properties" : { - "dashboard_load_id" : { + "points_of_interest" : { + "type" : "string" + }, + "provider_name" : { + "type" : "string" + }, + "settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "name" : { "type" : "string", "minLength" : 1 }, - "parameters" : { - "type" : "array", - "items" : { - "description" : "value must be a parameter map with an 'id' key", - "allOf" : [ { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "id" ] - }, { - "type" : "object", - "additionalProperties" : { } - } ] - } + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "engine" : { + "description" : "value must be a valid database engine.", + "type" : "string", + "minLength" : 1 + }, + "details" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "auto_run_queries" : { + "type" : "boolean" + }, + "caveats" : { + "type" : "string" + }, + "refingerprint" : { + "type" : "boolean" + }, + "schedules" : { + "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap" + }, + "description" : { + "type" : "string" } } } } } }, - "tags" : [ "/api/dashboard" ] - } - }, - "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}" : { - "post" : { - "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}", - "description" : "Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it, and return\n its results as a file in the specified format.\n\n `parameters` should be passed as query parameter encoded as a serialized JSON string (this is because this endpoint\n is normally used to power 'Download Results' buttons that use HTML `form` actions).", + "tags" : [ "/api/database" ] + }, + "delete" : { + "summary" : "DELETE /api/database/{id}", + "description" : "Delete a `Database`.", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", "minimum" : 1 }, "description" : "value must be an integer greater than zero." - }, { + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/autocomplete_suggestions" : { + "get" : { + "summary" : "GET /api/database/{id}/autocomplete_suggestions", + "description" : "Return a list of autocomplete suggestions for a given `prefix`, or `substring`. Should only specify one, but\n `substring` will have priority if both are present.\n\n This is intended for use with the ACE Editor when the User is typing raw SQL. Suggestions include matching `Tables`\n and `Fields` in this `Database`.\n\n Tables are returned in the format `[table_name \"Table\"]`;\n When Fields have a semantic_type, they are returned in the format `[field_name \"table_name base_type semantic_type\"]`\n When Fields lack a semantic_type, they are returned in the format `[field_name \"table_name base_type\"]`", + "parameters" : [ { "in" : "path", - "name" : "dashcard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -12929,20 +14725,20 @@ }, "description" : "value must be an integer greater than zero." }, { - "in" : "path", - "name" : "card-id", - "required" : true, + "in" : "query", + "name" : "prefix", + "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "minLength" : 1 + } }, { - "in" : "path", - "name" : "export-format", - "required" : true, + "in" : "query", + "name" : "substring", + "required" : false, "schema" : { - "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" + "type" : "string", + "minLength" : 1 } } ], "responses" : { @@ -12956,69 +14752,16 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "format_rows" : { - "default" : false, - "type" : "boolean" - }, - "parameters" : { - "anyOf" : [ { - "type" : "array", - "items" : { - "description" : "value must be a parameter map with an 'id' key", - "allOf" : [ { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "id" ] - }, { - "type" : "object", - "additionalProperties" : { } - } ] - } - }, { - "description" : "value must be a valid JSON string.", - "type" : "string" - } ] - }, - "pivot_results" : { - "default" : false, - "type" : "boolean" - } - }, - "required" : [ "format_rows", "pivot_results" ] - } - } - } - }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute" : { + "/api/database/{id}/card_autocomplete_suggestions" : { "get" : { - "summary" : "GET /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute", - "description" : "Fetches the values for filling in execution parameters. Pass PK parameters and values to select.", + "summary" : "GET /api/database/{id}/card_autocomplete_suggestions", + "description" : "Return a list of `Card` autocomplete suggestions for a given `query` in a given `Database`.\n\n This is intended for use with the ACE Editor when the User is typing in a template tag for a `Card`, e.g. {{#...}}.", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "dashcard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -13027,12 +14770,19 @@ "description" : "value must be an integer greater than zero." }, { "in" : "query", - "name" : "parameters", + "name" : "query", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "include_dashboard_questions", "required" : false, "schema" : { - "type" : "string" - }, - "description" : "value must be a valid JSON string." + "type" : "boolean" + } } ], "responses" : { "2XX" : { @@ -13045,23 +14795,44 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] - }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/discard_values" : { "post" : { - "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute", - "description" : "Execute the associated Action in the context of a `Dashboard` and `DashboardCard` that includes it.\n\n `parameters` should be the mapped dashboard parameters with values.\n `extra_parameters` should be the extra, user entered parameter values.", + "summary" : "POST /api/database/{id}/discard_values", + "description" : "Discards all saved field values for this `Database`.", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", "minimum" : 1 }, "description" : "value must be an integer greater than zero." - }, { + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/dismiss_spinner" : { + "post" : { + "summary" : "POST /api/database/{id}/dismiss_spinner", + "description" : "Manually set the initial sync status of the `Database` and corresponding\n tables to be `complete` (see #20863)", + "parameters" : [ { "in" : "path", - "name" : "dashcard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -13080,31 +14851,16 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "parameters" : { - "type" : "object", - "additionalProperties" : { } - } - } - } - } - } - }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{dashboard-id}/public_link" : { - "post" : { - "summary" : "POST /api/dashboard/{dashboard-id}/public_link", - "description" : "Generate publicly-accessible links for this Dashboard. Returns UUID to be used in public links. (If this\n Dashboard has already been shared, it will return the existing public link rather than creating a new one.) Public\n sharing must be enabled.", + "/api/database/{id}/fields" : { + "get" : { + "summary" : "GET /api/database/{id}/fields", + "description" : "Get a list of all `Fields` in `Database`.", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -13123,14 +14879,16 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] - }, - "delete" : { - "summary" : "DELETE /api/dashboard/{dashboard-id}/public_link", - "description" : "Delete the publicly-accessible link to this Dashboard.", + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/healthcheck" : { + "get" : { + "summary" : "GET /api/database/{id}/healthcheck", + "description" : "Reports whether the database can currently connect", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -13149,16 +14907,16 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{from-dashboard-id}/copy" : { - "post" : { - "summary" : "POST /api/dashboard/{from-dashboard-id}/copy", - "description" : "Copy a Dashboard.", + "/api/database/{id}/idfields" : { + "get" : { + "summary" : "GET /api/database/{id}/idfields", + "description" : "Get a list of all primary key `Fields` for `Database`.", "parameters" : [ { "in" : "path", - "name" : "from-dashboard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -13177,60 +14935,53 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "description" : { - "type" : "string" - }, - "is_deep_copy" : { - "type" : "boolean", - "default" : false - }, - "name" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ ] - } - } - } - }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}" : { + "/api/database/{id}/metadata" : { "get" : { - "summary" : "GET /api/dashboard/{id}", - "description" : "Get Dashboard with ID.", + "summary" : "GET /api/database/{id}/metadata", + "description" : "Get metadata about a `Database`, including all of its `Tables` and `Fields`. Returns DB, fields, and field values.\n By default only non-hidden tables and fields are returned. Passing include_hidden=true includes them.\n\n Passing include_editable_data_model will only return tables for which the current user has data model editing\n permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present.\n In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID\n and tables, with no additional metadata.", "parameters" : [ { "in" : "path", "name" : "id", "required" : true, "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_hidden", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "remove_inactive", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "skip_fields", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false } } ], "responses" : { @@ -13244,11 +14995,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] - }, - "delete" : { - "summary" : "DELETE /api/dashboard/{id}", - "description" : "Hard delete a Dashboard. To soft delete, use `PUT /api/dashboard/:id`\n\n This will remove also any questions/models/segments/metrics that use this database.", + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/rescan_values" : { + "post" : { + "summary" : "POST /api/database/{id}/rescan_values", + "description" : "Trigger a manual scan of the field values for this `Database`.", "parameters" : [ { "in" : "path", "name" : "id", @@ -13270,11 +15023,57 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] - }, - "put" : { - "summary" : "PUT /api/dashboard/{id}", - "description" : "Update a Dashboard, and optionally the `dashcards` and `tabs` of a Dashboard. The request body should be a JSON object with the same\n structure as the response from `GET /api/dashboard/:id`.", + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/schema/" : { + "get" : { + "summary" : "GET /api/database/{id}/schema/", + "description" : "Return a list of Tables for a Database whose `schema` is `nil` or an empty string.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_hidden", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/schema/{schema}" : { + "get" : { + "summary" : "GET /api/database/{id}/schema/{schema}", + "description" : "Returns a list of Tables for the given Database `id` and `schema`", "parameters" : [ { "in" : "path", "name" : "id", @@ -13284,6 +15083,22 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_hidden", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } } ], "responses" : { "2XX" : { @@ -13296,148 +15111,13 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "points_of_interest" : { - "type" : "string" - }, - "enable_embedding" : { - "type" : "boolean" - }, - "width" : { - "type" : "string", - "enum" : [ "fixed", "full" ] - }, - "show_in_getting_started" : { - "type" : "boolean" - }, - "position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "archived" : { - "type" : "boolean" - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "embedding_params" : { - "type" : "object", - "additionalProperties" : { - "type" : "string", - "enum" : [ "disabled", "enabled", "locked" ] - }, - "description" : "value must be a valid embedding params map." - }, - "tabs" : { - "description" : "value must be seq of maps in which ids are unique", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "description" : "value must be an integer.", - "type" : "integer" - }, - "name" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "id", "name" ] - } - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "caveats" : { - "type" : "string" - }, - "parameters" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" - }, - "dashcards" : { - "description" : "value must be seq of maps in which ids are unique", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "col" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - }, - "id" : { - "type" : "integer" - }, - "inline_parameters" : { - "type" : "array", - "items" : { - "type" : "string", - "minLength" : 1 - } - }, - "parameter_mappings" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" - }, - "row" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - }, - "series" : { - "type" : "array", - "items" : { - "type" : "object" - } - }, - "size_x" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "size_y" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "id", "size_x", "size_y", "row", "col" ] - } - }, - "description" : { - "type" : "string" - } - } - } - } - } - }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/cards" : { - "put" : { - "summary" : "PUT /api/dashboard/{id}/cards", - "description" : "(DEPRECATED -- Use the `PUT /api/dashboard/:id` endpoint instead.)\n Update `Cards` and `Tabs` on a Dashboard. Request body should have the form:\n\n {:cards [{:id ... ; DashboardCard ID\n :size_x ...\n :size_y ...\n :row ...\n :col ...\n :parameter_mappings ...\n :series [{:id 123\n ...}]}\n ...]\n :tabs [{:id ... ; DashboardTab ID\n :name ...}]}", + "/api/database/{id}/schemas" : { + "get" : { + "summary" : "GET /api/database/{id}/schemas", + "description" : "Returns a list of all the schemas with tables found for the database `id`. Excludes schemas with no tables.", "parameters" : [ { "in" : "path", "name" : "id", @@ -13447,6 +15127,22 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_hidden", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } } ], "responses" : { "2XX" : { @@ -13459,92 +15155,13 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "cards" : { - "description" : "value must be seq of maps in which ids are unique", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "col" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - }, - "id" : { - "type" : "integer" - }, - "inline_parameters" : { - "type" : "array", - "items" : { - "type" : "string", - "minLength" : 1 - } - }, - "parameter_mappings" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" - }, - "row" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - }, - "series" : { - "type" : "array", - "items" : { - "type" : "object" - } - }, - "size_x" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "size_y" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "id", "size_x", "size_y", "row", "col" ] - } - }, - "tabs" : { - "description" : "value must be seq of maps in which ids are unique", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "description" : "value must be an integer.", - "type" : "integer" - }, - "name" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "id", "name" ] - } - } - }, - "required" : [ "cards" ] - } - } - } - }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/items" : { + "/api/database/{id}/settings-available" : { "get" : { - "summary" : "GET /api/dashboard/{id}/items", - "description" : "Get Dashboard with ID.", + "summary" : "GET /api/database/{id}/settings-available", + "description" : "Get all database-local settings and their availability for the given database.", "parameters" : [ { "in" : "path", "name" : "id", @@ -13557,7 +15174,20 @@ } ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:settings -> to , :reasons (optional) -> , :type -> , :message -> }>}>>}", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "settings" : { + "$ref" : "#/components/schemas/metabase.warehouses.api.available-settings" + } + }, + "required" : [ "settings" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -13566,13 +15196,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/params/{param-key}/remapping" : { - "get" : { - "summary" : "GET /api/dashboard/{id}/params/{param-key}/remapping", - "description" : "Fetch the remapped value for a given value of the parameter with ID `:param-key`.\n\n ;; fetch the remapped value for Dashboard 1 parameter 'abc' for value 100\n GET /api/dashboard/1/params/abc/remapping?value=100", + "/api/database/{id}/sync_schema" : { + "post" : { + "summary" : "POST /api/database/{id}/sync_schema", + "description" : "Trigger a manual update of the schema metadata for this `Database`.", "parameters" : [ { "in" : "path", "name" : "id", @@ -13582,20 +15212,6 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "param-key", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "in" : "query", - "name" : "value", - "required" : true, - "schema" : { - "type" : "string" - } } ], "responses" : { "2XX" : { @@ -13608,13 +15224,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/params/{param-key}/search/{query}" : { + "/api/database/{id}/syncable_schemas" : { "get" : { - "summary" : "GET /api/dashboard/{id}/params/{param-key}/search/{query}", - "description" : "Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`. Optionally restrict\n these values by passing query parameters like `other-parameter=value` e.g.\n\n ;; fetch values for Dashboard 1 parameter 'abc' that contain 'Cam' and are possible when parameter 'def' is set\n ;; to 100\n GET /api/dashboard/1/params/abc/search/Cam?def=100\n\n Currently limited to first 1000 results.", + "summary" : "GET /api/database/{id}/syncable_schemas", + "description" : "Returns a list of all syncable schemas found for the database `id`.", "parameters" : [ { "in" : "path", "name" : "id", @@ -13624,14 +15240,6 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "query", - "required" : true, - "schema" : { - "type" : "string", - "minLength" : 1 - } } ], "responses" : { "2XX" : { @@ -13644,13 +15252,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/params/{param-key}/values" : { + "/api/database/{id}/usage_info" : { "get" : { - "summary" : "GET /api/dashboard/{id}/params/{param-key}/values", - "description" : "Fetch possible values of the parameter whose ID is `:param-key`. If the values come directly from a query, optionally\n restrict these values by passing query parameters like `other-parameter=value` e.g.\n\n ;; fetch values for Dashboard 1 parameter 'abc' that are possible when parameter 'def' is set to 100\n GET /api/dashboard/1/params/abc/values?def=100", + "summary" : "GET /api/database/{id}/usage_info", + "description" : "Get usage info for a database.\n Returns a map with keys are models and values are the number of entities that use this database.", "parameters" : [ { "in" : "path", "name" : "id", @@ -13672,29 +15280,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/query_metadata" : { + "/api/database/{virtual-db}/datasets" : { "get" : { - "summary" : "GET /api/dashboard/{id}/query_metadata", - "description" : "Get all of the required query metadata for the cards on dashboard.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] - } - } ], + "summary" : "GET /api/database/{virtual-db}/datasets", + "description" : "Returns a list of all the datasets found for the saved questions virtual database.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -13706,23 +15299,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/related" : { + "/api/database/{virtual-db}/datasets/{schema}" : { "get" : { - "summary" : "GET /api/dashboard/{id}/related", - "description" : "Return related entities.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "summary" : "GET /api/database/{virtual-db}/datasets/{schema}", + "description" : "Returns a list of Tables for the datasets virtual database.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -13734,71 +15318,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/database/" : { + "/api/database/{virtual-db}/metadata" : { "get" : { - "summary" : "GET /api/database/", - "description" : "Fetch all `Databases`.\n\n * `include=tables` means we should hydrate the Tables belonging to each DB. Default: `false`.\n\n * `saved` means we should include the saved questions virtual database. Default: `false`.\n\n * `include_editable_data_model` will only include DBs for which the current user has data model editing\n permissions. (If `include=tables`, this also applies to the list of tables in each DB). Should only be used if\n Enterprise Edition code is available the advanced-permissions feature is enabled.\n\n * `exclude_uneditable_details` will only include DBs for which the current user can edit the DB details. Has no\n effect unless Enterprise Edition code is available and the advanced-permissions feature is enabled.\n\n * `include_only_uploadable` will only include DBs into which Metabase can insert new data.\n\n Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in\n [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for `:model/Database`\n in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user lacks permission to change the\n database details.", - "parameters" : [ { - "in" : "query", - "name" : "include", - "required" : false, - "schema" : { - "const" : "tables" - }, - "description" : "include must be either empty or the value 'tables'" - }, { - "in" : "query", - "name" : "include_analytics", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "saved", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "include_editable_data_model", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "exclude_uneditable_details", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "include_only_uploadable", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "router_database_id", - "required" : false, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "summary" : "GET /api/database/{virtual-db}/metadata", + "description" : "Endpoint that provides metadata for the Saved Questions 'virtual' database. Used for fooling the frontend\n and allowing it to treat the Saved Questions virtual DB just like any other database.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -13811,10 +15338,12 @@ } }, "tags" : [ "/api/database" ] - }, - "post" : { - "summary" : "POST /api/database/", - "description" : "Add a new `Database`.", + } + }, + "/api/database/{virtual-db}/schema/{schema}" : { + "get" : { + "summary" : "GET /api/database/{virtual-db}/schema/{schema}", + "description" : "Returns a list of Tables for the saved questions virtual database.", "parameters" : [ ], "responses" : { "2XX" : { @@ -13827,66 +15356,13 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "provider_name" : { - "type" : "string" - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "is_on_demand" : { - "type" : "boolean", - "default" : false - }, - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "engine" : { - "description" : "value must be a valid database engine.", - "type" : "string", - "minLength" : 1 - }, - "details" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "is_full_sync" : { - "type" : "boolean", - "default" : true - }, - "connection_source" : { - "type" : "string", - "enum" : [ "admin", "setup" ], - "default" : "admin" - }, - "auto_run_queries" : { - "type" : "boolean" - }, - "schedules" : { - "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap" - } - }, - "required" : [ "name", "engine", "details" ] - } - } - } - }, "tags" : [ "/api/database" ] } }, - "/api/database/sample_database" : { - "post" : { - "summary" : "POST /api/database/sample_database", - "description" : "Add the sample database as a new `Database`.", + "/api/database/{virtual-db}/schemas" : { + "get" : { + "summary" : "GET /api/database/{virtual-db}/schemas", + "description" : "Returns a list of all the schemas found for the saved questions virtual database.", "parameters" : [ ], "responses" : { "2XX" : { @@ -13902,10 +15378,10 @@ "tags" : [ "/api/database" ] } }, - "/api/database/validate" : { + "/api/dataset/" : { "post" : { - "summary" : "POST /api/database/validate", - "description" : "Validate that we can connect to a database given a set of details.", + "summary" : "POST /api/dataset/", + "description" : "Execute a query and retrieve the results in the usual format. The query will not use the cache.", "parameters" : [ ], "responses" : { "2XX" : { @@ -13924,66 +15400,22 @@ "schema" : { "type" : "object", "properties" : { - "details" : { - "type" : "object", - "properties" : { - "details" : { - "type" : "object", - "properties" : { } - }, - "engine" : { - "description" : "value must be a valid database engine.", - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "engine", "details" ] + "database" : { + "type" : "integer" } - }, - "required" : [ "details" ] + } } } } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/dataset" ] } }, - "/api/database/{id}" : { - "get" : { - "summary" : "GET /api/database/{id}", - "description" : "Get a single Database with `id`. Optionally pass `?include=tables` or `?include=tables.fields` to include the Tables\n belonging to this database, or the Tables and Fields, respectively. If the requestor has write permissions for the\n DB\n (i.e. is an admin or has data model permissions), then certain inferred secret values will also be included in the\n returned details (see [[metabase.secrets.models.secret/expand-db-details-inferred-secret-values]] for full details).\n\n Passing include_editable_data_model will only return tables for which the current user has data model editing\n permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present.\n In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID\n and tables, with no additional metadata.\n\n Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in\n [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for `:model/Database`\n in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user lacks permission to change the\n database details.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "include", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "tables", "tables.fields" ] - } - }, { - "in" : "query", - "name" : "include_editable_data_model", - "required" : false, - "schema" : { - "type" : "boolean" - } - }, { - "in" : "query", - "name" : "exclude_uneditable_details", - "required" : false, - "schema" : { - "type" : "boolean" - } - } ], + "/api/dataset/native" : { + "post" : { + "summary" : "POST /api/dataset/native", + "description" : "Fetch a native version of an MBQL query.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -13995,21 +15427,35 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] - }, - "put" : { - "summary" : "PUT /api/database/{id}", - "description" : "Update a `Database`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "pretty" : { + "type" : "boolean", + "default" : true + } + }, + "required" : [ "database" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] + } + }, + "/api/dataset/parameter/remapping" : { + "post" : { + "summary" : "POST /api/dataset/parameter/remapping", + "description" : "Return the remapped parameter values for cards or dashboards that are being edited.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14027,70 +15473,37 @@ "schema" : { "type" : "object", "properties" : { - "points_of_interest" : { - "type" : "string" - }, - "provider_name" : { - "type" : "string" - }, - "settings" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "engine" : { - "description" : "value must be a valid database engine.", - "type" : "string", - "minLength" : 1 - }, - "details" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "auto_run_queries" : { - "type" : "boolean" - }, - "caveats" : { - "type" : "string" - }, - "refingerprint" : { - "type" : "boolean" + "field_ids" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } }, - "schedules" : { - "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap" + "parameter" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" }, - "description" : { - "type" : "string" - } - } + "value" : { } + }, + "required" : [ "parameter", "value" ] } } } }, - "tags" : [ "/api/database" ] - }, - "delete" : { - "summary" : "DELETE /api/database/{id}", - "description" : "Delete a `Database`.", + "tags" : [ "/api/dataset" ] + } + }, + "/api/dataset/parameter/search/{query}" : { + "post" : { + "summary" : "POST /api/dataset/parameter/search/{query}", + "description" : "Return parameter values for cards or dashboards that are being edited. Expects a query string at `?query=foo`.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "query", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "minLength" : 1 + } } ], "responses" : { "2XX" : { @@ -14103,39 +15516,35 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "field_ids" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + }, + "parameter" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" + } + }, + "required" : [ "parameter" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] } }, - "/api/database/{id}/autocomplete_suggestions" : { - "get" : { - "summary" : "GET /api/database/{id}/autocomplete_suggestions", - "description" : "Return a list of autocomplete suggestions for a given `prefix`, or `substring`. Should only specify one, but\n `substring` will have priority if both are present.\n\n This is intended for use with the ACE Editor when the User is typing raw SQL. Suggestions include matching `Tables`\n and `Fields` in this `Database`.\n\n Tables are returned in the format `[table_name \"Table\"]`;\n When Fields have a semantic_type, they are returned in the format `[field_name \"table_name base_type semantic_type\"]`\n When Fields lack a semantic_type, they are returned in the format `[field_name \"table_name base_type\"]`", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "prefix", - "required" : false, - "schema" : { - "type" : "string", - "minLength" : 1 - } - }, { - "in" : "query", - "name" : "substring", - "required" : false, - "schema" : { - "type" : "string", - "minLength" : 1 - } - } ], + "/api/dataset/parameter/values" : { + "post" : { + "summary" : "POST /api/dataset/parameter/values", + "description" : "Return parameter values for cards or dashboards that are being edited.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14147,38 +15556,35 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "field_ids" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + }, + "parameter" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" + } + }, + "required" : [ "parameter" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] } }, - "/api/database/{id}/card_autocomplete_suggestions" : { - "get" : { - "summary" : "GET /api/database/{id}/card_autocomplete_suggestions", - "description" : "Return a list of `Card` autocomplete suggestions for a given `query` in a given `Database`.\n\n This is intended for use with the ACE Editor when the User is typing in a template tag for a `Card`, e.g. {{#...}}.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "query", - "required" : true, - "schema" : { - "type" : "string", - "minLength" : 1 - } - }, { - "in" : "query", - "name" : "include_dashboard_questions", - "required" : false, - "schema" : { - "type" : "boolean" - } - } ], + "/api/dataset/pivot" : { + "post" : { + "summary" : "POST /api/dataset/pivot", + "description" : "Generate a pivoted dataset for an ad-hoc query", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14190,23 +15596,31 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "database" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] } }, - "/api/database/{id}/discard_values" : { + "/api/dataset/query_metadata" : { "post" : { - "summary" : "POST /api/database/{id}/discard_values", - "description" : "Discards all saved field values for this `Database`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "summary" : "POST /api/dataset/query_metadata", + "description" : "Get all of the required query metadata for an ad-hoc query.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14218,22 +15632,37 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "database" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] } }, - "/api/database/{id}/dismiss_spinner" : { + "/api/dataset/{export-format}" : { "post" : { - "summary" : "POST /api/database/{id}/dismiss_spinner", - "description" : "Manually set the initial sync status of the `Database` and corresponding\n tables to be `complete` (see #20863)", + "summary" : "POST /api/dataset/{export-format}", + "description" : "Execute a query and download the result data as a file in the specified format.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "export-format", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" + } } ], "responses" : { "2XX" : { @@ -14246,23 +15675,43 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "format_rows" : { + "default" : false, + "type" : "boolean" + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" + }, + "query" : { + "type" : "object", + "properties" : { } + }, + "visualization_settings" : { + "default" : { }, + "type" : "object", + "properties" : { } + } + }, + "required" : [ "query", "visualization_settings", "format_rows", "pivot_results" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] } }, - "/api/database/{id}/fields" : { - "get" : { - "summary" : "GET /api/database/{id}/fields", - "description" : "Get a list of all `Fields` in `Database`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "/api/ee/action-v2/execute" : { + "post" : { + "summary" : "POST /api/ee/action-v2/execute", + "description" : "Execute an action with a single input.\n\n Takes:\n - `action` - an identifier or an expression for what we want to execute.\n - `scope` - where the action is being invoked from.\n - `input` - a single map. currently these are typically a database table row pk, or query result.\n - `params` (optional) - a map of values for the parameters taken by the action's mapping.\n\n The `input` and `params` are used by the relevant mapping to calculate a map argument to the underlying action fn.\n If there is no mapping, `params` are simply used as overrides for `input`.\n\n Returns the outputs from the performed action.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14274,23 +15723,40 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "action" : { + "$ref" : "#/components/schemas/metabase-enterprise.action-v2.api.api-action-id-or-expression" + }, + "input" : { + "type" : "object", + "properties" : { } + }, + "params" : { + "type" : "object", + "properties" : { } + }, + "scope" : { + "$ref" : "#/components/schemas/metabase.actions.types..scope.raw" + } + }, + "required" : [ "action", "scope" ] + } + } + } + }, + "tags" : [ "/api/ee/action-v2" ] } }, - "/api/database/{id}/healthcheck" : { - "get" : { - "summary" : "GET /api/database/{id}/healthcheck", - "description" : "Reports whether the database can currently connect", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "/api/ee/action-v2/execute-bulk" : { + "post" : { + "summary" : "POST /api/ee/action-v2/execute-bulk", + "description" : "Execute an action with multiple inputs.\n\n This is typically more efficient than calling execute with each input individually, for example by performing batch\n SQL operations.\n\n Takes:\n - `action` - an identifier or an expression for what we want to execute.\n - `scope` - where the action is being invoked from.\n - `inputs` - a list of maps. currently these are typically a database table row pk, or query result.\n - `params` (optional) - a map of values for the parameters taken by the action's mapping.\n\n The `inputs` and `params` are used by the relevant mapping to calculate a list of args for the underlying action fn.\n If there is no mapping, `params` are simply used as overrides for each map within `inputs`.\n\n Returns the outputs from the performed action.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14302,23 +15768,44 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] - } - }, - "/api/database/{id}/idfields" : { - "get" : { - "summary" : "GET /api/database/{id}/idfields", - "description" : "Get a list of all primary key `Fields` for `Database`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "action" : { + "$ref" : "#/components/schemas/metabase-enterprise.action-v2.api.api-action-id-or-expression" + }, + "inputs" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { } + }, + "minItems" : 1 + }, + "params" : { + "type" : "object", + "additionalProperties" : { } + }, + "scope" : { + "$ref" : "#/components/schemas/metabase.actions.types..scope.raw" + } + }, + "required" : [ "action", "scope", "inputs" ] + } + } + } + }, + "tags" : [ "/api/ee/action-v2" ] + } + }, + "/api/ee/action-v2/execute-form" : { + "post" : { + "summary" : "POST /api/ee/action-v2/execute-form", + "description" : "Temporary endpoint for describing an actions parameters\n such that they can be presented correctly in a modal ahead of execution.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14330,41 +15817,33 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/action-v2" ] } }, - "/api/database/{id}/metadata" : { + "/api/ee/advanced-permissions/application/graph" : { "get" : { - "summary" : "GET /api/database/{id}/metadata", - "description" : "Get metadata about a `Database`, including all of its `Tables` and `Fields`. Returns DB, fields, and field values.\n By default only non-hidden tables and fields are returned. Passing include_hidden=true includes them.\n\n Passing include_editable_data_model will only return tables for which the current user has data model editing\n permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present.\n In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID\n and tables, with no additional metadata.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 + "summary" : "GET /api/ee/advanced-permissions/application/graph", + "description" : "Fetch a graph of Application Permissions.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "include_hidden", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "include_editable_data_model", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - }, { + }, + "tags" : [ "/api/ee/advanced-permissions/application" ] + }, + "put" : { + "summary" : "PUT /api/ee/advanced-permissions/application/graph", + "description" : "Do a batch update of Application Permissions by passing a modified graph.", + "parameters" : [ { "in" : "query", - "name" : "remove_inactive", + "name" : "skip-graph", "required" : false, "schema" : { "type" : "boolean", @@ -14372,7 +15851,7 @@ } }, { "in" : "query", - "name" : "skip_fields", + "name" : "force", "required" : false, "schema" : { "type" : "boolean", @@ -14390,17 +15869,36 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { } + } + } + } + }, + "tags" : [ "/api/ee/advanced-permissions/application" ] } }, - "/api/database/{id}/rescan_values" : { - "post" : { - "summary" : "POST /api/database/{id}/rescan_values", - "description" : "Trigger a manual scan of the field values for this `Database`.", + "/api/ee/advanced-permissions/impersonation/" : { + "get" : { + "summary" : "GET /api/ee/advanced-permissions/impersonation/", + "description" : "Fetch a list of all Impersonation policies currently in effect, or a single policy if both `group_id` and `db_id`\n are provided.", "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, + "in" : "query", + "name" : "group_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "db_id", + "required" : false, "schema" : { "type" : "integer", "minimum" : 1 @@ -14418,13 +15916,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/advanced-permissions/impersonation" ] } }, - "/api/database/{id}/schema/" : { - "get" : { - "summary" : "GET /api/database/{id}/schema/", - "description" : "Return a list of Tables for a Database whose `schema` is `nil` or an empty string.", + "/api/ee/advanced-permissions/impersonation/{id}" : { + "delete" : { + "summary" : "DELETE /api/ee/advanced-permissions/impersonation/{id}", + "description" : "Delete a Connection Impersonation entry.", "parameters" : [ { "in" : "path", "name" : "id", @@ -14434,22 +15932,6 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "include_hidden", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "include_editable_data_model", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } } ], "responses" : { "2XX" : { @@ -14462,39 +15944,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/advanced-permissions/impersonation" ] } }, - "/api/database/{id}/schema/{schema}" : { - "get" : { - "summary" : "GET /api/database/{id}/schema/{schema}", - "description" : "Returns a list of Tables for the given Database `id` and `schema`", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "include_hidden", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "include_editable_data_model", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - } ], + "/api/ee/ai-entity-analysis/analyze-chart" : { + "post" : { + "summary" : "POST /api/ee/ai-entity-analysis/analyze-chart", + "description" : "Analyze a chart image using an AI vision model. This function sends the image data to a separate external AI service for analysis.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14506,39 +15963,98 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "image_base64" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "timeline_events" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "timestamp" : { + "type" : "string" + } + }, + "required" : [ "name", "timestamp" ] + } + } + }, + "required" : [ "image_base64" ] + } + } + } + }, + "tags" : [ "/api/ee/ai-entity-analysis" ] } }, - "/api/database/{id}/schemas" : { - "get" : { - "summary" : "GET /api/database/{id}/schemas", - "description" : "Returns a list of all the schemas with tables found for the database `id`. Excludes schemas with no tables.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 + "/api/ee/ai-sql-fixer/fix" : { + "post" : { + "summary" : "POST /api/ee/ai-sql-fixer/fix", + "description" : "Suggest fixes for a SQL query.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "include_editable_data_model", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - }, { - "in" : "query", - "name" : "include_hidden", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "error_message" : { + "type" : "string" + }, + "query" : { + "type" : "object", + "properties" : { + "database" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "database" ] + } + }, + "required" : [ "query", "error_message" ] + } + } } - } ], + }, + "tags" : [ "/api/ee/ai-sql-fixer" ] + } + }, + "/api/ee/ai-sql-generation/generate" : { + "post" : { + "summary" : "POST /api/ee/ai-sql-generation/generate", + "description" : "Generate a SQL query.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14550,39 +16066,38 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "prompt" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "prompt", "database_id" ] + } + } + } + }, + "tags" : [ "/api/ee/ai-sql-generation" ] } }, - "/api/database/{id}/settings-available" : { + "/api/ee/audit-app/user/audit-info" : { "get" : { - "summary" : "GET /api/database/{id}/settings-available", - "description" : "Get all database-local settings and their availability for the given database.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "summary" : "GET /api/ee/audit-app/user/audit-info", + "description" : "Gets audit info for the current user if he has permissions to access the audit collection.\n Otherwise return an empty map.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:settings -> to , :reasons (optional) -> , :type -> , :message -> }>}>>}", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "settings" : { - "$ref" : "#/components/schemas/metabase.warehouses.api.available-settings" - } - }, - "required" : [ "settings" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -14591,13 +16106,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/audit-app/user" ] } }, - "/api/database/{id}/sync_schema" : { - "post" : { - "summary" : "POST /api/database/{id}/sync_schema", - "description" : "Trigger a manual update of the schema metadata for this `Database`.", + "/api/ee/audit-app/user/{id}/subscriptions" : { + "delete" : { + "summary" : "DELETE /api/ee/audit-app/user/{id}/subscriptions", + "description" : "Delete all Alert and DashboardSubscription subscriptions for a User (i.e., so they will no longer receive them).\n Archive all Alerts and DashboardSubscriptions created by the User. Only allowed for admins or for the current user.", "parameters" : [ { "in" : "path", "name" : "id", @@ -14619,23 +16134,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/audit-app/user" ] } }, - "/api/database/{id}/syncable_schemas" : { - "get" : { - "summary" : "GET /api/database/{id}/syncable_schemas", - "description" : "Returns a list of all syncable schemas found for the database `id`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "/api/ee/autodescribe/card/summarize" : { + "post" : { + "summary" : "POST /api/ee/autodescribe/card/summarize", + "description" : "Summarize a question.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14647,13 +16153,76 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "dataset" : { + "type" : "boolean" + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping" + } + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "result_metadata" : { + "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" + } + }, + "description" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "dataset_query", "display", "visualization_settings" ] + } + } + } + }, + "tags" : [ "/api/ee/autodescribe" ] } }, - "/api/database/{id}/usage_info" : { - "get" : { - "summary" : "GET /api/database/{id}/usage_info", - "description" : "Get usage info for a database.\n Returns a map with keys are models and values are the number of entities that use this database.", + "/api/ee/autodescribe/dashboard/summarize/{id}" : { + "post" : { + "summary" : "POST /api/ee/autodescribe/dashboard/summarize/{id}", + "description" : "Provide a summary of a dashboard.", "parameters" : [ { "in" : "path", "name" : "id", @@ -14675,13 +16244,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/autodescribe" ] } }, - "/api/database/{virtual-db}/datasets" : { + "/api/ee/billing/" : { "get" : { - "summary" : "GET /api/database/{virtual-db}/datasets", - "description" : "Returns a list of all the datasets found for the saved questions virtual database.", + "summary" : "GET /api/ee/billing/", + "description" : "Get billing information. This acts as a proxy between `metabase-billing-info-url` and the client,\n using the embedding token and signed in user's email to fetch the billing information.", "parameters" : [ ], "responses" : { "2XX" : { @@ -14694,14 +16263,22 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/billing" ] } }, - "/api/database/{virtual-db}/datasets/{schema}" : { - "get" : { - "summary" : "GET /api/database/{virtual-db}/datasets/{schema}", - "description" : "Returns a list of Tables for the datasets virtual database.", - "parameters" : [ ], + "/api/ee/cloud-add-ons/{product-type}" : { + "post" : { + "summary" : "POST /api/ee/cloud-add-ons/{product-type}", + "description" : "Purchase an add-on.", + "parameters" : [ { + "in" : "path", + "name" : "product-type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "metabase-ai" ] + } + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14713,14 +16290,46 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "terms_of_service" : { + "type" : "boolean" + } + }, + "required" : [ "terms_of_service" ] + } + } + } + }, + "tags" : [ "/api/ee/cloud-add-ons" ] } }, - "/api/database/{virtual-db}/metadata" : { + "/api/ee/comment/" : { "get" : { - "summary" : "GET /api/database/{virtual-db}/metadata", - "description" : "Endpoint that provides metadata for the Saved Questions 'virtual' database. Used for fooling the frontend\n and allowing it to treat the Saved Questions virtual DB just like any other database.", - "parameters" : [ ], + "summary" : "GET /api/ee/comment/", + "description" : "Get comments for an entity", + "parameters" : [ { + "in" : "query", + "name" : "target_type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "document" ] + } + }, { + "in" : "query", + "name" : "target_id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14728,17 +16337,15 @@ "4XX" : { "description" : "Client error response" }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/database" ] - } - }, - "/api/database/{virtual-db}/schema/{schema}" : { - "get" : { - "summary" : "GET /api/database/{virtual-db}/schema/{schema}", - "description" : "Returns a list of Tables for the saved questions virtual database.", + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/comment" ] + }, + "post" : { + "summary" : "POST /api/ee/comment/", + "description" : "Create a new comment", "parameters" : [ ], "responses" : { "2XX" : { @@ -14751,13 +16358,48 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "child_target_id" : { + "type" : "string" + }, + "content" : { + "type" : "object" + }, + "html" : { + "type" : "string" + }, + "parent_comment_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "target_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "target_type" : { + "type" : "string", + "enum" : [ "document" ] + } + }, + "required" : [ "target_type", "target_id", "content", "html" ] + } + } + } + }, + "tags" : [ "/api/ee/comment" ] } }, - "/api/database/{virtual-db}/schemas" : { + "/api/ee/comment/mentions" : { "get" : { - "summary" : "GET /api/database/{virtual-db}/schemas", - "description" : "Returns a list of all the schemas found for the saved questions virtual database.", + "summary" : "GET /api/ee/comment/mentions", + "description" : "Get a list of entities suitable for mentions. NOTE: only users for now.", "parameters" : [ ], "responses" : { "2XX" : { @@ -14770,14 +16412,23 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/comment" ] } }, - "/api/dataset/" : { - "post" : { - "summary" : "POST /api/dataset/", - "description" : "Execute a query and retrieve the results in the usual format. The query will not use the cache.", - "parameters" : [ ], + "/api/ee/comment/{comment-id}" : { + "put" : { + "summary" : "PUT /api/ee/comment/{comment-id}", + "description" : "Update a comment", + "parameters" : [ { + "in" : "path", + "name" : "comment-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14795,22 +16446,63 @@ "schema" : { "type" : "object", "properties" : { - "database" : { - "type" : "integer" + "content" : { + "type" : "object" + }, + "html" : { + "type" : "string" + }, + "is_resolved" : { + "type" : "boolean" } } } } } }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/comment" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/comment/{comment-id}", + "description" : "Soft delete a comment", + "parameters" : [ { + "in" : "path", + "name" : "comment-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/comment" ] } }, - "/api/dataset/native" : { + "/api/ee/comment/{comment-id}/reaction" : { "post" : { - "summary" : "POST /api/dataset/native", - "description" : "Fetch a native version of an MBQL query.", - "parameters" : [ ], + "summary" : "POST /api/ee/comment/{comment-id}/reaction", + "description" : "Toggle a reaction on a comment", + "parameters" : [ { + "in" : "path", + "name" : "comment-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14828,28 +16520,24 @@ "schema" : { "type" : "object", "properties" : { - "database" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "pretty" : { - "type" : "boolean", - "default" : true + "emoji" : { + "type" : "string", + "minLength" : 1, + "maxLength" : 10 } }, - "required" : [ "database" ] + "required" : [ "emoji" ] } } } }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/comment" ] } }, - "/api/dataset/parameter/remapping" : { - "post" : { - "summary" : "POST /api/dataset/parameter/remapping", - "description" : "Return the remapped parameter values for cards or dashboards that are being edited.", + "/api/ee/content-translation/csv" : { + "get" : { + "summary" : "GET /api/ee/content-translation/csv", + "description" : "Provides content translation dictionary in CSV", "parameters" : [ ], "responses" : { "2XX" : { @@ -14862,42 +16550,19 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "field_ids" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.field" - } - }, - "parameter" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" - }, - "value" : { } - }, - "required" : [ "parameter", "value" ] - } - } - } - }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/content-translation" ] } }, - "/api/dataset/parameter/search/{query}" : { - "post" : { - "summary" : "POST /api/dataset/parameter/search/{query}", - "description" : "Return parameter values for cards or dashboards that are being edited. Expects a query string at `?query=foo`.", + "/api/ee/content-translation/dictionary/{token}" : { + "get" : { + "summary" : "GET /api/ee/content-translation/dictionary/{token}", + "description" : "Fetch the content translation dictionary via a JSON Web Token signed with the `embedding-secret-key`.", "parameters" : [ { "in" : "path", - "name" : "query", + "name" : "token", "required" : true, "schema" : { - "type" : "string", - "minLength" : 1 + "type" : "string" } } ], "responses" : { @@ -14911,34 +16576,13 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "field_ids" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.field" - } - }, - "parameter" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" - } - }, - "required" : [ "parameter" ] - } - } - } - }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/content-translation" ] } }, - "/api/dataset/parameter/values" : { + "/api/ee/content-translation/upload-dictionary" : { "post" : { - "summary" : "POST /api/dataset/parameter/values", - "description" : "Return parameter values for cards or dashboards that are being edited.", + "summary" : "POST /api/ee/content-translation/upload-dictionary", + "description" : "Upload a CSV of content translations", "parameters" : [ ], "responses" : { "2XX" : { @@ -14953,33 +16597,43 @@ }, "requestBody" : { "content" : { - "application/json" : { + "multipart/form-data" : { "schema" : { "type" : "object", "properties" : { - "field_ids" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.field" - } - }, - "parameter" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" + "file" : { + "type" : "object", + "properties" : { + "filename" : { + "type" : "string" + }, + "tempfile" : { } + }, + "required" : [ "filename", "tempfile" ] } }, - "required" : [ "parameter" ] + "required" : [ "file" ] } } } }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/content-translation" ] } }, - "/api/dataset/pivot" : { + "/api/ee/database-replication/connection/{database-id}" : { "post" : { - "summary" : "POST /api/dataset/pivot", - "description" : "Generate a pivoted dataset for an ad-hoc query", - "parameters" : [ ], + "summary" : "POST /api/ee/database-replication/connection/{database-id}", + "description" : "Create a new PG replication connection for the specified database.", + "parameters" : [ { + "in" : "path", + "name" : "database-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14997,25 +16651,39 @@ "schema" : { "type" : "object", "properties" : { - "database" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "replicationSchemaFilters" : { + "type" : "object", + "properties" : { + "schema-filters-patterns" : { + "type" : "string" + }, + "schema-filters-type" : { + "type" : "string", + "enum" : [ "inclusion", "exclusion", "all" ] + } + }, + "required" : [ "schema-filters-type", "schema-filters-patterns" ] } - }, - "required" : [ "database" ] + } } } } }, - "tags" : [ "/api/dataset" ] - } - }, - "/api/dataset/query_metadata" : { - "post" : { - "summary" : "POST /api/dataset/query_metadata", - "description" : "Get all of the required query metadata for an ad-hoc query.", - "parameters" : [ ], + "tags" : [ "/api/ee/database-replication" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/database-replication/connection/{database-id}", + "description" : "Delete PG replication connection for the specified database.", + "parameters" : [ { + "in" : "path", + "name" : "database-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15027,37 +16695,22 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "database" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "database" ] - } - } - } - }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/database-replication" ] } }, - "/api/dataset/{export-format}" : { + "/api/ee/database-replication/connection/{database-id}/preview" : { "post" : { - "summary" : "POST /api/dataset/{export-format}", - "description" : "Execute a query and download the result data as a file in the specified format.", + "summary" : "POST /api/ee/database-replication/connection/{database-id}/preview", + "description" : "Return info about pg-replication connection that is about to be created.", "parameters" : [ { "in" : "path", - "name" : "export-format", + "name" : "database-id", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -15076,37 +16729,39 @@ "schema" : { "type" : "object", "properties" : { - "format_rows" : { - "default" : false, - "type" : "boolean" - }, - "pivot_results" : { - "default" : false, - "type" : "boolean" - }, - "query" : { - "type" : "object", - "properties" : { } - }, - "visualization_settings" : { - "default" : { }, + "replicationSchemaFilters" : { "type" : "object", - "properties" : { } + "properties" : { + "schema-filters-patterns" : { + "type" : "string" + }, + "schema-filters-type" : { + "type" : "string", + "enum" : [ "inclusion", "exclusion", "all" ] + } + }, + "required" : [ "schema-filters-type", "schema-filters-patterns" ] } - }, - "required" : [ "query", "visualization_settings", "format_rows", "pivot_results" ] + } } } } }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/database-replication" ] } }, - "/api/ee/action-v2/execute" : { + "/api/ee/database-routing/destination-database" : { "post" : { - "summary" : "POST /api/ee/action-v2/execute", - "description" : "Execute an action with a single input.\n\n Takes:\n - `action` - an identifier or an expression for what we want to execute.\n - `scope` - where the action is being invoked from.\n - `input` - a single map. currently these are typically a database table row pk, or query result.\n - `params` (optional) - a map of values for the parameters taken by the action's mapping.\n\n The `input` and `params` are used by the relevant mapping to calculate a map argument to the underlying action fn.\n If there is no mapping, `params` are simply used as overrides for `input`.\n\n Returns the outputs from the performed action.", - "parameters" : [ ], + "summary" : "POST /api/ee/database-routing/destination-database", + "description" : "Create new Destination Databases.\n\n Note that unlike the normal `POST /api/database` endpoint, does NOT check the details before adding the Database.\n\n This is OK, it's not an invariant that all database details are always valid, but it's something to note.", + "parameters" : [ { + "in" : "query", + "name" : "check_connection_details", + "required" : false, + "schema" : { + "type" : "boolean" + } + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15124,34 +16779,52 @@ "schema" : { "type" : "object", "properties" : { - "action" : { - "$ref" : "#/components/schemas/metabase-enterprise.action-v2.api.api-action-id-or-expression" - }, - "input" : { - "type" : "object", - "properties" : { } - }, - "params" : { - "type" : "object", - "properties" : { } + "destinations" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "details" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "name", "details" ] + } }, - "scope" : { - "$ref" : "#/components/schemas/metabase.actions.types..scope.raw" + "router_database_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 } }, - "required" : [ "action", "scope" ] + "required" : [ "router_database_id", "destinations" ] } } } }, - "tags" : [ "/api/ee/action-v2" ] + "tags" : [ "/api/ee/database-routing" ] } }, - "/api/ee/action-v2/execute-bulk" : { - "post" : { - "summary" : "POST /api/ee/action-v2/execute-bulk", - "description" : "Execute an action with multiple inputs.\n\n This is typically more efficient than calling execute with each input individually, for example by performing batch\n SQL operations.\n\n Takes:\n - `action` - an identifier or an expression for what we want to execute.\n - `scope` - where the action is being invoked from.\n - `inputs` - a list of maps. currently these are typically a database table row pk, or query result.\n - `params` (optional) - a map of values for the parameters taken by the action's mapping.\n\n The `inputs` and `params` are used by the relevant mapping to calculate a list of args for the underlying action fn.\n If there is no mapping, `params` are simply used as overrides for each map within `inputs`.\n\n Returns the outputs from the performed action.", - "parameters" : [ ], + "/api/ee/database-routing/router-database/{id}" : { + "put" : { + "summary" : "PUT /api/ee/database-routing/router-database/{id}", + "description" : "Updates an existing Database with the `user_attribute` to route on. Will either:\n - turn an existing Database into a Router database\n - change the `user_attribute` used to route for an existing Router database, or\n - turn a Router database into a regular Database\n depending on the value of `user_attribute`", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15169,37 +16842,22 @@ "schema" : { "type" : "object", "properties" : { - "action" : { - "$ref" : "#/components/schemas/metabase-enterprise.action-v2.api.api-action-id-or-expression" - }, - "inputs" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { } - }, - "minItems" : 1 - }, - "params" : { - "type" : "object", - "additionalProperties" : { } - }, - "scope" : { - "$ref" : "#/components/schemas/metabase.actions.types..scope.raw" + "user_attribute" : { + "type" : "string", + "minLength" : 1 } - }, - "required" : [ "action", "scope", "inputs" ] + } } } } }, - "tags" : [ "/api/ee/action-v2" ] + "tags" : [ "/api/ee/database-routing" ] } }, - "/api/ee/action-v2/execute-form" : { + "/api/ee/dependencies/check_card" : { "post" : { - "summary" : "POST /api/ee/action-v2/execute-form", - "description" : "Temporary endpoint for describing an actions parameters\n such that they can be presented correctly in a modal ahead of execution.", + "summary" : "POST /api/ee/dependencies/check_card", + "description" : "Check a proposed edit to a card, and return the card IDs for those cards this edit will break.", "parameters" : [ ], "responses" : { "2XX" : { @@ -15212,13 +16870,22 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/action-v2" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.card-body" + } + } + } + }, + "tags" : [ "/api/ee/dependencies" ] } }, - "/api/ee/advanced-permissions/application/graph" : { - "get" : { - "summary" : "GET /api/ee/advanced-permissions/application/graph", - "description" : "Fetch a graph of Application Permissions.", + "/api/ee/dependencies/check_snippet" : { + "post" : { + "summary" : "POST /api/ee/dependencies/check_snippet", + "description" : "Check a proposed edit to a native snippet, and return the cards, etc. which will be broken.", "parameters" : [ ], "responses" : { "2XX" : { @@ -15231,28 +16898,37 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/advanced-permissions/application" ] - }, - "put" : { - "summary" : "PUT /api/ee/advanced-permissions/application/graph", - "description" : "Do a batch update of Application Permissions by passing a modified graph.", - "parameters" : [ { - "in" : "query", - "name" : "skip-graph", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "force", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "content" : { + "type" : "string" + }, + "id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "description" : "snippet names cannot include '}' or start with spaces" + } + }, + "required" : [ "id" ] + } + } } - } ], + }, + "tags" : [ "/api/ee/dependencies" ] + } + }, + "/api/ee/dependencies/check_transform" : { + "post" : { + "summary" : "POST /api/ee/dependencies/check_transform", + "description" : "Check a proposed edit to a transform, and return the card, transform, etc. IDs for things that will break.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15268,22 +16944,21 @@ "content" : { "application/json" : { "schema" : { - "type" : "object", - "properties" : { } + "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.transform-body" } } } }, - "tags" : [ "/api/ee/advanced-permissions/application" ] + "tags" : [ "/api/ee/dependencies" ] } }, - "/api/ee/advanced-permissions/impersonation/" : { + "/api/ee/dependencies/graph" : { "get" : { - "summary" : "GET /api/ee/advanced-permissions/impersonation/", - "description" : "Fetch a list of all Impersonation policies currently in effect, or a single policy if both `group_id` and `db_id`\n are provided.", + "summary" : "GET /api/ee/dependencies/graph", + "description" : "This endpoint takes an :id and a supported entity :type, and returns a graph of all its upstream dependencies.\n The graph is represented by a list of :nodes and a list of :edges. Each node has an :id, :type, :data (which\n depends on the node type), and a map of :dependent_counts per entity type. Each edge is a :model/Dependency", "parameters" : [ { "in" : "query", - "name" : "group_id", + "name" : "id", "required" : false, "schema" : { "type" : "integer", @@ -15292,13 +16967,12 @@ "description" : "value must be an integer greater than zero." }, { "in" : "query", - "name" : "db_id", + "name" : "type", "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "enum" : [ "table", "card", "snippet", "transform", "dashboard", "document", "sandbox" ] + } } ], "responses" : { "2XX" : { @@ -15311,15 +16985,15 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/advanced-permissions/impersonation" ] + "tags" : [ "/api/ee/dependencies" ] } }, - "/api/ee/advanced-permissions/impersonation/{id}" : { - "delete" : { - "summary" : "DELETE /api/ee/advanced-permissions/impersonation/{id}", - "description" : "Delete a Connection Impersonation entry.", + "/api/ee/dependencies/graph/dependents" : { + "get" : { + "summary" : "GET /api/ee/dependencies/graph/dependents", + "description" : "This endpoint takes an :id, :type, :dependent_type, and an optional :dependent_card_type, and returns a list of\n all that entity's dependents with :dependent_type. If the :dependent_type is :card, the dependents are further\n filtered by :dependent_card_type.", "parameters" : [ { - "in" : "path", + "in" : "query", "name" : "id", "required" : true, "schema" : { @@ -15327,6 +17001,30 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "table", "card", "snippet", "transform", "dashboard", "document", "sandbox" ] + } + }, { + "in" : "query", + "name" : "dependent_type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "table", "card", "snippet", "transform", "dashboard", "document", "sandbox" ] + } + }, { + "in" : "query", + "name" : "dependent_card_type", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "question", "model", "metric" ] + } } ], "responses" : { "2XX" : { @@ -15339,13 +17037,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/advanced-permissions/impersonation" ] + "tags" : [ "/api/ee/dependencies" ] } }, - "/api/ee/ai-entity-analysis/analyze-chart" : { - "post" : { - "summary" : "POST /api/ee/ai-entity-analysis/analyze-chart", - "description" : "Analyze a chart image using an AI vision model. This function sends the image data to a separate external AI service for analysis.", + "/api/ee/document/" : { + "get" : { + "summary" : "GET /api/ee/document/", + "description" : "Gets existing `Documents`.", "parameters" : [ ], "responses" : { "2XX" : { @@ -15358,52 +17056,11 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "description" : { - "type" : "string" - }, - "image_base64" : { - "type" : "string" - }, - "name" : { - "type" : "string" - }, - "timeline_events" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "description" : { - "type" : "string" - }, - "name" : { - "type" : "string" - }, - "timestamp" : { - "type" : "string" - } - }, - "required" : [ "name", "timestamp" ] - } - } - }, - "required" : [ "image_base64" ] - } - } - } - }, - "tags" : [ "/api/ee/ai-entity-analysis" ] - } - }, - "/api/ee/ai-sql-fixer/fix" : { + "tags" : [ "/api/ee/document" ] + }, "post" : { - "summary" : "POST /api/ee/ai-sql-fixer/fix", - "description" : "Suggest fixes for a SQL query.", + "summary" : "POST /api/ee/document/", + "description" : "Create a new `Document`.", "parameters" : [ ], "responses" : { "2XX" : { @@ -15422,77 +17079,129 @@ "schema" : { "type" : "object", "properties" : { - "error_message" : { - "type" : "string" - }, - "query" : { + "cards" : { "type" : "object", - "properties" : { - "database" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "database" ] - } - }, - "required" : [ "query", "error_message" ] - } - } - } - }, - "tags" : [ "/api/ee/ai-sql-fixer" ] - } - }, - "/api/ee/ai-sql-generation/generate" : { - "post" : { - "summary" : "POST /api/ee/ai-sql-generation/generate", - "description" : "Generate a SQL query.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "database_id" : { + "additionalProperties" : { + "type" : "object", + "properties" : { + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "entity_id" : { + "type" : "string", + "minLength" : 1 + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "result_metadata" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "description" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "name", "dataset_query", "display", "visualization_settings" ] + } + }, + "collection_id" : { "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 }, - "prompt" : { + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "document" : { }, + "name" : { "type" : "string", - "minLength" : 1 + "minLength" : 1, + "maxLength" : 254 } }, - "required" : [ "prompt", "database_id" ] + "required" : [ "name", "document" ] } } } }, - "tags" : [ "/api/ee/ai-sql-generation" ] + "tags" : [ "/api/ee/document" ] } }, - "/api/ee/audit-app/user/audit-info" : { + "/api/ee/document/public" : { "get" : { - "summary" : "GET /api/ee/audit-app/user/audit-info", - "description" : "Gets audit info for the current user if he has permissions to access the audit collection.\n Otherwise return an empty map.", + "summary" : "GET /api/ee/document/public", + "description" : "List all Documents that have public links.\n\n Returns a sequence of Documents that have been publicly shared. Each Document includes its `:id`, `:name`,\n and `:public_uuid`. Documents are only actually accessible via the public endpoint if public sharing is\n currently enabled. Archived Documents are excluded from the results.\n\n This endpoint is used to populate the public links listing in the Admin settings UI.\n\n Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "sequence of map where {:name -> , :id -> , :public_uuid -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string" + }, + "public_uuid" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "name", "id", "public_uuid" ] + } + } + } + } }, "4XX" : { "description" : "Client error response" @@ -15501,16 +17210,16 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/audit-app/user" ] + "tags" : [ "/api/ee/document" ] } }, - "/api/ee/audit-app/user/{id}/subscriptions" : { - "delete" : { - "summary" : "DELETE /api/ee/audit-app/user/{id}/subscriptions", - "description" : "Delete all Alert and DashboardSubscription subscriptions for a User (i.e., so they will no longer receive them).\n Archive all Alerts and DashboardSubscriptions created by the User. Only allowed for admins or for the current user.", + "/api/ee/document/{document-id}" : { + "get" : { + "summary" : "GET /api/ee/document/{document-id}", + "description" : "Returns an existing Document by ID.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "document-id", "required" : true, "schema" : { "type" : "integer", @@ -15529,14 +17238,21 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/audit-app/user" ] - } - }, - "/api/ee/autodescribe/card/summarize" : { - "post" : { - "summary" : "POST /api/ee/autodescribe/card/summarize", - "description" : "Summarize a question.", - "parameters" : [ ], + "tags" : [ "/api/ee/document" ] + }, + "put" : { + "summary" : "PUT /api/ee/document/{document-id}", + "description" : "Updates an existing `Document`.", + "parameters" : [ { + "in" : "path", + "name" : "document-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15554,73 +17270,102 @@ "schema" : { "type" : "object", "properties" : { - "visualization_settings" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "dataset" : { + "archived" : { "type" : "boolean" }, - "dataset_query" : { - "description" : "Value must be a map.", + "cards" : { "type" : "object", - "properties" : { } - }, - "parameter_mappings" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping" + "additionalProperties" : { + "type" : "object", + "properties" : { + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "entity_id" : { + "type" : "string", + "minLength" : 1 + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "result_metadata" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "description" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "name", "dataset_query", "display", "visualization_settings" ] } }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "result_metadata" : { - "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" - }, "collection_id" : { "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 }, - "cache_ttl" : { + "collection_position" : { "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 }, - "display" : { - "type" : "string", - "minLength" : 1 - }, - "parameters" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" - } - }, - "description" : { + "document" : { }, + "name" : { "type" : "string", - "minLength" : 1 + "minLength" : 1, + "maxLength" : 254 } - }, - "required" : [ "dataset_query", "display", "visualization_settings" ] + } } } } }, - "tags" : [ "/api/ee/autodescribe" ] - } - }, - "/api/ee/autodescribe/dashboard/summarize/{id}" : { - "post" : { - "summary" : "POST /api/ee/autodescribe/dashboard/summarize/{id}", - "description" : "Provide a summary of a dashboard.", + "tags" : [ "/api/ee/document" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/document/{document-id}", + "description" : "Permanently deletes an archived Document.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "document-id", "required" : true, "schema" : { "type" : "integer", @@ -15639,109 +17384,39 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/autodescribe" ] - } - }, - "/api/ee/billing/" : { - "get" : { - "summary" : "GET /api/ee/billing/", - "description" : "Get billing information. This acts as a proxy between `metabase-billing-info-url` and the client,\n using the embedding token and signed in user's email to fetch the billing information.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/ee/billing" ] + "tags" : [ "/api/ee/document" ] } }, - "/api/ee/cloud-add-ons/{product-type}" : { + "/api/ee/document/{document-id}/card/{card-id}/query/{export-format}" : { "post" : { - "summary" : "POST /api/ee/cloud-add-ons/{product-type}", - "description" : "Purchase an add-on.", + "summary" : "POST /api/ee/document/{document-id}/card/{card-id}/query/{export-format}", + "description" : "Download query results for a Card embedded in a Document.\n\n Returns query results in the requested format. The user must have read access to the document\n to download results. If the card's query fails, standard query error responses are returned.\n\n Route parameters:\n - document-id: ID of the document containing the card\n - card-id: ID of the card to download results from\n - export-format: Output format (csv, xlsx, json)\n\n Body parameters (snake_case):\n - parameters: Optional query parameters (array of maps or JSON string)\n - format_rows: Whether to apply formatting to results (boolean, default false)\n - pivot_results: Whether to pivot results (boolean, default false)", "parameters" : [ { "in" : "path", - "name" : "product-type", + "name" : "document-id", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "metabase-ai" ] - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" + "type" : "integer", + "minimum" : 1 }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "terms_of_service" : { - "type" : "boolean" - } - }, - "required" : [ "terms_of_service" ] - } - } - } - }, - "tags" : [ "/api/ee/cloud-add-ons" ] - } - }, - "/api/ee/comment/" : { - "get" : { - "summary" : "GET /api/ee/comment/", - "description" : "Get comments for an entity", - "parameters" : [ { - "in" : "query", - "name" : "target_type", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "document" ] - } + "description" : "value must be an integer greater than zero." }, { - "in" : "query", - "name" : "target_id", + "in" : "path", + "name" : "card-id", "required" : true, "schema" : { "type" : "integer", "minimum" : 1 }, "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + }, { + "in" : "path", + "name" : "export-format", + "required" : true, + "schema" : { + "type" : "string" } - }, - "tags" : [ "/api/ee/comment" ] - }, - "post" : { - "summary" : "POST /api/ee/comment/", - "description" : "Create a new comment", - "parameters" : [ ], + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15759,46 +17434,68 @@ "schema" : { "type" : "object", "properties" : { - "child_target_id" : { - "type" : "string" - }, - "content" : { - "type" : "object" - }, - "html" : { - "type" : "string" - }, - "parent_comment_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "format_rows" : { + "default" : false, + "type" : "boolean" }, - "target_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "parameters" : { + "anyOf" : [ { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, { + "description" : "value must be a valid JSON string.", + "type" : "string" + } ] }, - "target_type" : { - "type" : "string", - "enum" : [ "document" ] + "pivot_results" : { + "default" : false, + "type" : "boolean" } }, - "required" : [ "target_type", "target_id", "content", "html" ] + "required" : [ "format_rows", "pivot_results" ] } } } }, - "tags" : [ "/api/ee/comment" ] + "tags" : [ "/api/ee/document" ] } }, - "/api/ee/comment/mentions" : { - "get" : { - "summary" : "GET /api/ee/comment/mentions", - "description" : "Get a list of entities suitable for mentions. NOTE: only users for now.", - "parameters" : [ ], + "/api/ee/document/{document-id}/public-link" : { + "post" : { + "summary" : "POST /api/ee/document/{document-id}/public-link", + "description" : "Generate a publicly-accessible UUID for a Document.\n\n Creates a public link that allows viewing the Document without authentication. If the Document already has\n a public UUID, returns the existing one rather than generating a new one. This enables sharing the Document\n via `GET /api/ee/public/document/:uuid`.\n\n Returns a map containing `:uuid` (the public UUID string).\n\n Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting.", + "parameters" : [ { + "in" : "path", + "name" : "document-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:uuid -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "uuid" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "uuid" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -15807,16 +17504,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/comment" ] - } - }, - "/api/ee/comment/{comment-id}" : { - "put" : { - "summary" : "PUT /api/ee/comment/{comment-id}", - "description" : "Update a comment", + "tags" : [ "/api/ee/document" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/document/{document-id}/public-link", + "description" : "Remove the public link for a Document.\n\n Deletes the public UUID from the Document, making it no longer accessible via the public sharing endpoint.\n This revokes public access to the Document - the existing public link will no longer work.\n\n Returns a 204 No Content response on success.\n\n Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting.\n Throws a 404 if the Document doesn't exist, is archived, or doesn't have a public link.", "parameters" : [ { "in" : "path", - "name" : "comment-id", + "name" : "document-id", "required" : true, "schema" : { "type" : "integer", @@ -15835,41 +17530,96 @@ "description" : "Server error response" } }, + "tags" : [ "/api/ee/document" ] + } + }, + "/api/ee/email/override" : { + "put" : { + "summary" : "PUT /api/ee/email/override", + "description" : "Update multiple cloud email Settings. You must be a superuser or have `setting` permission to do this.\n Calling this automatically sets `cloud-smtp-enabled` to true if the settings are valid.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, "requestBody" : { "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "content" : { - "type" : "object" + "email-smtp-host-override" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "null" + } ] }, - "html" : { - "type" : "string" + "email-smtp-password-override" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "null" + } ] }, - "is_resolved" : { - "type" : "boolean" + "email-smtp-port-override" : { + "anyOf" : [ { + "type" : "integer" + }, { + "type" : "null" + } ] + }, + "email-smtp-security-override" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "null" + } ] + }, + "email-smtp-username-override" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "null" + } ] } } } } } }, - "tags" : [ "/api/ee/comment" ] + "tags" : [ "/api/ee/email" ] }, "delete" : { - "summary" : "DELETE /api/ee/comment/{comment-id}", - "description" : "Soft delete a comment", - "parameters" : [ { - "in" : "path", - "name" : "comment-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 + "summary" : "DELETE /api/ee/email/override", + "description" : "Clear all cloud email related settings. You must be a superuser or have `setting` permission to do this.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "description" : "value must be an integer greater than zero." - } ], + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/email" ] + } + }, + "/api/ee/embedding-hub/checklist" : { + "get" : { + "summary" : "GET /api/ee/embedding-hub/checklist", + "description" : "Get the embedding hub checklist status, indicating which setup steps have been completed.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15881,26 +17631,24 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/comment" ] + "tags" : [ "/api/ee/embedding-hub" ] } }, - "/api/ee/comment/{comment-id}/reaction" : { + "/api/ee/gsheets/connection" : { "post" : { - "summary" : "POST /api/ee/comment/{comment-id}/reaction", - "description" : "Toggle a reaction on a comment", - "parameters" : [ { - "in" : "path", - "name" : "comment-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "summary" : "POST /api/ee/gsheets/connection", + "description" : "Hook up a new google drive folder or sheet that will be watched and have its content ETL'd into Metabase.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:error -> , :message -> }, or one of , :created_at -> , :sync_started_at -> , :created_by_id -> , :db_id -> } | active = map where {:url -> , :created_at -> , :last_sync_at -> , :next_sync_at -> , :created_by_id -> , :db_id -> } | error = map where {:url -> , :created_at -> , :error_message -> , :created_by_id -> , :db_id -> }> dispatched by :status", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/gsheets.response" + } + } + } }, "4XX" : { "description" : "Client error response" @@ -15915,28 +17663,32 @@ "schema" : { "type" : "object", "properties" : { - "emoji" : { + "url" : { "type" : "string", - "minLength" : 1, - "maxLength" : 10 + "minLength" : 1 } }, - "required" : [ "emoji" ] + "required" : [ "url" ] } } } }, - "tags" : [ "/api/ee/comment" ] - } - }, - "/api/ee/content-translation/csv" : { + "tags" : [ "/api/ee/gsheets" ] + }, "get" : { - "summary" : "GET /api/ee/content-translation/csv", - "description" : "Provides content translation dictionary in CSV", + "summary" : "GET /api/ee/gsheets/connection", + "description" : "Check the status of a connection. This endpoint gets polled by FE to determine when to\n stop showing the setup widget.\n\n Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:error -> , :message -> }, or one of , :created_at -> , :sync_started_at -> , :created_by_id -> , :db_id -> } | active = map where {:url -> , :created_at -> , :last_sync_at -> , :next_sync_at -> , :created_by_id -> , :db_id -> } | error = map where {:url -> , :created_at -> , :error_message -> , :created_by_id -> , :db_id -> }> dispatched by :status", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/gsheets.response" + } + } + } }, "4XX" : { "description" : "Client error response" @@ -15945,21 +17697,12 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/content-translation" ] - } - }, - "/api/ee/content-translation/dictionary/{token}" : { - "get" : { - "summary" : "GET /api/ee/content-translation/dictionary/{token}", - "description" : "Fetch the content translation dictionary via a JSON Web Token signed with the `embedding-secret-key`.", - "parameters" : [ { - "in" : "path", - "name" : "token", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "/api/ee/gsheets" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/gsheets/connection", + "description" : "Disconnect the google service account. There is only one (or zero) at the time of writing.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15971,13 +17714,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/content-translation" ] + "tags" : [ "/api/ee/gsheets" ] } }, - "/api/ee/content-translation/upload-dictionary" : { + "/api/ee/gsheets/connection/sync" : { "post" : { - "summary" : "POST /api/ee/content-translation/upload-dictionary", - "description" : "Upload a CSV of content translations", + "summary" : "POST /api/ee/gsheets/connection/sync", + "description" : "Force a sync of the connection now.\n\n Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`.", "parameters" : [ ], "responses" : { "2XX" : { @@ -15990,98 +17733,30 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "file" : { - "type" : "object", - "properties" : { - "filename" : { - "type" : "string" - }, - "tempfile" : { } - }, - "required" : [ "filename", "tempfile" ] - } - }, - "required" : [ "file" ] - } - } - } - }, - "tags" : [ "/api/ee/content-translation" ] + "tags" : [ "/api/ee/gsheets" ] } }, - "/api/ee/database-replication/connection/{database-id}" : { - "post" : { - "summary" : "POST /api/ee/database-replication/connection/{database-id}", - "description" : "Create a new PG replication connection for the specified database.", - "parameters" : [ { - "in" : "path", - "name" : "database-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "/api/ee/gsheets/service-account" : { + "get" : { + "summary" : "GET /api/ee/gsheets/service-account", + "description" : "Checks to see if service-account is setup or not, delegates to HM only if we haven't set it from a metabase cluster\n before.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "replicationSchemaFilters" : { - "type" : "object", - "properties" : { - "schema-filters-patterns" : { - "type" : "string" - }, - "schema-filters-type" : { - "type" : "string", - "enum" : [ "inclusion", "exclusion", "all" ] - } - }, - "required" : [ "schema-filters-type", "schema-filters-patterns" ] - } + "description" : "map where {:email -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "email" : { + "type" : "string" + } + }, + "required" : [ ] } } } - } - }, - "tags" : [ "/api/ee/database-replication" ] - }, - "delete" : { - "summary" : "DELETE /api/ee/database-replication/connection/{database-id}", - "description" : "Delete PG replication connection for the specified database.", - "parameters" : [ { - "in" : "path", - "name" : "database-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -16090,22 +17765,22 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/database-replication" ] + "tags" : [ "/api/ee/gsheets" ] } }, - "/api/ee/database-replication/connection/{database-id}/preview" : { - "post" : { - "summary" : "POST /api/ee/database-replication/connection/{database-id}/preview", - "description" : "Return info about pg-replication connection that is about to be created.", + "/api/ee/logs/query_execution/{yyyy-mm}" : { + "get" : { + "summary" : "GET /api/ee/logs/query_execution/{yyyy-mm}", + "description" : "Fetch rows for the month specified by `:yyyy-mm` from the query_execution logs table.\n Must be a superuser.", "parameters" : [ { "in" : "path", - "name" : "database-id", + "name" : "yyyy-mm", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 + "type" : "string", + "pattern" : "\\d{4}-\\d{2}" }, - "description" : "value must be an integer greater than zero." + "description" : "Must be a string like 2020-04 or 2222-11." } ], "responses" : { "2XX" : { @@ -16118,48 +17793,32 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "replicationSchemaFilters" : { - "type" : "object", - "properties" : { - "schema-filters-patterns" : { - "type" : "string" - }, - "schema-filters-type" : { - "type" : "string", - "enum" : [ "inclusion", "exclusion", "all" ] - } - }, - "required" : [ "schema-filters-type", "schema-filters-patterns" ] - } - } - } - } - } - }, - "tags" : [ "/api/ee/database-replication" ] + "tags" : [ "/api/ee/logs" ] } }, - "/api/ee/database-routing/destination-database" : { + "/api/ee/metabot-tools/answer-sources" : { "post" : { - "summary" : "POST /api/ee/database-routing/destination-database", - "description" : "Create new Destination Databases.\n\n Note that unlike the normal `POST /api/database` endpoint, does NOT check the details before adding the Database.\n\n This is OK, it's not an invariant that all database details are always valid, but it's something to note.", - "parameters" : [ { - "in" : "query", - "name" : "check_connection_details", - "required" : false, - "schema" : { - "type" : "boolean" - } - } ], + "summary" : "POST /api/ee/metabot-tools/answer-sources", + "description" : "Return top level meta information about available information sources.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16174,55 +17833,46 @@ "schema" : { "type" : "object", "properties" : { - "destinations" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "details" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "name" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "name", "details" ] - } + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.answer-sources-arguments" }, - "router_database_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "router_database_id", "destinations" ] + "required" : [ "conversation_id" ] } } } }, - "tags" : [ "/api/ee/database-routing" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/database-routing/router-database/{id}" : { - "put" : { - "summary" : "PUT /api/ee/database-routing/router-database/{id}", - "description" : "Updates an existing Database with the `user_attribute` to route on. Will either:\n - turn an existing Database into a Router database\n - change the `user_attribute` used to route for an existing Router database, or\n - turn a Router database into a regular Database\n depending on the value of `user_attribute`", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "/api/ee/metabot-tools/check-transform-dependencies" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/check-transform-dependencies", + "description" : "Check a proposed edit to a transform and return details of cards or transforms that would be broken by the change.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16237,26 +17887,49 @@ "schema" : { "type" : "object", "properties" : { - "user_attribute" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.check-transform-dependencies-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", "type" : "string", - "minLength" : 1 + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } - } + }, + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/database-routing" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/dependencies/check_card" : { + "/api/ee/metabot-tools/create-dashboard-subscription" : { "post" : { - "summary" : "POST /api/ee/dependencies/check_card", - "description" : "Check a proposed edit to a card, and return the card IDs for those cards this edit will break.", + "summary" : "POST /api/ee/metabot-tools/create-dashboard-subscription", + "description" : "Create a dashboard subscription.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:output -> , :conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "output" : { + "type" : "string" + } + }, + "required" : [ "output", "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16269,22 +17942,48 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.card-body" + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.create-dashboard-subscription-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/dependencies" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/dependencies/check_snippet" : { + "/api/ee/metabot-tools/field-values" : { "post" : { - "summary" : "POST /api/ee/dependencies/check_snippet", - "description" : "Check a proposed edit to a native snippet, and return the cards, etc. which will be broken.", + "summary" : "POST /api/ee/metabot-tools/field-values", + "description" : "Return statistics and/or values for a given field of a given entity.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16299,34 +17998,46 @@ "schema" : { "type" : "object", "properties" : { - "content" : { - "type" : "string" - }, - "id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field-values-arguments" }, - "name" : { - "description" : "snippet names cannot include '}' or start with spaces" + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "id" ] + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/dependencies" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/dependencies/check_transform" : { + "/api/ee/metabot-tools/filter-records" : { "post" : { - "summary" : "POST /api/ee/dependencies/check_transform", - "description" : "Check a proposed edit to a transform, and return the card, transform, etc. IDs for things that will break.", + "summary" : "POST /api/ee/metabot-tools/filter-records", + "description" : "Construct a query from a metric.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16339,110 +18050,48 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.transform-body" + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.filter-records-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/dependencies" ] - } - }, - "/api/ee/dependencies/graph" : { - "get" : { - "summary" : "GET /api/ee/dependencies/graph", - "description" : "TODO: This endpoint is supposed to take an :id and :type of an entity (currently :table, :card, :snippet,\n or :transform) and return the entity with all its upstream and downstream dependencies that should be fetched\n recursively. :edges match our :model/Dependency format. Each node in :nodes has :id, :type, and :data, and :data\n depends on the node type. For :table, there should be :display_name. For :card, there should be :name\n and :type. For :snippet -> :name. For :transform -> :name.", - "parameters" : [ { - "in" : "query", - "name" : "id", - "required" : false, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "type", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "table", "card", "snippet", "transform" ] - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/ee/dependencies" ] - } - }, - "/api/ee/dependencies/graph/dependents" : { - "get" : { - "summary" : "GET /api/ee/dependencies/graph/dependents", - "description" : "TODO: This endpoint is supposed to take an :id and :type of an entity (currently :table, :card, :snippet,\n or :transform) and return the entity with all its upstream and downstream dependencies that should be fetched\n recursively. :edges match our :model/Dependency format. Each node in :nodes has :id, :type, and :data, and :data\n depends on the node type. For :table, there should be :display_name. For :card, there should be :name\n and :type. For :snippet -> :name. For :transform -> :name.", - "parameters" : [ { - "in" : "query", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "type", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "table", "card", "snippet", "transform" ] - } - }, { - "in" : "query", - "name" : "dependent_type", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "table", "card", "snippet", "transform" ] - } - }, { - "in" : "query", - "name" : "dependent_card_type", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "question", "model", "metric" ] - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/ee/dependencies" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/document/" : { - "get" : { - "summary" : "GET /api/ee/document/", - "description" : "Gets existing `Documents`.", + "/api/ee/metabot-tools/find-outliers" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/find-outliers", + "description" : "Find outliers in the values provided by a data source for a given column.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16451,15 +18100,61 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/document" ] - }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.find-outliers-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/generate-insights" : { "post" : { - "summary" : "POST /api/ee/document/", - "description" : "Create a new `Document`.", + "summary" : "POST /api/ee/metabot-tools/generate-insights", + "description" : "Generate insights.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:output -> , :reactions -> , :url -> }>, :conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "output" : { + "type" : "string" + }, + "reactions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabot.reaction.redirect" + } + } + }, + "required" : [ "output", "reactions", "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16474,112 +18169,46 @@ "schema" : { "type" : "object", "properties" : { - "cards" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "properties" : { - "visualization_settings" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "entity_id" : { - "type" : "string", - "minLength" : 1 - }, - "dataset_query" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "parameter_mappings" : { - "type" : "array", - "items" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "result_metadata" : { - "type" : "array", - "items" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "display" : { - "type" : "string", - "minLength" : 1 - }, - "parameters" : { - "type" : "array", - "items" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "description" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "name", "dataset_query", "display", "visualization_settings" ] - } - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.generate-insights-arguments" }, - "document" : { }, - "name" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", "type" : "string", - "minLength" : 1, - "maxLength" : 254 + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "name", "document" ] + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/document" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/document/{document-id}" : { - "get" : { - "summary" : "GET /api/ee/document/{document-id}", - "description" : "Returns an existing Document by ID.", - "parameters" : [ { - "in" : "path", - "name" : "document-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "/api/ee/metabot-tools/get-current-user" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-current-user", + "description" : "Get information about user that started the conversation.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16588,24 +18217,101 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/document" ] - }, - "put" : { - "summary" : "PUT /api/ee/document/{document-id}", - "description" : "Updates an existing `Document`.", - "parameters" : [ { - "in" : "path", - "name" : "document-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.tool-request" + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-dashboard-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-dashboard-details", + "description" : "Get information about a given dashboard.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, - "description" : "value must be an integer greater than zero." - } ], + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "type" : "object", + "properties" : { + "dashboard_id" : { + "type" : "integer" + } + }, + "required" : [ "dashboard_id" ] + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-document-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-document-details", + "description" : "Get information about a given report.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16620,131 +18326,46 @@ "schema" : { "type" : "object", "properties" : { - "archived" : { - "type" : "boolean" - }, - "cards" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "properties" : { - "visualization_settings" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "entity_id" : { - "type" : "string", - "minLength" : 1 - }, - "dataset_query" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "parameter_mappings" : { - "type" : "array", - "items" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "result_metadata" : { - "type" : "array", - "items" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "display" : { - "type" : "string", - "minLength" : 1 - }, - "parameters" : { - "type" : "array", - "items" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "description" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "name", "dataset_query", "display", "visualization_settings" ] - } - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-document-details-arguments" }, - "document" : { }, - "name" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", "type" : "string", - "minLength" : 1, - "maxLength" : 254 + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } - } + }, + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/document" ] - }, - "delete" : { - "summary" : "DELETE /api/ee/document/{document-id}", - "description" : "Permanently deletes an archived Document.", - "parameters" : [ { - "in" : "path", - "name" : "document-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/ee/document" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/email/override" : { - "put" : { - "summary" : "PUT /api/ee/email/override", - "description" : "Update multiple cloud email Settings. You must be a superuser or have `setting` permission to do this.\n Calling this automatically sets `cloud-smtp-enabled` to true if the settings are valid.", + "/api/ee/metabot-tools/get-metric-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-metric-details", + "description" : "Get information about a given metric.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16759,55 +18380,46 @@ "schema" : { "type" : "object", "properties" : { - "email-smtp-host-override" : { - "anyOf" : [ { - "type" : "string" - }, { - "type" : "null" - } ] - }, - "email-smtp-password-override" : { - "anyOf" : [ { - "type" : "string" - }, { - "type" : "null" - } ] - }, - "email-smtp-port-override" : { - "anyOf" : [ { - "type" : "integer" - }, { - "type" : "null" - } ] - }, - "email-smtp-security-override" : { - "anyOf" : [ { - "type" : "string" - }, { - "type" : "null" - } ] + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-metric-details-arguments" }, - "email-smtp-username-override" : { - "anyOf" : [ { - "type" : "string" - }, { - "type" : "null" - } ] + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } - } + }, + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/email" ] - }, - "delete" : { - "summary" : "DELETE /api/ee/email/override", - "description" : "Clear all cloud email related settings. You must be a superuser or have `setting` permission to do this.", + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-query-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-query-details", + "description" : "Get information about a given query.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16816,17 +18428,59 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/email" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "type" : "object", + "properties" : { + "query" : { + "type" : "object", + "properties" : { } + } + }, + "required" : [ "query" ] + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/embedding-hub/checklist" : { - "get" : { - "summary" : "GET /api/ee/embedding-hub/checklist", - "description" : "Get the embedding hub checklist status, indicating which setup steps have been completed.", + "/api/ee/metabot-tools/get-report-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-report-details", + "description" : "Get information about a given report.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16835,21 +18489,53 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/embedding-hub" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-report-details-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/gsheets/connection" : { + "/api/ee/metabot-tools/get-snippet-details" : { "post" : { - "summary" : "POST /api/ee/gsheets/connection", - "description" : "Hook up a new google drive folder or sheet that will be watched and have its content ETL'd into Metabase.", + "summary" : "POST /api/ee/metabot-tools/get-snippet-details", + "description" : "Get the content of a single SQL snippet.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:error -> , :message -> }, or one of , :created_at -> , :sync_started_at -> , :created_by_id -> , :db_id -> } | active = map where {:url -> , :created_at -> , :last_sync_at -> , :next_sync_at -> , :created_by_id -> , :db_id -> } | error = map where {:url -> , :created_at -> , :error_message -> , :created_by_id -> , :db_id -> }> dispatched by :status", + "description" : "Schema for SQL snippet detail results", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/gsheets.response" + "description" : "Schema for SQL snippet detail results", + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "structured_output" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.full-snippet" + } + }, + "required" : [ "structured_output", "conversation_id" ] } } } @@ -16867,29 +18553,50 @@ "schema" : { "type" : "object", "properties" : { - "url" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-snippet-details-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", "type" : "string", - "minLength" : 1 + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "url" ] + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/gsheets" ] - }, - "get" : { - "summary" : "GET /api/ee/gsheets/connection", - "description" : "Check the status of a connection. This endpoint gets polled by FE to determine when to\n stop showing the setup widget.\n\n Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`.", + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-snippets" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-snippets", + "description" : "Get a list of all known SQL snippets.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:error -> , :message -> }, or one of , :created_at -> , :sync_started_at -> , :created_by_id -> , :db_id -> } | active = map where {:url -> , :created_at -> , :last_sync_at -> , :next_sync_at -> , :created_by_id -> , :db_id -> } | error = map where {:url -> , :created_at -> , :error_message -> , :created_by_id -> , :db_id -> }> dispatched by :status", + "description" : "Schema for SQL snippet list results", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/gsheets.response" + "description" : "Schema for SQL snippet list results", + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "structured_output" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.basic-snippet" + } + } + }, + "required" : [ "structured_output", "conversation_id" ] } } } @@ -16901,34 +18608,41 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/gsheets" ] - }, - "delete" : { - "summary" : "DELETE /api/ee/gsheets/connection", - "description" : "Disconnect the google service account. There is only one (or zero) at the time of writing.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.tool-request" + } + } } }, - "tags" : [ "/api/ee/gsheets" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/gsheets/connection/sync" : { + "/api/ee/metabot-tools/get-table-details" : { "post" : { - "summary" : "POST /api/ee/gsheets/connection/sync", - "description" : "Force a sync of the connection now.\n\n Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`.", + "summary" : "POST /api/ee/metabot-tools/get-table-details", + "description" : "Get information about a given table or model.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16937,27 +18651,49 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/gsheets" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-table-details-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/gsheets/service-account" : { - "get" : { - "summary" : "GET /api/ee/gsheets/service-account", - "description" : "Checks to see if service-account is setup or not, delegates to HM only if we haven't set it from a metabase cluster\n before.", + "/api/ee/metabot-tools/get-tables" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-tables", + "description" : "Get information about the tables in a given database.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:email -> }", + "description" : "map where {:conversation_id -> }", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "email" : { - "type" : "string" + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ ] + "required" : [ "conversation_id" ] } } } @@ -16969,41 +18705,33 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/gsheets" ] - } - }, - "/api/ee/logs/query_execution/{yyyy-mm}" : { - "get" : { - "summary" : "GET /api/ee/logs/query_execution/{yyyy-mm}", - "description" : "Fetch rows for the month specified by `:yyyy-mm` from the query_execution logs table.\n Must be a superuser.", - "parameters" : [ { - "in" : "path", - "name" : "yyyy-mm", - "required" : true, - "schema" : { - "type" : "string", - "pattern" : "\\d{4}-\\d{2}" - }, - "description" : "Must be a string like 2020-04 or 2222-11." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-tables-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } } }, - "tags" : [ "/api/ee/logs" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/answer-sources" : { + "/api/ee/metabot-tools/get-transform-details" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/answer-sources", - "description" : "Return top level meta information about available information sources.", + "summary" : "POST /api/ee/metabot-tools/get-transform-details", + "description" : "Get information about a transform.", "parameters" : [ ], "responses" : { "2XX" : { @@ -17038,7 +18766,7 @@ "type" : "object", "properties" : { "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.answer-sources-arguments" + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-transform-details-arguments" }, "conversation_id" : { "description" : "value must be a valid UUID.", @@ -17046,7 +18774,7 @@ "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "conversation_id" ] + "required" : [ "arguments", "conversation_id" ] } } } @@ -17054,14 +18782,14 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/create-dashboard-subscription" : { + "/api/ee/metabot-tools/get-transform-python-library-details" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/create-dashboard-subscription", - "description" : "Create a dashboard subscription.", + "summary" : "POST /api/ee/metabot-tools/get-transform-python-library-details", + "description" : "Get information about a Python library by path.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:output -> , :conversation_id -> }", + "description" : "map where {:conversation_id -> }", "content" : { "application/json" : { "schema" : { @@ -17070,13 +18798,10 @@ "conversation_id" : { "description" : "value must be a valid UUID.", "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - }, - "output" : { - "type" : "string" + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "output", "conversation_id" ] + "required" : [ "conversation_id" ] } } } @@ -17095,7 +18820,7 @@ "type" : "object", "properties" : { "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.create-dashboard-subscription-arguments" + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-transform-python-library-details-arguments" }, "conversation_id" : { "description" : "value must be a valid UUID.", @@ -17111,10 +18836,10 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/field-values" : { + "/api/ee/metabot-tools/get-transforms" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/field-values", - "description" : "Return statistics and/or values for a given field of a given entity.", + "summary" : "POST /api/ee/metabot-tools/get-transforms", + "description" : "Get a list of all known transforms.", "parameters" : [ ], "responses" : { "2XX" : { @@ -17146,18 +18871,7 @@ "content" : { "application/json" : { "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field-values-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "arguments", "conversation_id" ] + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.tool-request" } } } @@ -17165,10 +18879,10 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/filter-records" : { + "/api/ee/metabot-tools/query-datasource" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/filter-records", - "description" : "Construct a query from a metric.", + "summary" : "POST /api/ee/metabot-tools/query-datasource", + "description" : "Construct a query from a model or table data source.", "parameters" : [ ], "responses" : { "2XX" : { @@ -17203,7 +18917,7 @@ "type" : "object", "properties" : { "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.filter-records-arguments" + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-datasource-arguments" }, "conversation_id" : { "description" : "value must be a valid UUID.", @@ -17219,10 +18933,10 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/find-outliers" : { + "/api/ee/metabot-tools/query-metric" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/find-outliers", - "description" : "Find outliers in the values provided by a data source for a given column.", + "summary" : "POST /api/ee/metabot-tools/query-metric", + "description" : "Construct a query from a metric.", "parameters" : [ ], "responses" : { "2XX" : { @@ -17257,7 +18971,7 @@ "type" : "object", "properties" : { "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.find-outliers-arguments" + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-metric-arguments" }, "conversation_id" : { "description" : "value must be a valid UUID.", @@ -17273,14 +18987,14 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/generate-insights" : { + "/api/ee/metabot-tools/query-model" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/generate-insights", - "description" : "Generate insights.", + "summary" : "POST /api/ee/metabot-tools/query-model", + "description" : "Construct a query from a model.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:output -> , :reactions -> , :url -> }>, :conversation_id -> }", + "description" : "map where {:conversation_id -> }", "content" : { "application/json" : { "schema" : { @@ -17290,18 +19004,9 @@ "description" : "value must be a valid UUID.", "type" : "string", "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - }, - "output" : { - "type" : "string" - }, - "reactions" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabot.reaction.redirect" - } } }, - "required" : [ "output", "reactions", "conversation_id" ] + "required" : [ "conversation_id" ] } } } @@ -17320,7 +19025,7 @@ "type" : "object", "properties" : { "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.generate-insights-arguments" + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-model-arguments" }, "conversation_id" : { "description" : "value must be a valid UUID.", @@ -17336,10 +19041,10 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/get-current-user" : { + "/api/ee/metabot-tools/search" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/get-current-user", - "description" : "Get information about user that started the conversation.", + "summary" : "POST /api/ee/metabot-tools/search", + "description" : "Enhanced search with term and semantic queries using Reciprocal Rank Fusion.", "parameters" : [ ], "responses" : { "2XX" : { @@ -17371,7 +19076,18 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.tool-request" + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.search-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] } } } @@ -17379,10 +19095,10 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/get-dashboard-details" : { + "/api/ee/metabot-tools/search_v2" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/get-dashboard-details", - "description" : "Get information about a given dashboard.", + "summary" : "POST /api/ee/metabot-tools/search_v2", + "description" : "Enhanced search with term and semantic queries using Reciprocal Rank Fusion. This is identical to /search, but\n duplicated in order to add a new capability to AI service that indicates that Metabot can search transforms. The\n /search endpoint is kept around for backward compatibility.", "parameters" : [ ], "responses" : { "2XX" : { @@ -17417,13 +19133,7 @@ "type" : "object", "properties" : { "arguments" : { - "type" : "object", - "properties" : { - "dashboard_id" : { - "type" : "integer" - } - }, - "required" : [ "dashboard_id" ] + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.search-arguments" }, "conversation_id" : { "description" : "value must be a valid UUID.", @@ -17431,7 +19141,7 @@ "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "arguments", "conversation_id" ] + "required" : [ "conversation_id" ] } } } @@ -17439,29 +19149,14 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/get-document-details" : { + "/api/ee/metabot-v3/agent-streaming" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/get-document-details", - "description" : "Get information about a given report.", + "summary" : "POST /api/ee/metabot-v3/agent-streaming", + "description" : "Send a chat message to the LLM via the AI Proxy.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17476,46 +19171,48 @@ "schema" : { "type" : "object", "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-document-details-arguments" + "context" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.context.context" }, "conversation_id" : { "description" : "value must be a valid UUID.", "type" : "string", "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "history" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.client.schema.messages" + }, + "message" : { + "type" : "string", + "minLength" : 1 + }, + "metabot_id" : { + "type" : "string" + }, + "profile_id" : { + "type" : "string" + }, + "state" : { + "type" : "object", + "properties" : { } } }, - "required" : [ "arguments", "conversation_id" ] + "required" : [ "message", "context", "conversation_id", "state" ] } } } }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/metabot-v3" ] } }, - "/api/ee/metabot-tools/get-metric-details" : { + "/api/ee/metabot-v3/document/generate-content" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/get-metric-details", - "description" : "Get information about a given metric.", + "summary" : "POST /api/ee/metabot-v3/document/generate-content", + "description" : "Create a new piece of content to insert into the document.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17530,46 +19227,113 @@ "schema" : { "type" : "object", "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-metric-details-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", + "instructions" : { "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + "minLength" : 1 + }, + "references" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } } }, - "required" : [ "arguments", "conversation_id" ] + "required" : [ "instructions" ] } } } }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/metabot-v3/document" ] } }, - "/api/ee/metabot-tools/get-query-details" : { + "/api/ee/metabot-v3/feedback" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/get-query-details", - "description" : "Get information about a given query.", + "summary" : "POST /api/ee/metabot-v3/feedback", + "description" : "Proxy Metabot feedback to Harbormaster, adding the premium embedding token.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { } + } + } + } + }, + "tags" : [ "/api/ee/metabot-v3" ] + } + }, + "/api/ee/metabot-v3/metabot/" : { + "get" : { + "summary" : "GET /api/ee/metabot-v3/metabot/", + "description" : "List configured metabot instances", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + } + }, + "/api/ee/metabot-v3/metabot/{id}" : { + "get" : { + "summary" : "GET /api/ee/metabot-v3/metabot/{id}", + "description" : "Retrieve one metabot instance", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + }, + "put" : { + "summary" : "PUT /api/ee/metabot-v3/metabot/{id}", + "description" : "Update a metabot instance", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17584,53 +19348,61 @@ "schema" : { "type" : "object", "properties" : { - "arguments" : { - "type" : "object", - "properties" : { - "query" : { - "type" : "object", - "properties" : { } - } - }, - "required" : [ "query" ] + "collection_id" : { + "type" : "integer", + "minimum" : 1 }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + "use_verified_content" : { + "type" : "boolean" } }, - "required" : [ "arguments", "conversation_id" ] + "additionalProperties" : false } } } }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/metabot-v3/metabot" ] } }, - "/api/ee/metabot-tools/get-report-details" : { - "post" : { - "summary" : "POST /api/ee/metabot-tools/get-report-details", - "description" : "Get information about a given report.", - "parameters" : [ ], + "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions" : { + "get" : { + "summary" : "GET /api/ee/metabot-v3/metabot/{id}/prompt-suggestions", + "description" : "Return the prompt suggestions for the metabot instance with `id`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + }, { + "in" : "query", + "name" : "sample", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "model", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "metric", "model" ] + } + }, { + "in" : "query", + "name" : "model_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17639,52 +19411,50 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-report-details-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "arguments", "conversation_id" ] - } - } + "tags" : [ "/api/ee/metabot-v3/metabot" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/metabot-v3/metabot/{id}/prompt-suggestions", + "description" : "Delete all prompt suggestions for the metabot instance with `id`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/metabot-v3/metabot" ] } }, - "/api/ee/metabot-tools/get-table-details" : { + "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions/regenerate" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/get-table-details", - "description" : "Get information about a given table or model.", - "parameters" : [ ], + "summary" : "POST /api/ee/metabot-v3/metabot/{id}/prompt-suggestions/regenerate", + "description" : "Remove any existing prompt suggestions for the Metabot instance with `id` and generate new ones.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17693,49 +19463,79 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-table-details-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "arguments", "conversation_id" ] - } - } + "tags" : [ "/api/ee/metabot-v3/metabot" ] + } + }, + "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions/{prompt-id}" : { + "delete" : { + "summary" : "DELETE /api/ee/metabot-v3/metabot/{id}/prompt-suggestions/{prompt-id}", + "description" : "Delete the prompt suggestion with ID `prompt-id` for the metabot instance with `id`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + }, { + "in" : "path", + "name" : "prompt-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + } + }, + "/api/ee/permission_debug/" : { + "get" : { + "summary" : "GET /api/ee/permission_debug/", + "description" : "This endpoint expects a `user_id`, a `model_id` to debug permissions against, and `action_type`.\n The type of model we are debugging against is inferred by the `action_type`.\n\n It will return:\n - `decision`: The overall permission decision (\"allow\", \"denied\", or \"limited\")\n - `model-type`: The type of model being checked (e.g., \"question\")\n - `model-id`: The ID of the model being checked\n - `segment`: A set of segmentation types applied (e.g., \"sandboxed\", \"impersonated\", \"routed\")\n - `message`: A sequence of strings explaining the decision\n - `data`: A map containing details about permissions (table or collection names to group names)\n - `suggestions`: A map of group IDs to group names that could provide access\n\n Example requests:\n - Check if user can read a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/read`\n - Check if user can query a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/query`\n - Check if user can download data: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/download-data`\n\n Example responses:\n - Allowed access:\n ```json\n {\n \"decision\": \"allow\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User has permission to read this card\"],\n \"data\": {},\n \"suggestions\": {}\n }\n ```\n - Denied access with blocked table:\n ```json\n {\n \"decision\": \"denied\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User does not have permission to query this card\"],\n \"data\": {\"sample-db.PUBLIC.ORDERS\": [\"All Users\"]},\n \"suggestions\": {}\n }\n ```\n - Limited access:\n ```json\n {\n \"decision\": \"limited\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User has permission to download some data from this card\"],\n \"data\": {},\n \"suggestions\": {}\n }\n ```", + "parameters" : [ { + "in" : "query", + "name" : "user_id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + }, { + "in" : "query", + "name" : "model_id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "query", + "name" : "action_type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "card/read", "card/query", "card/download-data" ] } - }, - "tags" : [ "/api/ee/metabot-tools" ] - } - }, - "/api/ee/metabot-tools/get-tables" : { - "post" : { - "summary" : "POST /api/ee/metabot-tools/get-tables", - "description" : "Get information about the tables in a given database.", - "parameters" : [ ], + } ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", + "description" : "map where {:model-type -> , :model-id -> , :decision -> , :segment -> , :message -> , :data -> , :suggestions -> to >}", "content" : { "application/json" : { "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] + "$ref" : "#/components/schemas/metabase-enterprise.permission-debug.impl.perm-debug-info" } } } @@ -17747,52 +19547,26 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-tables-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "arguments", "conversation_id" ] - } - } - } - }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/permission_debug" ] } }, - "/api/ee/metabot-tools/query-datasource" : { - "post" : { - "summary" : "POST /api/ee/metabot-tools/query-datasource", - "description" : "Construct a query from a model or table data source.", - "parameters" : [ ], + "/api/ee/public/document/{uuid}" : { + "get" : { + "summary" : "GET /api/ee/public/document/{uuid}", + "description" : "Fetch a publicly-accessible Document. Does not require auth credentials. Public sharing must be enabled.\n\n Returns a Document with sensitive fields removed (excludes collection_id, permissions, creator details, etc.).\n Includes all embedded Cards with their metadata hydrated so the frontend doesn't need to make separate\n requests for each card — just like public Dashboards do.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + } ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17801,52 +19575,43 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-datasource-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "arguments", "conversation_id" ] - } - } - } - }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/public" ] } }, - "/api/ee/metabot-tools/query-metric" : { - "post" : { - "summary" : "POST /api/ee/metabot-tools/query-metric", - "description" : "Construct a query from a metric.", - "parameters" : [ ], + "/api/ee/public/document/{uuid}/card/{card-id}" : { + "get" : { + "summary" : "GET /api/ee/public/document/{uuid}/card/{card-id}", + "description" : "Run a query for a Card that's embedded in a public Document. Doesn't require auth credentials. Public sharing must\n be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "parameters", + "required" : false, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17855,52 +19620,42 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-metric-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "arguments", "conversation_id" ] - } - } - } - }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/public" ] } }, - "/api/ee/metabot-tools/query-model" : { + "/api/ee/public/document/{uuid}/card/{card-id}/{export-format}" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/query-model", - "description" : "Construct a query from a model.", - "parameters" : [ ], + "summary" : "POST /api/ee/public/document/{uuid}/card/{card-id}/{export-format}", + "description" : "Fetch a Card embedded in a public Document and return query results in the specified format.\n Does not require auth credentials. Public sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "export-format", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" + } + } ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17915,43 +19670,57 @@ "schema" : { "type" : "object", "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-model-arguments" + "format_rows" : { + "default" : false, + "type" : "boolean" }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + "parameters" : { + "anyOf" : [ { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, { + "description" : "value must be a valid JSON string.", + "type" : "string" + } ] + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" } }, - "required" : [ "arguments", "conversation_id" ] + "required" : [ "format_rows", "pivot_results" ] } } } }, - "tags" : [ "/api/ee/metabot-tools" ] - } - }, - "/api/ee/metabot-tools/search" : { - "post" : { - "summary" : "POST /api/ee/metabot-tools/search", - "description" : "Enhanced search with term and semantic queries using Reciprocal Rank Fusion.", + "tags" : [ "/api/ee/public" ] + } + }, + "/api/ee/remote-sync/branches" : { + "get" : { + "summary" : "GET /api/ee/remote-sync/branches", + "description" : "Get list of branches from the configured source.\n\n Returns a JSON object with branch names under the :items key.\n\n Requires superuser permissions.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", + "description" : "map where {:items -> }", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + "items" : { + "type" : "array", + "items" : { + "type" : "string" + } } }, - "required" : [ "conversation_id" ] + "required" : [ "items" ] } } } @@ -17963,37 +19732,33 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.search-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } - }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/agent-streaming" : { + "/api/ee/remote-sync/create-branch" : { "post" : { - "summary" : "POST /api/ee/metabot-v3/agent-streaming", - "description" : "Send a chat message to the LLM via the AI Proxy.", + "summary" : "POST /api/ee/remote-sync/create-branch", + "description" : "Create a new branch from the current remote-sync branch and switches the current remote-sync branch to it.\n Requires superuser permissions.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:status -> , :message -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + }, + "status" : { + "type" : "string" + } + }, + "required" : [ "status", "message" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18008,48 +19773,71 @@ "schema" : { "type" : "object", "properties" : { - "context" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.context.context" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - }, - "history" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.client.schema.messages" - }, - "message" : { + "name" : { "type" : "string", "minLength" : 1 - }, - "metabot_id" : { - "type" : "string" - }, - "profile_id" : { - "type" : "string" - }, - "state" : { - "type" : "object", - "properties" : { } } }, - "required" : [ "message", "context", "conversation_id", "state" ] + "required" : [ "name" ] } } } }, - "tags" : [ "/api/ee/metabot-v3" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/document/generate-content" : { - "post" : { - "summary" : "POST /api/ee/metabot-v3/document/generate-content", - "description" : "Create a new piece of content to insert into the document.", + "/api/ee/remote-sync/current-task" : { + "get" : { + "summary" : "GET /api/ee/remote-sync/current-task", + "description" : "Get the current sync task", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "nullable map where {:id -> , :sync_task_type -> , :initiated_by (optional) -> , :progress -> , :started_at -> , :ended_at (optional) -> , :last_progress_report_at (optional) -> , :version (optional) -> , :cancelled (optional) -> , :error_message (optional) -> , :status -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "progress" : { + "type" : "number", + "minimum" : 0.0, + "maximum" : 1.0 + }, + "last_progress_report_at" : { }, + "id" : { + "type" : "integer", + "minimum" : 1 + }, + "started_at" : { }, + "ended_at" : { }, + "initiated_by" : { + "type" : "integer", + "minimum" : 1 + }, + "cancelled" : { + "type" : "boolean" + }, + "status" : { + "type" : "string", + "enum" : [ "running", "successful", "errored", "cancelled", "timed-out" ] + }, + "error_message" : { + "type" : "string" + }, + "sync_task_type" : { + "type" : "string", + "enum" : [ "import", "export" ] + }, + "version" : { + "type" : "string" + } + }, + "required" : [ "id", "sync_task_type", "started_at", "status" ], + "optional" : true + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18058,38 +19846,60 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "instructions" : { - "type" : "string", - "minLength" : 1 - }, - "references" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "required" : [ "instructions" ] - } - } - } - }, - "tags" : [ "/api/ee/metabot-v3/document" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/feedback" : { + "/api/ee/remote-sync/current-task/cancel" : { "post" : { - "summary" : "POST /api/ee/metabot-v3/feedback", - "description" : "Proxy Metabot feedback to Harbormaster, adding the premium embedding token.", + "summary" : "POST /api/ee/remote-sync/current-task/cancel", + "description" : "Cancels the current task if one is running", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:id -> , :sync_task_type -> , :initiated_by (optional) -> , :progress -> , :started_at -> , :ended_at (optional) -> , :last_progress_report_at (optional) -> , :version (optional) -> , :cancelled (optional) -> , :error_message (optional) -> , :status -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "progress" : { + "type" : "number", + "minimum" : 0.0, + "maximum" : 1.0 + }, + "last_progress_report_at" : { }, + "id" : { + "type" : "integer", + "minimum" : 1 + }, + "started_at" : { }, + "ended_at" : { }, + "initiated_by" : { + "type" : "integer", + "minimum" : 1 + }, + "cancelled" : { + "type" : "boolean" + }, + "status" : { + "type" : "string", + "enum" : [ "running", "successful", "errored", "cancelled", "timed-out" ] + }, + "error_message" : { + "type" : "string" + }, + "sync_task_type" : { + "type" : "string", + "enum" : [ "import", "export" ] + }, + "version" : { + "type" : "string" + } + }, + "required" : [ "id", "sync_task_type", "started_at", "status" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18098,27 +19908,67 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { } - } - } - } - }, - "tags" : [ "/api/ee/metabot-v3" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/metabot/" : { + "/api/ee/remote-sync/dirty" : { "get" : { - "summary" : "GET /api/ee/metabot-v3/metabot/", - "description" : "List configured metabot instances", + "summary" : "GET /api/ee/remote-sync/dirty", + "description" : "Return all models with changes that have not been pushed to the remote sync source in any\n remote-synced collection.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:dirty -> , :name -> , :model -> , :sync_status -> , :created_at (optional) -> , :updated_at (optional) -> , :collection_id (optional) -> , :authority_level (optional) -> , :display (optional) -> , :query_type (optional) -> , :description (optional) -> }>}", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "dirty" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "model" : { + "type" : "string" + }, + "authority_level" : { + "type" : "string" + }, + "id" : { + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string" + }, + "updated_at" : { }, + "query_type" : { + "type" : "string" + }, + "collection_id" : { + "type" : "integer", + "minimum" : 1 + }, + "created_at" : { }, + "display" : { + "type" : "string" + }, + "sync_status" : { + "type" : "string" + }, + "description" : { + "type" : "string" + } + }, + "required" : [ "id", "model", "sync_status" ] + } + } + }, + "required" : [ "dirty" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18127,50 +19977,73 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/metabot/{id}" : { - "get" : { - "summary" : "GET /api/ee/metabot-v3/metabot/{id}", - "description" : "Retrieve one metabot instance", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - } ], + "/api/ee/remote-sync/export" : { + "post" : { + "summary" : "POST /api/ee/remote-sync/export", + "description" : "Export the current state of the Remote Sync collection to a Source.\n\n This endpoint will:\n - Fetch the latest changes from the source\n - Create a branch or subdirectory (depending on source support)\n If no branch is supplied, use the configured export branch\n - Export the Remote Sync collection via serialization to the branch or subdirectory\n - Commit the changes if possible\n - Sync to the source if possible\n\n Requires superuser permissions.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:message -> , :task_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + }, + "task_id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "message", "task_id" ] + } + } + } }, "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] - }, - "put" : { - "summary" : "PUT /api/ee/metabot-v3/metabot/{id}", - "description" : "Update a metabot instance", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - } ], + }, + "tags" : [ "/api/ee/remote-sync" ] + } + }, + "/api/ee/remote-sync/import" : { + "post" : { + "summary" : "POST /api/ee/remote-sync/import", + "description" : "Import Metabase content from configured Remote Sync source.\n\n This endpoint will:\n - Fetch the latest changes from the configured source\n - Load the updated content using the serialization/deserialization system\n\n If `force=false` (default) and there are unsaved changes in the Remote Sync collection,\n the import returns a 400 response.\n\n Requires superuser permissions.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:status -> , :task_id -> , :message (optional) -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + }, + "status" : { + "const" : "success" + }, + "task_id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "status" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18185,86 +20058,42 @@ "schema" : { "type" : "object", "properties" : { - "collection_id" : { - "type" : "integer", - "minimum" : 1 + "branch" : { + "type" : "string", + "minLength" : 1 }, - "use_verified_content" : { + "force" : { "type" : "boolean" } - }, - "additionalProperties" : false + } } } } }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions" : { + "/api/ee/remote-sync/is-dirty" : { "get" : { - "summary" : "GET /api/ee/metabot-v3/metabot/{id}/prompt-suggestions", - "description" : "Return the prompt suggestions for the metabot instance with `id`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - }, { - "in" : "query", - "name" : "sample", - "required" : false, - "schema" : { - "type" : "boolean" - } - }, { - "in" : "query", - "name" : "model", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "metric", "model" ] - } - }, { - "in" : "query", - "name" : "model_id", - "required" : false, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] - }, - "delete" : { - "summary" : "DELETE /api/ee/metabot-v3/metabot/{id}/prompt-suggestions", - "description" : "Delete all prompt suggestions for the metabot instance with `id`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - } ], + "summary" : "GET /api/ee/remote-sync/is-dirty", + "description" : "Check if any remote-synced collection or collection item has local changes that have not been pushed\n to the remote sync source.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:is_dirty -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "is_dirty" : { + "type" : "boolean" + } + }, + "required" : [ "is_dirty" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18273,25 +20102,34 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions/regenerate" : { - "post" : { - "summary" : "POST /api/ee/metabot-v3/metabot/{id}/prompt-suggestions/regenerate", - "description" : "Remove any existing prompt suggestions for the Metabot instance with `id` and generate new ones.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - } ], + "/api/ee/remote-sync/settings" : { + "put" : { + "summary" : "PUT /api/ee/remote-sync/settings", + "description" : "Update Remote Sync related settings. You must be a superuser to do this.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:success -> , :task_id (optional) -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean" + }, + "task_id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "success" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18300,79 +20138,58 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] - } - }, - "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions/{prompt-id}" : { - "delete" : { - "summary" : "DELETE /api/ee/metabot-v3/metabot/{id}/prompt-suggestions/{prompt-id}", - "description" : "Delete the prompt suggestion with ID `prompt-id` for the metabot instance with `id`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - }, { - "in" : "path", - "name" : "prompt-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "remote-sync-branch" : { + "type" : "string" + }, + "remote-sync-token" : { + "type" : "string" + }, + "remote-sync-type" : { + "type" : "string", + "enum" : [ "production", "development" ] + }, + "remote-sync-url" : { + "type" : "string" + } + } + } + } } }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/permission_debug/" : { - "get" : { - "summary" : "GET /api/ee/permission_debug/", - "description" : "This endpoint expects a `user_id`, a `model_id` to debug permissions against, and `action_type`.\n The type of model we are debugging against is inferred by the `action_type`.\n\n It will return:\n - `decision`: The overall permission decision (\"allow\", \"denied\", or \"limited\")\n - `model-type`: The type of model being checked (e.g., \"question\")\n - `model-id`: The ID of the model being checked\n - `segment`: A set of segmentation types applied (e.g., \"sandboxed\", \"impersonated\", \"routed\")\n - `message`: A sequence of strings explaining the decision\n - `data`: A map containing details about permissions (table or collection names to group names)\n - `suggestions`: A map of group IDs to group names that could provide access\n\n Example requests:\n - Check if user can read a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/read`\n - Check if user can query a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/query`\n - Check if user can download data: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/download-data`\n\n Example responses:\n - Allowed access:\n ```json\n {\n \"decision\": \"allow\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User has permission to read this card\"],\n \"data\": {},\n \"suggestions\": {}\n }\n ```\n - Denied access with blocked table:\n ```json\n {\n \"decision\": \"denied\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User does not have permission to query this card\"],\n \"data\": {\"sample-db.PUBLIC.ORDERS\": [\"All Users\"]},\n \"suggestions\": {}\n }\n ```\n - Limited access:\n ```json\n {\n \"decision\": \"limited\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User has permission to download some data from this card\"],\n \"data\": {},\n \"suggestions\": {}\n }\n ```", - "parameters" : [ { - "in" : "query", - "name" : "user_id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - }, { - "in" : "query", - "name" : "model_id", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "in" : "query", - "name" : "action_type", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "card/read", "card/query", "card/download-data" ] - } - } ], + "/api/ee/remote-sync/stash" : { + "post" : { + "summary" : "POST /api/ee/remote-sync/stash", + "description" : "Stashes changes to a new branch, and changes the current branch to it.\n Requires superuser permissions.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:model-type -> , :model-id -> , :decision -> , :segment -> , :message -> , :data -> , :suggestions -> to >}", + "description" : "map where {:status -> , :message -> , :task_id -> }", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/metabase-enterprise.permission-debug.impl.perm-debug-info" + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + }, + "status" : { + "type" : "string" + }, + "task_id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "status", "message", "task_id" ] } } } @@ -18384,7 +20201,27 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/permission_debug" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string", + "minLength" : 1 + }, + "new_branch" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "new_branch", "message" ] + } + } + } + }, + "tags" : [ "/api/ee/remote-sync" ] } }, "/api/ee/scim/api_key" : { @@ -22186,7 +24023,9 @@ "schema" : { "type" : "object", "properties" : { - "attribute_remappings" : { }, + "attribute_remappings" : { + "$ref" : "#/components/schemas/metabase-enterprise.sandbox.schema.attribute-remappings" + }, "card_id" : { "description" : "value must be an integer greater than zero.", "type" : "integer", @@ -22309,7 +24148,9 @@ "schema" : { "type" : "object", "properties" : { - "attribute_remappings" : { }, + "attribute_remappings" : { + "$ref" : "#/components/schemas/metabase-enterprise.sandbox.schema.attribute-remappings" + }, "card_id" : { "description" : "value must be an integer greater than zero.", "type" : "integer", @@ -25897,7 +27738,7 @@ "/api/search/" : { "get" : { "summary" : "GET /api/search/", - "description" : "Search for items in Metabase.\n For the list of supported models, check [[metabase.search.config/all-models]].\n\n Filters:\n - `archived`: set to true to search archived items only, default is false\n - `table_db_id`: search for tables, cards, and models of a certain DB\n - `models`: only search for items of specific models. If not provided, search for all models\n - `filters_items_in_personal_collection`: only search for items in personal collections\n - `created_at`: search for items created at a specific timestamp\n - `created_by`: search for items created by a specific user\n - `last_edited_at`: search for items last edited at a specific timestamp\n - `last_edited_by`: search for items last edited by a specific user\n - `search_native_query`: set to true to search the content of native queries\n - `verified`: set to true to search for verified items only (requires Content Management or Official Collections premium feature)\n - `ids`: search for items with those ids, works iff single value passed to `models`\n - `display_type`: search for cards/models with specific display types\n - `non_temporal_dim_ids`: search for cards/metrics/datasets with this exact set of non temporal dimension field IDs (requires appdb engine)\n - `has_temporal_dim`: set to true for cards/metrics/datasets with 1 or more temporal dimensions (requires appdb engine)\n\n Note that not all item types support all filters, and the results will include only models that support the provided filters. For example:\n - The `created-by` filter supports dashboards, models, actions, and cards.\n - The `verified` filter supports models and cards.\n\n A search query that has both filters applied will only return models and cards.", + "description" : "Search for items in Metabase.\n For the list of supported models, check [[metabase.search.config/all-models]].\n\n Filters:\n - `archived`: set to true to search archived items only, default is false\n - `table_db_id`: search for tables, cards, and models of a certain DB\n - `models`: only search for items of specific models. If not provided, search for all models\n - `filters_items_in_personal_collection`: only search for items in personal collections\n - `created_at`: search for items created at a specific timestamp\n - `created_by`: search for items created by a specific user\n - `last_edited_at`: search for items last edited at a specific timestamp\n - `last_edited_by`: search for items last edited by a specific user\n - `search_native_query`: set to true to search the content of native queries\n - `verified`: set to true to search for verified items only (requires Content Management or Official Collections premium feature)\n - `ids`: search for items with those ids, works iff single value passed to `models`\n - `display_type`: search for cards/models with specific display types\n - `non_temporal_dim_ids`: search for cards/metrics/datasets with this exact set of non temporal dimension field IDs (requires appdb engine)\n - `has_temporal_dim`: set to true for cards/metrics/datasets with 1 or more temporal dimensions (requires appdb engine)\n\n Note that not all item types support all filters, and the results will include only models that support the provided\n filters. For example:\n\n - The `created-by` filter supports dashboards, models, actions, and cards.\n - The `verified` filter supports models and cards.\n\n A search query that has both filters applied will only return models and cards.", "parameters" : [ { "in" : "query", "name" : "q", @@ -28564,7 +30405,7 @@ "/api/user/" : { "get" : { "summary" : "GET /api/user/", - "description" : "Fetch a list of `Users` for admins or group managers.\n By default returns only active users for admins and only active users within groups that the group manager is managing for group managers.\n\n - If `status` is `deactivated`, include deactivated users only.\n - If `status` is `all`, include all users (active and inactive).\n - Also supports `include_deactivated`, which if true, is equivalent to `status=all`; If is false, is equivalent to `status=active`.\n `status` and `include_deactivated` requires superuser permissions.\n - `include_deactivated` is a legacy alias for `status` and will be removed in a future release, users are advised to use `status` for better support and flexibility.\n If both params are passed, `status` takes precedence.\n\n For users with segmented permissions, return only themselves.\n\n Takes `limit`, `offset` for pagination.\n Takes `query` for filtering on first name, last name, email.\n Also takes `group_id`, which filters on group id.", + "description" : "Fetch a list of `Users` for admins or group managers.\n By default returns only active users for admins and only active users within groups that the group manager is\n managing for group managers.\n\n - If `status` is `deactivated`, include deactivated users only.\n\n - If `status` is `all`, include all users (active and inactive).\n\n - Also supports `include_deactivated`, which if true, is equivalent to `status=all`; If is false, is equivalent to\n `status=active`. `status` and `include_deactivated` requires superuser permissions.\n\n - `include_deactivated` is a legacy alias for `status` and will be removed in a future release, users are advised\n to use `status` for better support and flexibility.\n\n If both params are passed, `status` takes precedence.\n\n For users with segmented permissions, return only themselves.\n\n Takes `limit`, `offset` for pagination.\n\n Takes `query` for filtering on first name, last name, email.\n\n Also takes `group_id`, which filters on group id.", "parameters" : [ { "in" : "query", "name" : "status", diff --git a/_docs/v0.57/configuring-metabase/environment-variables.md b/_docs/v0.57/configuring-metabase/environment-variables.md index e1b11937a..e5effe29c 100644 --- a/_docs/v0.57/configuring-metabase/environment-variables.md +++ b/_docs/v0.57/configuring-metabase/environment-variables.md @@ -1957,7 +1957,7 @@ Maximum number of async Jetty threads. If not set, then [MB_JETTY_MAXTHREADS](#m Type: integer
Default: `20`
-Limits the number of rows Metabase will display in tables sent with dashboard subscriptions and alerts. Range: 1-100. To limit the total number of rows included in the file attachment for an email dashboard subscription, use [MB_UNAGGREGATED_QUERY_ROW_LIMIT](#mb_unaggregated_query_row_limit). +Limits the number of rows Metabase will display in tables sent with dashboard subscriptions and alerts. Range: 1-100. To limit the total number of rows included in the file attachment for an email dashboard subscription, use [MB_ATTACHMENT_ROW_LIMIT](#mb_attachment_row_limit). ### `MB_AUDIT_MAX_RETENTION_DAYS` diff --git a/_site/docs/v0.57/api.html b/_site/docs/v0.57/api.html index 4cd47cddb..c546d0bfb 100644 --- a/_site/docs/v0.57/api.html +++ b/_site/docs/v0.57/api.html @@ -1503,10 +1503,134 @@ }, "required" : [ "id", "type", "name" ] }, + "metabase-enterprise.metabot-v3.tools.api.basic-snippet" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name" ] + }, + "metabase-enterprise.metabot-v3.tools.api.basic-transform" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "entity_id" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "source" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.transforms.transform-source" + }, + "type" : { + "type" : "string", + "enum" : [ "mbql", "native", "python" ] + } + }, + "required" : [ "id", "name", "type", "source" ] + }, + "metabase-enterprise.metabot-v3.tools.api.broken-question" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name" ] + }, + "metabase-enterprise.metabot-v3.tools.api.broken-transform" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name" ] + }, "metabase-enterprise.metabot-v3.tools.api.bucket" : { "type" : "string", "enum" : [ "millisecond", "second", "minute", "hour", "day", "week", "month", "quarter", "year", "second-of-minute", "minute-of-hour", "hour-of-day", "day-of-week", "day-of-month", "day-of-year", "week-of-year", "month-of-year", "quarter-of-year", "year-of-era" ] }, + "metabase-enterprise.metabot-v3.tools.api.check-transform-dependencies-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "source" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.transforms.transform-source" + }, + "transform_id" : { + "type" : "integer" + } + }, + "required" : [ "transform_id", "source" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.check-transform-dependencies-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "object", + "properties" : { + "bad_question_count" : { + "type" : "integer" + }, + "bad_questions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.broken-question" + } + }, + "bad_transform_count" : { + "type" : "integer" + }, + "bad_transforms" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.broken-transform" + } + }, + "success" : { + "type" : "boolean" + } + }, + "required" : [ "success", "bad_transform_count", "bad_transforms", "bad_question_count", "bad_questions" ] + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, "metabase-enterprise.metabot-v3.tools.api.column" : { "type" : "object", "properties" : { @@ -2025,6 +2149,60 @@ }, "required" : [ "id", "type", "name" ] }, + "metabase-enterprise.metabot-v3.tools.api.full-snippet" : { + "type" : "object", + "properties" : { + "content" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "required" : [ "id", "name", "content" ] + }, + "metabase-enterprise.metabot-v3.tools.api.full-transform" : { + "type" : "object", + "properties" : { + "entity_id" : { + "type" : "string" + }, + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "updated_at" : { + "description" : "value must be a valid date string", + "type" : "string" + }, + "source" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.transforms.transform-source" + }, + "type" : { + "type" : "string", + "enum" : [ "mbql", "native", "python" ] + }, + "target" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.transforms.transform-target" + }, + "created_at" : { + "description" : "value must be a valid date string", + "type" : "string" + }, + "description" : { + "type" : "string" + } + }, + "required" : [ "id", "name", "type", "source", "created_at", "updated_at", "target" ] + }, "metabase-enterprise.metabot-v3.tools.api.generate-insights-arguments" : { "type" : "object", "properties" : { @@ -2077,6 +2255,12 @@ "email_address" : { "type" : "string" }, + "glossary" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, "id" : { "type" : "integer" }, @@ -2325,6 +2509,43 @@ "required" : [ "output" ] } ] }, + "metabase-enterprise.metabot-v3.tools.api.get-snippet-details-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "snippet_id" : { + "type" : "integer" + } + }, + "required" : [ "snippet_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-snippet-details-result" : { + "description" : "Schema for SQL snippet detail results", + "type" : "object", + "properties" : { + "structured_output" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.full-snippet" + } + }, + "required" : [ "structured_output" ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-snippets-result" : { + "description" : "Schema for SQL snippet list results", + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.basic-snippet" + } + } + }, + "required" : [ "structured_output" ] + }, "metabase-enterprise.metabot-v3.tools.api.get-table-details-arguments" : { "allOf" : [ { "type" : "object", @@ -2477,66 +2698,174 @@ "required" : [ "output" ] } ] }, - "metabase-enterprise.metabot-v3.tools.api.group-by" : { + "metabase-enterprise.metabot-v3.tools.api.get-transform-details-arguments" : { "allOf" : [ { "type" : "object", "properties" : { - "field_granularity" : { - "type" : "string", - "enum" : [ "day", "week", "month", "quarter", "year" ] - }, - "field_id" : { - "type" : "string" + "transform_id" : { + "type" : "integer" } }, - "required" : [ "field_id" ] + "required" : [ "transform_id" ] }, { "type" : "object", "properties" : { } } ] }, - "metabase-enterprise.metabot-v3.tools.api.numeric-filter" : { + "metabase-enterprise.metabot-v3.tools.api.get-transform-details-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.full-transform" + } + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.get-transform-python-library-details-arguments" : { "allOf" : [ { "type" : "object", "properties" : { - "field_id" : { + "path" : { "type" : "string" - }, - "operation" : { - "type" : "string", - "enum" : [ "equals", "not-equals", "greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal", "number-equals", "number-not-equals", "number-greater-than", "number-greater-than-or-equal", "number-less-than", "number-less-than-or-equal" ] - }, - "value" : { - "anyOf" : [ { - "type" : "integer" - }, { - "type" : "number" - } ] } }, - "required" : [ "field_id", "operation", "value" ] + "required" : [ "path" ] }, { "type" : "object", "properties" : { } } ] }, - "metabase-enterprise.metabot-v3.tools.api.proportion" : { - "type" : "number" + "metabase-enterprise.metabot-v3.tools.api.get-transform-python-library-details-result" : { + "anyOf" : [ { + "type" : "object", + "properties" : { + "structured_output" : { + "type" : "object", + "properties" : { + "created_at" : { + "description" : "value must be a valid date string", + "type" : "string" + }, + "path" : { + "type" : "string" + }, + "source" : { + "type" : "string" + }, + "updated_at" : { + "description" : "value must be a valid date string", + "type" : "string" + } + }, + "required" : [ "source", "path", "created_at", "updated_at" ] + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] }, - "metabase-enterprise.metabot-v3.tools.api.query-datasource-arguments" : { - "allOf" : [ { + "metabase-enterprise.metabot-v3.tools.api.get-transforms-result" : { + "anyOf" : [ { "type" : "object", "properties" : { - "aggregations" : { + "structured_output" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.aggregation" + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.basic-transform" } - }, - "fields" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field" + } + }, + "required" : [ "structured_output" ] + }, { + "type" : "object", + "properties" : { + "output" : { + "type" : "string" + } + }, + "required" : [ "output" ] + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.group-by" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "field_granularity" : { + "type" : "string", + "enum" : [ "day", "week", "month", "quarter", "year" ] + }, + "field_id" : { + "type" : "string" + } + }, + "required" : [ "field_id" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.numeric-filter" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "field_id" : { + "type" : "string" + }, + "operation" : { + "type" : "string", + "enum" : [ "equals", "not-equals", "greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal", "number-equals", "number-not-equals", "number-greater-than", "number-greater-than-or-equal", "number-less-than", "number-less-than-or-equal" ] + }, + "value" : { + "anyOf" : [ { + "type" : "integer" + }, { + "type" : "number" + } ] + } + }, + "required" : [ "field_id", "operation", "value" ] + }, { + "type" : "object", + "properties" : { } + } ] + }, + "metabase-enterprise.metabot-v3.tools.api.proportion" : { + "type" : "number" + }, + "metabase-enterprise.metabot-v3.tools.api.query-datasource-arguments" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "aggregations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.aggregation" + } + }, + "fields" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field" } }, "filters" : { @@ -2680,7 +3009,7 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "table", "model", "question", "dashboard", "metric", "database" ] + "enum" : [ "table", "model", "question", "dashboard", "metric", "database", "transform" ] } }, "last_edited_at" : { @@ -2691,6 +3020,10 @@ "default" : 50, "type" : "integer" }, + "search_native_query" : { + "type" : "boolean", + "default" : false + }, "semantic_queries" : { "type" : "array", "items" : { @@ -2775,7 +3108,7 @@ }, "type" : { "type" : "string", - "enum" : [ "table", "model", "dashboard", "question", "metric", "database" ] + "enum" : [ "table", "model", "dashboard", "question", "metric", "database", "transform" ] }, "database_schema" : { "type" : "string" @@ -2921,7 +3254,47 @@ } ] }, "metabase-enterprise.metabot-v3.tools.api.table-result" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.table-result" + "type" : "object", + "properties" : { + "id" : { + "type" : "integer" + }, + "name" : { + "type" : "string" + }, + "database_id" : { + "type" : "integer" + }, + "related_tables" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.table-result" + } + }, + "display_name" : { + "type" : "string" + }, + "type" : { + "type" : "string", + "enum" : [ "model", "table" ] + }, + "fields" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.columns" + }, + "database_schema" : { + "type" : "string" + }, + "metrics" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.basic-metric" + } + }, + "description" : { + "type" : "string" + } + }, + "required" : [ "id", "type", "name", "display_name", "database_id", "fields" ] }, "metabase-enterprise.metabot-v3.tools.api.temporal-extraction-filter" : { "allOf" : [ { @@ -2983,6 +3356,12 @@ }, "required" : [ "conversation_id" ] }, + "metabase-enterprise.metabot-v3.tools.transforms.transform-source" : { + "$ref" : "#/components/schemas/metabase-enterprise.transforms.api.transform-source" + }, + "metabase-enterprise.metabot-v3.tools.transforms.transform-target" : { + "$ref" : "#/components/schemas/metabase-enterprise.transforms.api.transform-target" + }, "metabase-enterprise.permission-debug.impl.group-id" : { "type" : "integer" }, @@ -3027,6 +3406,21 @@ }, "required" : [ "model-type", "model-id", "decision", "segment", "message", "data", "suggestions" ] }, + "metabase-enterprise.sandbox.schema.attribute-remappings" : { + "type" : "object", + "additionalProperties" : { + "anyOf" : [ { + "type" : "string", + "minLength" : 1 + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.target" + } ] + }, + "description" : "value must be a valid attribute remappings map (attribute name -> remapped name)", + "optional" : true + }, "metabase-enterprise.transforms.api.run-trigger" : { "type" : "string", "enum" : [ "none", "global-schedule" ] @@ -3036,13 +3430,7 @@ "type" : "object", "properties" : { "query" : { - "type" : "object", - "properties" : { - "database" : { - "type" : "integer" - } - }, - "required" : [ "database" ] + "$ref" : "#/components/schemas/metabase.queries.schema.query" }, "type" : { "const" : "query" @@ -3689,102 +4077,268 @@ "required" : [ "moved" ] }, "metabase.legacy-mbql.schema.!=" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :!= clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.*" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :* clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.+" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :+ clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.-" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :- clause", "allOf" : [ ] }, - "metabase.legacy-mbql.schema..expression.options" : { - "description" : "Options for a legacy `:expression` ref in MBQL 4 are the same as in MBQL 5, except that `:lib/uuid` is optional and\n it cannot be empty.", - "default" : { }, + "metabase.legacy-mbql.schema..NativeQuery.Common" : { + "allOf" : [ { + "type" : "object", + "properties" : { + "collection" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "template-tags" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagMap" + } + } + }, { + "allOf" : [ ] + } ] + }, + "metabase.legacy-mbql.schema..TemplateTag.Common" : { + "description" : "Things required by all template tag types.", "type" : "object", "properties" : { - "base-type" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "database-type" : { + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" + }, + "name" : { "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, + "type" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagType" + } + }, + "required" : [ "type", "name", "display-name" ] + }, + "metabase.legacy-mbql.schema..TemplateTag.FieldFilter" : { + "description" : "Things required by all template tag types.", + "type" : "object", + "properties" : { "display-name" : { "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "effective-type" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" - }, - "lib/uuid" : { - "type" : "string", - "minLength" : 36, - "maxLength" : 36 + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" }, "name" : { "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "semantic-type" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + "required" : { + "type" : "boolean" }, - "temporal-unit" : { - "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + "type" : { + "const" : "dimension" + }, + "alias" : { + "type" : "string" + }, + "options" : { + "type" : "object", + "additionalProperties" : { }, + "description" : "optional map to be appended to filter clause" + }, + "dimension" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" + }, + "default" : { }, + "widget-type" : { + "default" : "category", + "description" : "which type of widget the frontend should show for this Field Filter; this also affects which parameter types\n are allowed to be specified for it.", + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.WidgetType" } - } + }, + "required" : [ "type", "name", "display-name", "dimension", "widget-type" ] }, - "metabase.legacy-mbql.schema..legacy-column-metadata.binning-info" : { + "metabase.legacy-mbql.schema..TemplateTag.RawValue" : { + "description" : "Things required by all template tag types.", "type" : "object", "properties" : { - "bin_width" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + "default" : { }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "binning_strategy" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" }, - "num_bins" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "strategy" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + "required" : { + "type" : "boolean" + }, + "type" : { + "type" : "string", + "enum" : [ "date", "number", "boolean", "text" ] } }, - "required" : [ "strategy" ] + "required" : [ "type", "name", "display-name" ] }, - "metabase.legacy-mbql.schema..legacy-column-metadata.qualified-keys" : { + "metabase.legacy-mbql.schema..TemplateTag.Snippet" : { + "description" : "Things required by all template tag types.", "type" : "object", "properties" : { - "lib/external-remap" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" - }, - "lib/source-column-alias" : { - "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", - "type" : "string" + "database" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.database" }, - "lib/type" : { - "default" : "metadata/column", - "const" : "metadata/column" + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "lib/source-uuid" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" }, - "qp/implicit-field?" : { - "type" : "boolean" + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "lib/ref-name" : { - "type" : "string" + "snippet-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.snippet" }, - "lib/deduplicated-name" : { - "type" : "string", - "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name." + "snippet-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" }, - "lib/original-expression-name" : { - "type" : "string", - "minLength" : 1 + "type" : { + "const" : "snippet" + } + }, + "required" : [ "type", "name", "display-name", "snippet-name", "snippet-id" ] + }, + "metabase.legacy-mbql.schema..TemplateTag.SourceQuery" : { + "description" : "Things required by all template tag types.", + "type" : "object", + "properties" : { + "card-id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "type" : { + "const" : "card" + } + }, + "required" : [ "type", "name", "display-name", "card-id" ] + }, + "metabase.legacy-mbql.schema..TemplateTag.TemporalUnit" : { + "description" : "Things required by all template tag types.", + "type" : "object", + "properties" : { + "alias" : { + "type" : "string" + }, + "default" : { }, + "dimension" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "required" : { + "type" : "boolean" + }, + "type" : { + "const" : "temporal-unit" + } + }, + "required" : [ "type", "name", "display-name", "dimension" ] + }, + "metabase.legacy-mbql.schema..TemplateTag.Value.Common" : { + "description" : "Things required by all template tag types.", + "type" : "object", + "properties" : { + "default" : { }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "required" : { + "type" : "boolean" + }, + "type" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagType" + } + }, + "required" : [ "type", "name", "display-name" ] + }, + "metabase.legacy-mbql.schema..legacy-column-metadata.binning-info" : { + "type" : "object", + "properties" : { + "bin_width" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + }, + "binning_strategy" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + }, + "num_bins" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + }, + "strategy" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" + } + }, + "required" : [ "strategy" ] + }, + "metabase.legacy-mbql.schema..legacy-column-metadata.qualified-keys" : { + "type" : "object", + "properties" : { + "lib/external-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" + }, + "lib/source-column-alias" : { + "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", + "type" : "string" + }, + "lib/type" : { + "default" : "metadata/column", + "const" : "metadata/column" + }, + "lib/source-uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "qp/implicit-field?" : { + "type" : "boolean" + }, + "lib/ref-name" : { + "type" : "string" + }, + "lib/deduplicated-name" : { + "type" : "string", + "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name." + }, + "lib/original-expression-name" : { + "type" : "string", + "minLength" : 1 }, "lib/card-id" : { "description" : "Valid Card ID", @@ -3924,45 +4478,73 @@ } }, "metabase.legacy-mbql.schema./" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :/ clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.<" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :< clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.<=" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :<= clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.=" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 := clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.>" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :> clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.>=" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :>= clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.Addable" : { "anyOf" : [ { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DateTimeExpressionArg" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpressionArg" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.interval" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DateTimeExpressionArg" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpressionArg" + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.interval" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.segment" + } ] } ] }, "metabase.legacy-mbql.schema.Aggregation" : { + "description" : "Schema for anything that is a valid `:aggregation` clause.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.aggregation-options" }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.UnnamedAggregation" } ] }, + "metabase.legacy-mbql.schema.AggregationOptionsOptions" : { + "description" : "Additional options for any aggregation clause when wrapping it in `:aggregation-options`.", + "type" : "object", + "properties" : { + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + } + } + }, + "metabase.legacy-mbql.schema.Aggregations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregation" + }, + "minItems" : 1 + }, + "metabase.legacy-mbql.schema.ArithmeticDateTimeUnit" : { + "type" : "string", + "enum" : [ "millisecond", "second", "minute", "hour", "day", "week", "month", "quarter", "year" ] + }, "metabase.legacy-mbql.schema.BooleanExpression" : { "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.and" @@ -4014,6 +4596,42 @@ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.during" } ] }, + "metabase.legacy-mbql.schema.Breakouts" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" + }, + "minItems" : 1 + }, + "metabase.legacy-mbql.schema.CaseOptions" : { + "type" : "object", + "properties" : { + "default" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ExpressionArg" + } + } + }, + "metabase.legacy-mbql.schema.CaseSubclause" : { + "type" : "array", + "prefixItems" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Filter" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ExpressionArg" + } ] + }, + "metabase.legacy-mbql.schema.CaseSubclauses" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.CaseSubclause" + }, + "minItems" : 1 + }, + "metabase.legacy-mbql.schema.CheckKeysForQueryType" : { + "allOf" : [ ] + }, + "metabase.legacy-mbql.schema.CheckQueryDoesNotHaveSourceMetadata" : { + "description" : "`:source-metadata` is added to queries when `card__id` source queries are resolved. It contains info about the\n columns in the source query.\n\n Where this is added was changed in Metabase 0.33.0 -- previously, when `card__id` source queries were resolved, the\n middleware would add `:source-metadata` to the top-level; to support joins against source queries, this has been\n changed so it is always added at the same level the resolved `:source-query` is added.\n\n This should automatically be fixed by `normalize`; if we encounter it, it means some middleware is not functioning\n properly." + }, "metabase.legacy-mbql.schema.DatabaseID" : { "description" : "Schema for a valid `:database` ID, in the top-level 'outer' query. Either a positive integer (referring to an\n actual Database), or the saved questions virtual ID, which is a placeholder used for queries using the\n `:source-table \"card__id\"` shorthand for a source query resolved by middleware (since clients might not know the\n actual DB for that source query.)", "anyOf" : [ { @@ -4045,7 +4663,7 @@ "anyOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DateOrDatetimeLiteral" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" } ] } ] }, @@ -4065,6 +4683,7 @@ "enum" : [ "second", "minute", "hour", "day", "week", "month", "quarter", "year" ] }, "metabase.legacy-mbql.schema.DatetimeExpression" : { + "description" : "Schema for the definition of a date function expression.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.+" }, { @@ -4083,11 +4702,24 @@ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.today" } ] }, + "metabase.legacy-mbql.schema.DatetimeOptions" : { + "type" : "object", + "properties" : { + "mode" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatetimeOptionsMode" + } + } + }, + "metabase.legacy-mbql.schema.DatetimeOptionsMode" : { + "type" : "string", + "enum" : [ "simple-bytes", "unix-nanoseconds", "simple", "iso", "iso-bytes", "unix-seconds", "unix-milliseconds", "unix-microseconds" ] + }, "metabase.legacy-mbql.schema.Emptyable" : { + "description" : "Schema for a valid is-empty or not-empty argument.", "anyOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.StringExpressionArg" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" } ] }, "metabase.legacy-mbql.schema.EqualityComparable" : { @@ -4100,18 +4732,19 @@ }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemporalLiteral" }, { - "oneOf" : [ { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.relative-datetime" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" - } ] + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRefOrRelativeDatetime" }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ExpressionArg" }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" } ], + "description" : "Schema for things that make sense in a `=` or `!=` filter, i.e. things that can be compared for equality.", "optional" : true }, + "metabase.legacy-mbql.schema.EqualityFilterFieldArg" : { + "description" : "Schema for the first arg to `=`, `!=`, and friends.", + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.EqualityComparable" + }, "metabase.legacy-mbql.schema.ExpressionArg" : { "oneOf" : [ { "type" : "number" @@ -4132,15 +4765,93 @@ }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" } ] }, + "metabase.legacy-mbql.schema.ExpressionName" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "metabase.legacy-mbql.schema.ExpressionRefOptions" : { + "description" : "Options for a legacy `:expression` ref in MBQL 4 are the same as in MBQL 5, except that `:lib/uuid` is optional and\n it cannot be empty.", + "default" : { }, + "type" : "object", + "properties" : { + "base-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "database-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "display-name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "effective-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/uuid" : { + "type" : "string", + "minLength" : 36, + "maxLength" : 36 + }, + "name" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "semantic-type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + }, + "temporal-unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + } + } + }, + "metabase.legacy-mbql.schema.Expressions" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionDef" + } + }, "metabase.legacy-mbql.schema.ExtractWeekMode" : { "description" : "Valid modes to extract weeks.", "type" : "string", "enum" : [ "iso", "us", "instance" ] }, - "metabase.legacy-mbql.schema.FieldOptions" : { + "metabase.legacy-mbql.schema.FieldOrExpressionDef" : { + "description" : "Schema for anything that is accepted as a top-level expression definition, either an arithmetic expression such as a\n `:+` clause or a `:field` or `:value` clause.", + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.StringExpression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.BooleanExpression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatetimeExpression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.case" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.if" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.offset" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" + } ] + }, + "metabase.legacy-mbql.schema.FieldOrExpressionRef" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.expression" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" + } ] + }, + "metabase.legacy-mbql.schema.FieldOrExpressionRefOrRelativeDatetime" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.relative-datetime" + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" + } ] + }, + "metabase.legacy-mbql.schema.FieldRefOptions" : { "default" : { }, "type" : "object", "properties" : { @@ -4201,33 +4912,11 @@ "description" : "Options for an MBQL 4 `:field` ref are the same as MBQL 5, except that `:lib/uuid` is not required and it cannot be\n empty.", "optional" : true }, - "metabase.legacy-mbql.schema.FieldOrExpressionDef" : { - "description" : "Schema for anything that is accepted as a top-level expression definition, either an arithmetic expression such as a\n `:+` clause or a `:field` or `:value` clause.", - "oneOf" : [ { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpression" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.StringExpression" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.BooleanExpression" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatetimeExpression" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.case" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.if" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.offset" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" - } ] - }, "metabase.legacy-mbql.schema.Fields" : { "allOf" : [ { "type" : "array", "items" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" }, "minItems" : 1 }, { @@ -4235,6 +4924,7 @@ } ] }, "metabase.legacy-mbql.schema.Filter" : { + "description" : "Schema for a valid MBQL `:filter` clause.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatetimeExpression" }, { @@ -4248,7 +4938,7 @@ }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.segment" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" } ] }, "metabase.legacy-mbql.schema.IntGreaterThanZeroOrNumericExpression" : { @@ -4274,12 +4964,7 @@ }, "fields" : { "description" : "The Fields from this join to include in parent-level results. This can be either `:none`, `:all`, or a sequence\n of `:field` clauses.\n\n * `:none`: no Fields from the joined table or nested query are included (unless indirectly included by breakouts or\n other clauses). This is the default, and what is used for automatically-generated joins.\n\n * `:all`: will include all of the Field from the joined table or query\n\n * a sequence of Field clauses: include only the Fields specified. Valid clauses are the same as the top-level\n `:fields` clause. This should be non-empty and all elements should be distinct. The normalizer will automatically\n remove duplicate fields for you, and replace empty clauses with `:none`.\n\n Driver implementations: you can ignore this clause. Relevant fields will be added to top-level `:fields` clause with\n appropriate aliases.", - "anyOf" : [ { - "type" : "string", - "enum" : [ "all", "none" ] - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Fields" - } ] + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.JoinFields" }, "fk-field-id" : { "$ref" : "#/components/schemas/metabase.lib.schema.id.field", @@ -4297,18 +4982,11 @@ }, "source-table" : { "description" : "*What* to JOIN. Self-joins can be done by using the same `:source-table` as in the query where\n this is specified. YOU MUST SUPPLY EITHER `:source-table` OR `:source-query`, BUT NOT BOTH!", - "anyOf" : [ { - "$ref" : "#/components/schemas/metabase.lib.schema.id.table" - }, { - "description" : "`card__` string Table ID", - "type" : "string", - "pattern" : "^card__[1-9]\\d*$" - } ] + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.SourceTable" }, "strategy" : { "description" : "Defaults to `:left-join`; used for all automatically-generated JOINs\n\n Driver implementations: this is guaranteed to be present after pre-processing.", - "type" : "string", - "enum" : [ "full-join", "right-join", "left-join", "inner-join" ] + "$ref" : "#/components/schemas/metabase.lib.schema.join.strategy" } }, "required" : [ "condition" ] @@ -4316,6 +4994,14 @@ "allOf" : [ ] } ] }, + "metabase.legacy-mbql.schema.JoinFields" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all", "none" ] + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Fields" + } ] + }, "metabase.legacy-mbql.schema.Joins" : { "description" : "Schema for a valid sequence of `Join`s. Must be a non-empty sequence, and `:alias`, if specified, must be unique.", "type" : "array", @@ -4329,11 +5015,7 @@ "type" : "object", "properties" : { "breakout" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" - }, - "minItems" : 1 + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Breakouts" }, "source-metadata" : { "type" : "array", @@ -4355,23 +5037,13 @@ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Joins" }, "aggregation" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregation" - }, - "minItems" : 1 + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregations" }, "fields" : { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Fields" }, "source-table" : { - "anyOf" : [ { - "$ref" : "#/components/schemas/metabase.lib.schema.id.table" - }, { - "description" : "`card__` string Table ID", - "type" : "string", - "pattern" : "^card__[1-9]\\d*$" - } ] + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.SourceTable" }, "order-by" : { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.OrderBys" @@ -4380,12 +5052,32 @@ "$ref" : "#/components/schemas/metabase.lib.schema.page" }, "expressions" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionDef" - } + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Expressions" } } + }, { + "type" : "object", + "properties" : { } + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.RemoveFieldRefsFromFieldsAlreadyInBreakout" + }, { + "allOf" : [ ] + } ] + }, + "metabase.legacy-mbql.schema.NativeQuery" : { + "description" : "Schema for a valid, normalized native [inner] query.", + "allOf" : [ { + "type" : "object", + "properties" : { + "collection" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" + }, + "query" : { }, + "template-tags" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagMap" + } + }, + "required" : [ "query" ] }, { "allOf" : [ ] } ] @@ -4408,6 +5100,7 @@ } ] }, "metabase.legacy-mbql.schema.NumericExpression" : { + "description" : "Schema for the definition of a numeric expression. All numeric expressions evaluate to numeric values.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.+" }, { @@ -4503,6 +5196,7 @@ } ] }, "metabase.legacy-mbql.schema.OrderComparable" : { + "description" : "Schema for things that make sense in a filter like `>` or `<`, i.e. things that can be sorted.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" }, { @@ -4515,16 +5209,20 @@ }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ExpressionArg" }, { - "oneOf" : [ { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.relative-datetime" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" - } ] + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRefOrRelativeDatetime" } ] } ] }, + "metabase.legacy-mbql.schema.OrderedFilterFieldArg" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.OrderComparable" + }, "metabase.legacy-mbql.schema.Query" : { "allOf" : [ { + "type" : "object", + "properties" : { } + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.CheckQueryDoesNotHaveSourceMetadata" + }, { "type" : "object", "properties" : { "update-row" : { @@ -4540,21 +5238,7 @@ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.MBQLQuery" }, "native" : { - "allOf" : [ { - "type" : "object", - "properties" : { - "collection" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "query" : { }, - "template-tags" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagMap" - } - }, - "required" : [ "query" ] - }, { - "allOf" : [ ] - } ] + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NativeQuery" }, "info" : { "$ref" : "#/components/schemas/metabase.lib.schema.info.info", @@ -4580,14 +5264,13 @@ }, "required" : [ "type" ] }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.check-keys-for-query-type" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.check-query-does-not-have-source-metadata" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.CheckKeysForQueryType" }, { "allOf" : [ ] } ] }, "metabase.legacy-mbql.schema.Reference" : { + "description" : "Schema for any type of valid Field clause, or for an indexed reference to an aggregation clause.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.aggregation" }, { @@ -4600,13 +5283,25 @@ "type" : "string", "enum" : [ "default", "minute", "hour", "day", "week", "month", "quarter", "year" ] }, + "metabase.legacy-mbql.schema.RemoveFieldRefsFromFieldsAlreadyInBreakout" : { }, "metabase.legacy-mbql.schema.SourceQuery" : { + "description" : "Schema for a valid value for a `:source-query`.", "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NativeSourceQuery" }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.MBQLQuery" } ] }, + "metabase.legacy-mbql.schema.SourceTable" : { + "description" : "Schema for a valid value for the `:source-table` clause of an MBQL query.", + "anyOf" : [ { + "$ref" : "#/components/schemas/metabase.lib.schema.id.table" + }, { + "description" : "`card__` string Table ID", + "type" : "string", + "pattern" : "^card__[1-9]\\d*$" + } ] + }, "metabase.legacy-mbql.schema.StringExpression" : { "oneOf" : [ { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.substring" @@ -4660,164 +5355,31 @@ }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field-or-expression-ref" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef" } ] }, + "metabase.legacy-mbql.schema.StringFilterOptions" : { + "type" : "object", + "properties" : { + "case-sensitive" : { + "type" : "boolean" + } + } + }, "metabase.legacy-mbql.schema.TemplateTag" : { "description" : "Schema for a template tag as specified in a native query. There are four types of template tags, differentiated by\n `:type`.\n\n Template tags are used to specify in native queries that are replaced with some sort of value when\n the query itself runs. There are four basic types of template tag for native queries:\n\n 1. Field filters, which are used like\n\n SELECT * FROM table WHERE \n\n These reference specific Fields and are replaced with entire conditions, e.g. `some_field > 1000`\n\n 2. Raw values, which are used like\n\n SELECT * FROM table WHERE my_field = \n\n These are replaced with raw values.\n\n 3. Native query snippets, which might be used like\n\n SELECT * FROM () source\n\n These are replaced with `NativeQuerySnippet`s from the application database.\n\n 4. Source query Card IDs, which are used like\n\n SELECT * FROM () source\n\n These are replaced with the query from the Card with that ID.\n\n Field filters and raw values usually have their value specified by `:parameters`.", "oneOf" : [ { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTag:FieldFilter" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.FieldFilter" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTag:Snippet" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.Snippet" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTag:SourceQuery" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.SourceQuery" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTag:TemporalUnit" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.TemporalUnit" }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTag:RawValue" + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.RawValue" } ] }, - "metabase.legacy-mbql.schema.TemplateTag:FieldFilter" : { - "description" : "Schema for a field filter template tag.", - "type" : "object", - "properties" : { - "display-name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" - }, - "name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "required" : { - "type" : "boolean" - }, - "type" : { - "const" : "dimension" - }, - "alias" : { - "type" : "string" - }, - "options" : { - "type" : "object", - "additionalProperties" : { }, - "description" : "optional map to be appended to filter clause" - }, - "dimension" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" - }, - "default" : { }, - "widget-type" : { - "description" : "which type of widget the frontend should show for this Field Filter; this also affects which parameter types\n are allowed to be specified for it.", - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.WidgetType" - } - }, - "required" : [ "type", "name", "display-name", "dimension", "widget-type" ] - }, - "metabase.legacy-mbql.schema.TemplateTag:RawValue" : { - "description" : "Schema for a raw value template tag.", - "type" : "object", - "properties" : { - "default" : { }, - "display-name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" - }, - "name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "required" : { - "type" : "boolean" - }, - "type" : { - "type" : "string", - "enum" : [ "date", "number", "boolean", "text" ] - } - }, - "required" : [ "type", "name", "display-name" ] - }, - "metabase.legacy-mbql.schema.TemplateTag:Snippet" : { - "description" : "Schema for a native query snippet template tag.", - "type" : "object", - "properties" : { - "database" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.database" - }, - "display-name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" - }, - "name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "snippet-id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.snippet" - }, - "snippet-name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "type" : { - "const" : "snippet" - } - }, - "required" : [ "type", "name", "display-name", "snippet-name", "snippet-id" ] - }, - "metabase.legacy-mbql.schema.TemplateTag:SourceQuery" : { - "description" : "Schema for a source query template tag.", - "type" : "object", - "properties" : { - "card-id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.card" - }, - "display-name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" - }, - "name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "type" : { - "const" : "card" - } - }, - "required" : [ "type", "name", "display-name", "card-id" ] - }, - "metabase.legacy-mbql.schema.TemplateTag:TemporalUnit" : { - "description" : "Schema for a temporal unit template tag.", - "type" : "object", - "properties" : { - "alias" : { - "type" : "string" - }, - "default" : { }, - "dimension" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" - }, - "display-name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" - }, - "name" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" - }, - "required" : { - "type" : "boolean" - }, - "type" : { - "const" : "temporal-unit" - } - }, - "required" : [ "type", "name", "display-name", "dimension" ] - }, "metabase.legacy-mbql.schema.TemplateTagMap" : { "description" : "Schema for the `:template-tags` map passed in as part of a native query.\n\n Map of template tag name -> template tag definition", "allOf" : [ { @@ -4829,6 +5391,11 @@ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag..template-tag-map.validate-names" } ] }, + "metabase.legacy-mbql.schema.TemplateTagType" : { + "description" : "Schema for valid values of template tag `:type`.", + "type" : "string", + "enum" : [ "snippet", "card", "dimension", "number", "text", "date" ] + }, "metabase.legacy-mbql.schema.TemporalExtractUnit" : { "description" : "Valid units to extract from a temporal.", "type" : "string", @@ -4842,6 +5409,14 @@ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TimeLiteral" } ] }, + "metabase.legacy-mbql.schema.TimeIntervalOptions" : { + "type" : "object", + "properties" : { + "include-current" : { + "type" : "boolean" + } + } + }, "metabase.legacy-mbql.schema.TimeLiteral" : { "description" : "Schema for valid time literals.", "anyOf" : [ { @@ -4926,657 +5501,667 @@ } }, "metabase.legacy-mbql.schema.WidgetType" : { - "description" : "Schema for valid values of `:widget-type` for a [[::TemplateTag:FieldFilter]].", + "description" : "Schema for valid values of `:widget-type` for a [[::TemplateTag.FieldFilter]].", "$ref" : "#/components/schemas/metabase.lib.schema.parameter.widget-type" }, "metabase.legacy-mbql.schema.abs" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :abs clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.absolute-datetime" : { + "description" : "Schema for a valid MBQL 4 :absolute-datetime clause.", "oneOf" : [ { }, { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :absolute-datetime clause", "allOf" : [ ] }, { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :absolute-datetime clause", "allOf" : [ ] } ] }, "metabase.legacy-mbql.schema.aggregation" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :aggregation clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.aggregation-options" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :aggregation-options clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.and" : { - "description" : "schema for a valid legacy MBQL :tag clause", - "allOf" : [ ] + "description" : "Schema for a valid MBQL 4 :and clause.", + "oneOf" : [ { + "description" : "schema for a valid MBQL 4 :and clause", + "allOf" : [ ] + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Filter" + } ] }, "metabase.legacy-mbql.schema.asc" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :asc clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.avg" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :avg clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.between" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :between clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.case" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :case clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.ceil" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :ceil clause", "allOf" : [ ] }, - "metabase.legacy-mbql.schema.check-keys-for-query-type" : { - "allOf" : [ ] - }, - "metabase.legacy-mbql.schema.check-query-does-not-have-source-metadata" : { - "description" : "`:source-metadata` is added to queries when `card__id` source queries are resolved. It contains info about the\n columns in the source query.\n\n Where this is added was changed in Metabase 0.33.0 -- previously, when `card__id` source queries were resolved, the\n middleware would add `:source-metadata` to the top-level; to support joins against source queries, this has been\n changed so it is always added at the same level the resolved `:source-query` is added.\n\n This should automatically be fixed by `normalize`; if we encounter it, it means some middleware is not functioning\n properly." - }, "metabase.legacy-mbql.schema.coalesce" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :coalesce clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.concat" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :concat clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.contains" : { + "description" : "Schema for a valid MBQL 4 :metabase.legacy-mbql.schema/contains clause.", "anyOf" : [ { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :contains clause", "allOf" : [ ] }, { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :contains clause", "allOf" : [ ] } ] }, "metabase.legacy-mbql.schema.convert-timezone" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :convert-timezone clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.count" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :count clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.count-where" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :count-where clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.cum-count" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :cum-count clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.cum-sum" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :cum-sum clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.date" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :date clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.datetime" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :datetime clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.datetime-add" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :datetime-add clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.datetime-diff" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :datetime-diff clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.datetime-subtract" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :datetime-subtract clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.day-name" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :day-name clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.desc" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :desc clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.distinct" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :distinct clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.distinct-where" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :distinct-where clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.does-not-contain" : { + "description" : "Schema for a valid MBQL 4 :metabase.legacy-mbql.schema/does-not-contain clause.", "anyOf" : [ { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :does-not-contain clause", "allOf" : [ ] }, { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :does-not-contain clause", "allOf" : [ ] } ] }, "metabase.legacy-mbql.schema.domain" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :domain clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.during" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :during clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.ends-with" : { + "description" : "Schema for a valid MBQL 4 :metabase.legacy-mbql.schema/ends-with clause.", "anyOf" : [ { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :ends-with clause", "allOf" : [ ] }, { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :ends-with clause", "allOf" : [ ] } ] }, "metabase.legacy-mbql.schema.exp" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :exp clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.expression" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :expression clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.field" : { + "description" : "Schema for a valid MBQL 4 :field clause.", "allOf" : [ { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :field clause", "allOf" : [ ] }, { "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.require-base-type-for-field-name" } ] }, - "metabase.legacy-mbql.schema.field-or-expression-ref" : { - "oneOf" : [ { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.expression" - }, { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" - } ] - }, "metabase.legacy-mbql.schema.float" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :float clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.floor" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :floor clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-day" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-day clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-day-of-week" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-day-of-week clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-hour" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-hour clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-minute" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-minute clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-month" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-month clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-quarter" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-quarter clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-second" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-second clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-week" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-week clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.get-year" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :get-year clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.helpers.distinct" : { "description" : "values must be distinct" }, "metabase.legacy-mbql.schema.host" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :host clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.if" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :if clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.in" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :in clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.inside" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :inside clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.integer" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :integer clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.interval" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :interval clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.is-empty" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :is-empty clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.is-null" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :is-null clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.legacy-column-metadata" : { "description" : "Schema for a single legacy metadata column. This is the pre-Lib equivalent of\n `:metabase.lib.schema.metadata/column`.", - "type" : "object", - "properties" : { - "field_ref" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference" - }, - "lib/external-remap" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" - }, - "lib/source-column-alias" : { - "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", - "type" : "string" - }, - "lib/type" : { - "default" : "metadata/column", - "const" : "metadata/column" - }, - "fingerprint" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint" - }, - "visibility_type" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type" - }, - "base_type" : { - "default" : "type/*", - "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" - }, - "lib/source-uuid" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" - }, - "qp/implicit-field?" : { - "type" : "boolean" - }, - "lib/ref-name" : { - "type" : "string" - }, - "id" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.field" - }, - "lib/deduplicated-name" : { - "type" : "string", - "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name." - }, - "lib/original-expression-name" : { - "type" : "string", - "minLength" : 1 - }, - "name" : { - "type" : "string" - }, - "lib/card-id" : { - "description" : "Valid Card ID", - "type" : "integer", - "minimum" : 1 - }, - "lib/expression-name" : { - "type" : "string", - "minLength" : 1 - }, - "lib/breakout?" : { - "type" : "boolean" - }, - "metabase.lib.field/temporal-unit" : { - "type" : "string", - "enum" : [ "day", "day-of-month", "day-of-week", "day-of-year", "default", "hour", "hour-of-day", "millisecond", "minute", "minute-of-hour", "month", "month-of-year", "quarter", "quarter-of-year", "second", "second-of-minute", "week", "week-of-year", "year", "year-of-era" ] - }, - "metabase.lib.field/binning" : { - "description" : "Schema for `:binning` options passed to a `:field` clause.", - "allOf" : [ { - "type" : "object", - "properties" : { - "strategy" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" - } - }, - "required" : [ "strategy" ] - }, { - "oneOf" : [ { + "allOf" : [ { + "type" : "object", + "properties" : { + "field_ref" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference" + }, + "lib/external-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" + }, + "lib/source-column-alias" : { + "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", + "type" : "string" + }, + "lib/type" : { + "default" : "metadata/column", + "const" : "metadata/column" + }, + "fingerprint" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint" + }, + "visibility_type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type" + }, + "base_type" : { + "default" : "type/*", + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/source-uuid" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" + }, + "qp/implicit-field?" : { + "type" : "boolean" + }, + "lib/ref-name" : { + "type" : "string" + }, + "id" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + }, + "lib/deduplicated-name" : { + "type" : "string", + "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name." + }, + "lib/original-expression-name" : { + "type" : "string", + "minLength" : 1 + }, + "name" : { + "type" : "string" + }, + "lib/card-id" : { + "description" : "Valid Card ID", + "type" : "integer", + "minimum" : 1 + }, + "lib/expression-name" : { + "type" : "string", + "minLength" : 1 + }, + "lib/breakout?" : { + "type" : "boolean" + }, + "metabase.lib.field/temporal-unit" : { + "type" : "string", + "enum" : [ "day", "day-of-month", "day-of-week", "day-of-year", "default", "hour", "hour-of-day", "millisecond", "minute", "minute-of-hour", "month", "month-of-year", "quarter", "quarter-of-year", "second", "second-of-minute", "week", "week-of-year", "year", "year-of-era" ] + }, + "metabase.lib.field/binning" : { + "description" : "Schema for `:binning` options passed to a `:field` clause.", + "allOf" : [ { "type" : "object", "properties" : { "strategy" : { - "const" : "default" + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" } }, "required" : [ "strategy" ] }, { - "type" : "object", - "properties" : { - "bin-width" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + "oneOf" : [ { + "type" : "object", + "properties" : { + "strategy" : { + "const" : "default" + } }, - "strategy" : { - "const" : "bin-width" - } - }, - "required" : [ "strategy", "bin-width" ] - }, { - "type" : "object", - "properties" : { - "num-bins" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + "required" : [ "strategy" ] + }, { + "type" : "object", + "properties" : { + "bin-width" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + }, + "strategy" : { + "const" : "bin-width" + } }, - "strategy" : { - "const" : "num-bins" - } - }, - "required" : [ "strategy", "num-bins" ] + "required" : [ "strategy", "bin-width" ] + }, { + "type" : "object", + "properties" : { + "num-bins" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + }, + "strategy" : { + "const" : "num-bins" + } + }, + "required" : [ "strategy", "num-bins" ] + } ] } ] - } ] - }, - "semantic_type" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" - }, - "display_name" : { - "type" : "string" - }, - "lib/model-display-name" : { - "type" : "string" - }, - "lib/internal-remap" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal" - }, - "converted_timezone" : { - "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.timezone-id" - }, - "source" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source" - }, - "metabase.lib.join/join-alias" : { - "type" : "string", - "minLength" : 1 - }, - "binning_info" : { - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..legacy-column-metadata.binning-info" - }, - "lib/original-binning" : { - "description" : "Schema for `:binning` options passed to a `:field` clause.", - "allOf" : [ { - "type" : "object", - "properties" : { - "strategy" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" - } - }, - "required" : [ "strategy" ] - }, { - "oneOf" : [ { + }, + "semantic_type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" + }, + "display_name" : { + "type" : "string" + }, + "lib/model-display-name" : { + "type" : "string" + }, + "lib/internal-remap" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal" + }, + "converted_timezone" : { + "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.timezone-id" + }, + "source" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source" + }, + "metabase.lib.join/join-alias" : { + "type" : "string", + "minLength" : 1 + }, + "binning_info" : { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..legacy-column-metadata.binning-info" + }, + "lib/original-binning" : { + "description" : "Schema for `:binning` options passed to a `:field` clause.", + "allOf" : [ { "type" : "object", "properties" : { "strategy" : { - "const" : "default" + "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" } }, "required" : [ "strategy" ] }, { - "type" : "object", - "properties" : { - "bin-width" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + "oneOf" : [ { + "type" : "object", + "properties" : { + "strategy" : { + "const" : "default" + } }, - "strategy" : { - "const" : "bin-width" - } - }, - "required" : [ "strategy", "bin-width" ] - }, { - "type" : "object", - "properties" : { - "num-bins" : { - "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + "required" : [ "strategy" ] + }, { + "type" : "object", + "properties" : { + "bin-width" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" + }, + "strategy" : { + "const" : "bin-width" + } }, - "strategy" : { - "const" : "num-bins" - } - }, - "required" : [ "strategy", "num-bins" ] + "required" : [ "strategy", "bin-width" ] + }, { + "type" : "object", + "properties" : { + "num-bins" : { + "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" + }, + "strategy" : { + "const" : "num-bins" + } + }, + "required" : [ "strategy", "num-bins" ] + } ] } ] - } ] - }, - "effective_type" : { - "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" - }, - "lib/original-join-alias" : { - "type" : "string", - "minLength" : 1 - }, - "lib/original-display-name" : { - "type" : "string" - }, - "unit" : { - "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" - }, - "lib/source" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source" - }, - "lib/ref-display-name" : { - "type" : "string" - }, - "lib/original-name" : { - "type" : "string", - "description" : "The original name of the column as it appeared in the very first place it came from (i.e., the physical name of the\n column in the table it appears in). This should be the same as the `:lib/source-column-alias` for the very first\n usage of the column.\n Allowed to be blank because some databases like SQL Server allow blank column names." + }, + "effective_type" : { + "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" + }, + "lib/original-join-alias" : { + "type" : "string", + "minLength" : 1 + }, + "lib/original-display-name" : { + "type" : "string" + }, + "unit" : { + "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" + }, + "lib/source" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source" + }, + "lib/ref-display-name" : { + "type" : "string" + }, + "lib/original-name" : { + "type" : "string", + "description" : "The original name of the column as it appeared in the very first place it came from (i.e., the physical name of the\n column in the table it appears in). This should be the same as the `:lib/source-column-alias` for the very first\n usage of the column.\n Allowed to be blank because some databases like SQL Server allow blank column names." + }, + "description" : { + "type" : "string" + }, + "lib/desired-column-alias" : { + "description" : "Name we should use as a column alias for a column in this stage of a query. The desired column alias in stage N\n becomes the source column alias in stage N+1. The right-hand side (RHS) in\n\n SELECT lhs AS rhs", + "type" : "string" + } }, - "lib/desired-column-alias" : { - "description" : "Name we should use as a column alias for a column in this stage of a query. The desired column alias in stage N\n becomes the source column alias in stage N+1. The right-hand side (RHS) in\n\n SELECT lhs AS rhs", - "type" : "string" - } - }, - "required" : [ "base_type", "display_name", "name" ] + "required" : [ "base_type", "display_name", "name" ] + }, { + "allOf" : [ ] + } ] }, "metabase.legacy-mbql.schema.length" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :length clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.log" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :log clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.lower" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :lower clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.ltrim" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :ltrim clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.max" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :max clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.median" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :median clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.metric" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :metric clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.min" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :min clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.month-name" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :month-name clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.not" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :not clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.not-empty" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :not-empty clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.not-in" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :not-in clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.not-null" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :not-null clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.now" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :now clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.offset" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :offset clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.or" : { - "description" : "schema for a valid legacy MBQL :tag clause", - "allOf" : [ ] + "description" : "Schema for a valid MBQL 4 :or clause.", + "oneOf" : [ { + "description" : "schema for a valid MBQL 4 :or clause", + "allOf" : [ ] + }, { + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Filter" + } ] }, "metabase.legacy-mbql.schema.path" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :path clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.percentile" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :percentile clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.power" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :power clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.quarter-name" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :quarter-name clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.regex-match-first" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :regex-match-first clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.relative-datetime" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :relative-datetime clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.relative-time-interval" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :relative-time-interval clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.replace" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :replace clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.require-base-type-for-field-name" : { "description" : "Fields using names rather than integer IDs are required to specify `:base-type`." }, "metabase.legacy-mbql.schema.round" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :round clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.rtrim" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :rtrim clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.segment" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :segment clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.share" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :share clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.split-part" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :split-part clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.sqrt" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :sqrt clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.starts-with" : { + "description" : "Schema for a valid MBQL 4 :metabase.legacy-mbql.schema/starts-with clause.", "anyOf" : [ { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :starts-with clause", "allOf" : [ ] }, { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :starts-with clause", "allOf" : [ ] } ] }, "metabase.legacy-mbql.schema.stddev" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :stddev clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.subdomain" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :subdomain clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.substring" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :substring clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.sum" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :sum clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.sum-where" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :sum-where clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.temporal-extract" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :temporal-extract clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.text" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :text clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.time" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :time clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.time-interval" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :time-interval clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.today" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :today clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.trim" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :trim clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.upper" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :upper clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.value" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :value clause", "allOf" : [ ] }, "metabase.legacy-mbql.schema.var" : { - "description" : "schema for a valid legacy MBQL :tag clause", + "description" : "schema for a valid MBQL 4 :var clause", "allOf" : [ ] }, "metabase.lib.metadata.protocols.metadata-provider" : { @@ -5996,7 +6581,7 @@ }, { "anyOf" : [ { "type" : "string", - "enum" : [ "Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmara", "Africa/Asmera", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Timbuktu", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/Buenos_Aires", "America/Argentina/Catamarca", "America/Argentina/ComodRivadavia", "America/Argentina/Cordoba", "America/Argentina/Jujuy", "America/Argentina/La_Rioja", "America/Argentina/Mendoza", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Atikokan", "America/Atka", "America/Bahia", "America/Bahia_Banderas", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Buenos_Aires", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Catamarca", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Ciudad_Juarez", "America/Coral_Harbour", "America/Cordoba", "America/Costa_Rica", "America/Coyhaique", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson", "America/Dawson_Creek", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Ensenada", "America/Fort_Nelson", "America/Fort_Wayne", "America/Fortaleza", "America/Glace_Bay", "America/Godthab", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Indianapolis", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indianapolis", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Jujuy", "America/Juneau", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Knox_IN", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Louisville", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Mendoza", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montreal", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Nuuk", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port-au-Prince", "America/Port_of_Spain", "America/Porto_Acre", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Rosario", "America/Santa_Isabel", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Shiprock", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Virgin", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/South_Pole", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Ashkhabad", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Calcutta", "Asia/Chita", "Asia/Choibalsan", "Asia/Chongqing", "Asia/Chungking", "Asia/Colombo", "Asia/Dacca", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Harbin", "Asia/Hebron", "Asia/Ho_Chi_Minh", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Istanbul", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Kashgar", "Asia/Kathmandu", "Asia/Katmandu", "Asia/Khandyga", "Asia/Kolkata", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macao", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Rangoon", "Asia/Riyadh", "Asia/Saigon", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Tel_Aviv", "Asia/Thimbu", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ujung_Pandang", "Asia/Ulaanbaatar", "Asia/Ulan_Bator", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yangon", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faeroe", "Atlantic/Faroe", "Atlantic/Jan_Mayen", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/ACT", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Canberra", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/LHI", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/NSW", "Australia/North", "Australia/Perth", "Australia/Queensland", "Australia/South", "Australia/Sydney", "Australia/Tasmania", "Australia/Victoria", "Australia/West", "Australia/Yancowinna", "Brazil/Acre", "Brazil/DeNoronha", "Brazil/East", "Brazil/West", "CET", "CST6CDT", "Canada/Atlantic", "Canada/Central", "Canada/Eastern", "Canada/Mountain", "Canada/Newfoundland", "Canada/Pacific", "Canada/Saskatchewan", "Canada/Yukon", "Chile/Continental", "Chile/EasterIsland", "Cuba", "EET", "EST5EDT", "Egypt", "Eire", "Etc/GMT", "Etc/GMT+0", "Etc/GMT+1", "Etc/GMT+10", "Etc/GMT+11", "Etc/GMT+12", "Etc/GMT+2", "Etc/GMT+3", "Etc/GMT+4", "Etc/GMT+5", "Etc/GMT+6", "Etc/GMT+7", "Etc/GMT+8", "Etc/GMT+9", "Etc/GMT-0", "Etc/GMT-1", "Etc/GMT-10", "Etc/GMT-11", "Etc/GMT-12", "Etc/GMT-13", "Etc/GMT-14", "Etc/GMT-2", "Etc/GMT-3", "Etc/GMT-4", "Etc/GMT-5", "Etc/GMT-6", "Etc/GMT-7", "Etc/GMT-8", "Etc/GMT-9", "Etc/GMT0", "Etc/Greenwich", "Etc/UCT", "Etc/UTC", "Etc/Universal", "Etc/Zulu", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belfast", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Kyiv", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Europe/Nicosia", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Tiraspol", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "GB", "GB-Eire", "GMT", "GMT0", "Greenwich", "Hongkong", "Iceland", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Iran", "Israel", "Jamaica", "Japan", "Kwajalein", "Libya", "MET", "MST7MDT", "Mexico/BajaNorte", "Mexico/BajaSur", "Mexico/General", "NZ", "NZ-CHAT", "Navajo", "PRC", "PST8PDT", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Chuuk", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Kanton", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Pohnpei", "Pacific/Ponape", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Samoa", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Truk", "Pacific/Wake", "Pacific/Wallis", "Pacific/Yap", "Poland", "Portugal", "ROK", "Singapore", "SystemV/AST4", "SystemV/AST4ADT", "SystemV/CST6", "SystemV/CST6CDT", "SystemV/EST5", "SystemV/EST5EDT", "SystemV/HST10", "SystemV/MST7", "SystemV/MST7MDT", "SystemV/PST8", "SystemV/PST8PDT", "SystemV/YST9", "SystemV/YST9YDT", "Turkey", "UCT", "US/Alaska", "US/Aleutian", "US/Arizona", "US/Central", "US/East-Indiana", "US/Eastern", "US/Hawaii", "US/Indiana-Starke", "US/Michigan", "US/Mountain", "US/Pacific", "US/Samoa", "UTC", "Universal", "W-SU", "WET", "Zulu" ] + "enum" : [ "Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmara", "Africa/Asmera", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/Cairo", "Africa/Casablanca", "Africa/Ceuta", "Africa/Conakry", "Africa/Dakar", "Africa/Dar_es_Salaam", "Africa/Djibouti", "Africa/Douala", "Africa/El_Aaiun", "Africa/Freetown", "Africa/Gaborone", "Africa/Harare", "Africa/Johannesburg", "Africa/Juba", "Africa/Kampala", "Africa/Khartoum", "Africa/Kigali", "Africa/Kinshasa", "Africa/Lagos", "Africa/Libreville", "Africa/Lome", "Africa/Luanda", "Africa/Lubumbashi", "Africa/Lusaka", "Africa/Malabo", "Africa/Maputo", "Africa/Maseru", "Africa/Mbabane", "Africa/Mogadishu", "Africa/Monrovia", "Africa/Nairobi", "Africa/Ndjamena", "Africa/Niamey", "Africa/Nouakchott", "Africa/Ouagadougou", "Africa/Porto-Novo", "Africa/Sao_Tome", "Africa/Timbuktu", "Africa/Tripoli", "Africa/Tunis", "Africa/Windhoek", "America/Adak", "America/Anchorage", "America/Anguilla", "America/Antigua", "America/Araguaina", "America/Argentina/Buenos_Aires", "America/Argentina/Catamarca", "America/Argentina/ComodRivadavia", "America/Argentina/Cordoba", "America/Argentina/Jujuy", "America/Argentina/La_Rioja", "America/Argentina/Mendoza", "America/Argentina/Rio_Gallegos", "America/Argentina/Salta", "America/Argentina/San_Juan", "America/Argentina/San_Luis", "America/Argentina/Tucuman", "America/Argentina/Ushuaia", "America/Aruba", "America/Asuncion", "America/Atikokan", "America/Atka", "America/Bahia", "America/Bahia_Banderas", "America/Barbados", "America/Belem", "America/Belize", "America/Blanc-Sablon", "America/Boa_Vista", "America/Bogota", "America/Boise", "America/Buenos_Aires", "America/Cambridge_Bay", "America/Campo_Grande", "America/Cancun", "America/Caracas", "America/Catamarca", "America/Cayenne", "America/Cayman", "America/Chicago", "America/Chihuahua", "America/Ciudad_Juarez", "America/Coral_Harbour", "America/Cordoba", "America/Costa_Rica", "America/Creston", "America/Cuiaba", "America/Curacao", "America/Danmarkshavn", "America/Dawson", "America/Dawson_Creek", "America/Denver", "America/Detroit", "America/Dominica", "America/Edmonton", "America/Eirunepe", "America/El_Salvador", "America/Ensenada", "America/Fort_Nelson", "America/Fort_Wayne", "America/Fortaleza", "America/Glace_Bay", "America/Godthab", "America/Goose_Bay", "America/Grand_Turk", "America/Grenada", "America/Guadeloupe", "America/Guatemala", "America/Guayaquil", "America/Guyana", "America/Halifax", "America/Havana", "America/Hermosillo", "America/Indiana/Indianapolis", "America/Indiana/Knox", "America/Indiana/Marengo", "America/Indiana/Petersburg", "America/Indiana/Tell_City", "America/Indiana/Vevay", "America/Indiana/Vincennes", "America/Indiana/Winamac", "America/Indianapolis", "America/Inuvik", "America/Iqaluit", "America/Jamaica", "America/Jujuy", "America/Juneau", "America/Kentucky/Louisville", "America/Kentucky/Monticello", "America/Knox_IN", "America/Kralendijk", "America/La_Paz", "America/Lima", "America/Los_Angeles", "America/Louisville", "America/Lower_Princes", "America/Maceio", "America/Managua", "America/Manaus", "America/Marigot", "America/Martinique", "America/Matamoros", "America/Mazatlan", "America/Mendoza", "America/Menominee", "America/Merida", "America/Metlakatla", "America/Mexico_City", "America/Miquelon", "America/Moncton", "America/Monterrey", "America/Montevideo", "America/Montreal", "America/Montserrat", "America/Nassau", "America/New_York", "America/Nipigon", "America/Nome", "America/Noronha", "America/North_Dakota/Beulah", "America/North_Dakota/Center", "America/North_Dakota/New_Salem", "America/Nuuk", "America/Ojinaga", "America/Panama", "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port-au-Prince", "America/Port_of_Spain", "America/Porto_Acre", "America/Porto_Velho", "America/Puerto_Rico", "America/Punta_Arenas", "America/Rainy_River", "America/Rankin_Inlet", "America/Recife", "America/Regina", "America/Resolute", "America/Rio_Branco", "America/Rosario", "America/Santa_Isabel", "America/Santarem", "America/Santiago", "America/Santo_Domingo", "America/Sao_Paulo", "America/Scoresbysund", "America/Shiprock", "America/Sitka", "America/St_Barthelemy", "America/St_Johns", "America/St_Kitts", "America/St_Lucia", "America/St_Thomas", "America/St_Vincent", "America/Swift_Current", "America/Tegucigalpa", "America/Thule", "America/Thunder_Bay", "America/Tijuana", "America/Toronto", "America/Tortola", "America/Vancouver", "America/Virgin", "America/Whitehorse", "America/Winnipeg", "America/Yakutat", "America/Yellowknife", "Antarctica/Casey", "Antarctica/Davis", "Antarctica/DumontDUrville", "Antarctica/Macquarie", "Antarctica/Mawson", "Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Rothera", "Antarctica/South_Pole", "Antarctica/Syowa", "Antarctica/Troll", "Antarctica/Vostok", "Arctic/Longyearbyen", "Asia/Aden", "Asia/Almaty", "Asia/Amman", "Asia/Anadyr", "Asia/Aqtau", "Asia/Aqtobe", "Asia/Ashgabat", "Asia/Ashkhabad", "Asia/Atyrau", "Asia/Baghdad", "Asia/Bahrain", "Asia/Baku", "Asia/Bangkok", "Asia/Barnaul", "Asia/Beirut", "Asia/Bishkek", "Asia/Brunei", "Asia/Calcutta", "Asia/Chita", "Asia/Choibalsan", "Asia/Chongqing", "Asia/Chungking", "Asia/Colombo", "Asia/Dacca", "Asia/Damascus", "Asia/Dhaka", "Asia/Dili", "Asia/Dubai", "Asia/Dushanbe", "Asia/Famagusta", "Asia/Gaza", "Asia/Harbin", "Asia/Hebron", "Asia/Ho_Chi_Minh", "Asia/Hong_Kong", "Asia/Hovd", "Asia/Irkutsk", "Asia/Istanbul", "Asia/Jakarta", "Asia/Jayapura", "Asia/Jerusalem", "Asia/Kabul", "Asia/Kamchatka", "Asia/Karachi", "Asia/Kashgar", "Asia/Kathmandu", "Asia/Katmandu", "Asia/Khandyga", "Asia/Kolkata", "Asia/Krasnoyarsk", "Asia/Kuala_Lumpur", "Asia/Kuching", "Asia/Kuwait", "Asia/Macao", "Asia/Macau", "Asia/Magadan", "Asia/Makassar", "Asia/Manila", "Asia/Muscat", "Asia/Nicosia", "Asia/Novokuznetsk", "Asia/Novosibirsk", "Asia/Omsk", "Asia/Oral", "Asia/Phnom_Penh", "Asia/Pontianak", "Asia/Pyongyang", "Asia/Qatar", "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Rangoon", "Asia/Riyadh", "Asia/Saigon", "Asia/Sakhalin", "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore", "Asia/Srednekolymsk", "Asia/Taipei", "Asia/Tashkent", "Asia/Tbilisi", "Asia/Tehran", "Asia/Tel_Aviv", "Asia/Thimbu", "Asia/Thimphu", "Asia/Tokyo", "Asia/Tomsk", "Asia/Ujung_Pandang", "Asia/Ulaanbaatar", "Asia/Ulan_Bator", "Asia/Urumqi", "Asia/Ust-Nera", "Asia/Vientiane", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yangon", "Asia/Yekaterinburg", "Asia/Yerevan", "Atlantic/Azores", "Atlantic/Bermuda", "Atlantic/Canary", "Atlantic/Cape_Verde", "Atlantic/Faeroe", "Atlantic/Faroe", "Atlantic/Jan_Mayen", "Atlantic/Madeira", "Atlantic/Reykjavik", "Atlantic/South_Georgia", "Atlantic/St_Helena", "Atlantic/Stanley", "Australia/ACT", "Australia/Adelaide", "Australia/Brisbane", "Australia/Broken_Hill", "Australia/Canberra", "Australia/Currie", "Australia/Darwin", "Australia/Eucla", "Australia/Hobart", "Australia/LHI", "Australia/Lindeman", "Australia/Lord_Howe", "Australia/Melbourne", "Australia/NSW", "Australia/North", "Australia/Perth", "Australia/Queensland", "Australia/South", "Australia/Sydney", "Australia/Tasmania", "Australia/Victoria", "Australia/West", "Australia/Yancowinna", "Brazil/Acre", "Brazil/DeNoronha", "Brazil/East", "Brazil/West", "CET", "CST6CDT", "Canada/Atlantic", "Canada/Central", "Canada/Eastern", "Canada/Mountain", "Canada/Newfoundland", "Canada/Pacific", "Canada/Saskatchewan", "Canada/Yukon", "Chile/Continental", "Chile/EasterIsland", "Cuba", "EET", "EST5EDT", "Egypt", "Eire", "Etc/GMT", "Etc/GMT+0", "Etc/GMT+1", "Etc/GMT+10", "Etc/GMT+11", "Etc/GMT+12", "Etc/GMT+2", "Etc/GMT+3", "Etc/GMT+4", "Etc/GMT+5", "Etc/GMT+6", "Etc/GMT+7", "Etc/GMT+8", "Etc/GMT+9", "Etc/GMT-0", "Etc/GMT-1", "Etc/GMT-10", "Etc/GMT-11", "Etc/GMT-12", "Etc/GMT-13", "Etc/GMT-14", "Etc/GMT-2", "Etc/GMT-3", "Etc/GMT-4", "Etc/GMT-5", "Etc/GMT-6", "Etc/GMT-7", "Etc/GMT-8", "Etc/GMT-9", "Etc/GMT0", "Etc/Greenwich", "Etc/UCT", "Etc/UTC", "Etc/Universal", "Etc/Zulu", "Europe/Amsterdam", "Europe/Andorra", "Europe/Astrakhan", "Europe/Athens", "Europe/Belfast", "Europe/Belgrade", "Europe/Berlin", "Europe/Bratislava", "Europe/Brussels", "Europe/Bucharest", "Europe/Budapest", "Europe/Busingen", "Europe/Chisinau", "Europe/Copenhagen", "Europe/Dublin", "Europe/Gibraltar", "Europe/Guernsey", "Europe/Helsinki", "Europe/Isle_of_Man", "Europe/Istanbul", "Europe/Jersey", "Europe/Kaliningrad", "Europe/Kiev", "Europe/Kirov", "Europe/Kyiv", "Europe/Lisbon", "Europe/Ljubljana", "Europe/London", "Europe/Luxembourg", "Europe/Madrid", "Europe/Malta", "Europe/Mariehamn", "Europe/Minsk", "Europe/Monaco", "Europe/Moscow", "Europe/Nicosia", "Europe/Oslo", "Europe/Paris", "Europe/Podgorica", "Europe/Prague", "Europe/Riga", "Europe/Rome", "Europe/Samara", "Europe/San_Marino", "Europe/Sarajevo", "Europe/Saratov", "Europe/Simferopol", "Europe/Skopje", "Europe/Sofia", "Europe/Stockholm", "Europe/Tallinn", "Europe/Tirane", "Europe/Tiraspol", "Europe/Ulyanovsk", "Europe/Uzhgorod", "Europe/Vaduz", "Europe/Vatican", "Europe/Vienna", "Europe/Vilnius", "Europe/Volgograd", "Europe/Warsaw", "Europe/Zagreb", "Europe/Zaporozhye", "Europe/Zurich", "GB", "GB-Eire", "GMT", "GMT0", "Greenwich", "Hongkong", "Iceland", "Indian/Antananarivo", "Indian/Chagos", "Indian/Christmas", "Indian/Cocos", "Indian/Comoro", "Indian/Kerguelen", "Indian/Mahe", "Indian/Maldives", "Indian/Mauritius", "Indian/Mayotte", "Indian/Reunion", "Iran", "Israel", "Jamaica", "Japan", "Kwajalein", "Libya", "MET", "MST7MDT", "Mexico/BajaNorte", "Mexico/BajaSur", "Mexico/General", "NZ", "NZ-CHAT", "Navajo", "PRC", "PST8PDT", "Pacific/Apia", "Pacific/Auckland", "Pacific/Bougainville", "Pacific/Chatham", "Pacific/Chuuk", "Pacific/Easter", "Pacific/Efate", "Pacific/Enderbury", "Pacific/Fakaofo", "Pacific/Fiji", "Pacific/Funafuti", "Pacific/Galapagos", "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", "Pacific/Johnston", "Pacific/Kanton", "Pacific/Kiritimati", "Pacific/Kosrae", "Pacific/Kwajalein", "Pacific/Majuro", "Pacific/Marquesas", "Pacific/Midway", "Pacific/Nauru", "Pacific/Niue", "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", "Pacific/Palau", "Pacific/Pitcairn", "Pacific/Pohnpei", "Pacific/Ponape", "Pacific/Port_Moresby", "Pacific/Rarotonga", "Pacific/Saipan", "Pacific/Samoa", "Pacific/Tahiti", "Pacific/Tarawa", "Pacific/Tongatapu", "Pacific/Truk", "Pacific/Wake", "Pacific/Wallis", "Pacific/Yap", "Poland", "Portugal", "ROK", "Singapore", "SystemV/AST4", "SystemV/AST4ADT", "SystemV/CST6", "SystemV/CST6CDT", "SystemV/EST5", "SystemV/EST5EDT", "SystemV/HST10", "SystemV/MST7", "SystemV/MST7MDT", "SystemV/PST8", "SystemV/PST8PDT", "SystemV/YST9", "SystemV/YST9YDT", "Turkey", "UCT", "US/Alaska", "US/Aleutian", "US/Arizona", "US/Central", "US/East-Indiana", "US/Eastern", "US/Hawaii", "US/Indiana-Starke", "US/Michigan", "US/Mountain", "US/Pacific", "US/Samoa", "UTC", "Universal", "W-SU", "WET", "Zulu" ] }, { "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.zone-offset" } ] @@ -6110,6 +6695,7 @@ "minimum" : 1 }, "metabase.lib.schema.info.context" : { + "description" : "Schema for `info.context`; used for informational purposes to record how a query was executed.", "type" : "string", "enum" : [ "action", "ad-hoc", "cache-refresh", "collection", "map-tiles", "pulse", "dashboard-subscription", "dashboard", "question", "csv-download", "xlsx-download", "json-download", "public-dashboard", "public-question", "public-csv-download", "public-xlsx-download", "public-json-download", "embedded-dashboard", "embedded-question", "embedded-csv-download", "embedded-xlsx-download", "embedded-json-download", "table-grid" ] }, @@ -8647,6 +9233,12 @@ "type" : "string", "enum" : [ "static-list", "card" ] }, + "metabase.queries.schema..card.result-metadata" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.metadata.lib-or-legacy-column" + } + }, "metabase.queries.schema.card" : { "description" : "Schema for an instance of a `:model/Card` (everything is optional to support updates).", "type" : "object", @@ -8664,10 +9256,7 @@ "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" }, "result_metadata" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.lib.schema.metadata.lib-or-legacy-column" - } + "$ref" : "#/components/schemas/metabase.queries.schema..card.result-metadata" }, "type" : { "$ref" : "#/components/schemas/metabase.lib.schema.metadata..card.type" @@ -8728,204 +9317,812 @@ "create-row" : { "$ref" : "#/components/schemas/metabase.lib.schema.actions.row" } - }, - "required" : [ "lib/type", "lib/metadata", "stages" ] - }, { - "$ref" : "#/components/schemas/metabase.lib.schema.util.unique-uuids" - }, { - "allOf" : [ ] - } ] - } ] - }, - "metabase.query-processor.schema..result-metadata.column" : { - "description" : "A single result metadata column as returned by the Query Processor.", - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.legacy-column-metadata" - }, - "metabase.query-processor.schema.export-format" : { - "description" : "Schema for valid export formats for downloading query results.", - "type" : "string", - "enum" : [ "csv", "api", "xlsx", "json" ] - }, - "metabase.sync.schedules.ExpandedSchedulesMap" : { - "description" : "value must be a valid map of schedule maps for a DB.", - "type" : "object", - "properties" : { - "cache_field_values" : { - "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap" + }, + "required" : [ "lib/type", "lib/metadata", "stages" ] + }, { + "$ref" : "#/components/schemas/metabase.lib.schema.util.unique-uuids" + }, { + "allOf" : [ ] + } ] + } ] + }, + "metabase.query-processor.schema..result-metadata.column" : { + "description" : "A single result metadata column as returned by the Query Processor.", + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.legacy-column-metadata" + }, + "metabase.query-processor.schema.export-format" : { + "description" : "Schema for valid export formats for downloading query results.", + "type" : "string", + "enum" : [ "csv", "api", "xlsx", "json" ] + }, + "metabase.sync.schedules.ExpandedSchedulesMap" : { + "description" : "value must be a valid map of schedule maps for a DB.", + "type" : "object", + "properties" : { + "cache_field_values" : { + "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap" + }, + "metadata_sync" : { + "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap" + } + } + }, + "metabase.tiles.api.legacy-ref" : { + "description" : "Form-encoded JSON-encoded legacy MBQL :field ref.", + "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" + }, + "metabase.tiles.api.parameters" : { + "description" : "Form-encoded JSON-encoded array of parameter maps.", + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "metabase.tiles.api.query" : { + "description" : "Form-encoded JSON-encoded MBQL query.", + "$ref" : "#/components/schemas/metabase.lib.schema.query" + }, + "metabase.timeline.api.timeline.Timeline" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "id" ] + }, + "metabase.timeline.api.timeline.include" : { + "type" : "string", + "enum" : [ "events" ] + }, + "metabase.users.api.user-group-membership" : { + "description" : "Group Membership info of a User.\n In which :is_group_manager is only included if `advanced-permissions` is enabled.", + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "is_group_manager" : { + "description" : "Only relevant if `advanced-permissions` is enabled. If it is, you should always include this key.", + "type" : "boolean" + } + }, + "required" : [ "id" ] + }, + "metabase.util.cron.CronHour" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 23 + }, + "metabase.util.cron.CronMinute" : { + "type" : "integer", + "minimum" : 0, + "maximum" : 59 + }, + "metabase.util.cron.CronScheduleString" : { + "description" : "value must be a valid Quartz cron schedule string.", + "type" : "string", + "minLength" : 1 + }, + "metabase.util.cron.ScheduleMap" : { + "description" : "value must be a valid schedule map. See schema in metabase.util.cron for details.", + "type" : "object", + "properties" : { + "schedule_day" : { + "type" : "string", + "enum" : [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ] + }, + "schedule_frame" : { + "type" : "string", + "enum" : [ "first", "mid", "last" ] + }, + "schedule_hour" : { + "$ref" : "#/components/schemas/metabase.util.cron.CronHour" + }, + "schedule_minute" : { + "$ref" : "#/components/schemas/metabase.util.cron.CronMinute" + }, + "schedule_type" : { + "type" : "string", + "enum" : [ "hourly", "daily", "weekly", "monthly" ] + } + }, + "required" : [ "schedule_type" ] + }, + "metabase.warehouse-schema.api.table.data-authority-write" : { + "description" : "Schema for writing a valid table data authority.", + "type" : "string", + "enum" : [ "computed", "authoritative", "unconfigured", "ingested" ] + }, + "metabase.warehouses.api.available-settings" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "properties" : { + "enabled" : { + "type" : "boolean" + }, + "reasons" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "key" : { + "type" : "string" + }, + "message" : { + "anyOf" : [ { + "type" : "string" + }, { } ] + }, + "type" : { + "type" : "string", + "enum" : [ "error", "warning" ] + } + }, + "required" : [ "key", "type", "message" ] + } + } + }, + "required" : [ "enabled" ] + } + }, + "metabase.xrays.api.automagic-dashboards.base-64-encoded-json" : { + "description" : "form-encoded base-64-encoded JSON" + }, + "metabase.xrays.api.automagic-dashboards.entity-id-or-query" : { + "description" : "One of these:\n\n * A non-empty string with an Entity ID (including `card__`-encoded Card IDs)\n\n * a form-encoded base-64-encoded JSON-encoded MBQL query\n\n * The name of a transform\n\n (Effectively since the names of transforms are unconstrained this parameter is allowed to be any form-encoded\n string.)", + "type" : "string", + "minLength" : 1 + }, + "metabot.reaction.redirect" : { + "type" : "object", + "properties" : { + "type" : { + "const" : "metabot.reaction/redirect" + }, + "url" : { + "type" : "string" + } + }, + "required" : [ "type", "url" ] + } + } + }, + "paths" : { + "/api/action/" : { + "get" : { + "summary" : "GET /api/action/", + "description" : "Returns actions that can be used for QueryActions. By default lists all viewable actions. Pass optional\n `?model-id=` to limit to actions on a particular model.", + "parameters" : [ { + "in" : "query", + "name" : "model-id", + "required" : false, + "schema" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + } + } ], + "responses" : { + "2XX" : { + "description" : "sequence of An Action as it should appear when we `SELECT` it from the app DB.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.actions.schema.action" + } + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + }, + "post" : { + "summary" : "POST /api/action/", + "description" : "Create a new action.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "An Action as it should appear when we `SELECT` it from the app DB.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.action" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema..action.for-insert" + } + } + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/public" : { + "get" : { + "summary" : "GET /api/action/public", + "description" : "Fetch a list of Actions with public UUIDs. These actions are publicly-accessible *if* public sharing is enabled.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "sequence of An Action as it should appear when we `SELECT` it from the app DB.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.actions.schema.action" + } + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{action-id}" : { + "get" : { + "summary" : "GET /api/action/{action-id}", + "description" : "Fetch an Action.", + "parameters" : [ { + "in" : "path", + "name" : "action-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "An Action as it should appear when we `SELECT` it from the app DB.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.action" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + }, + "delete" : { + "summary" : "DELETE /api/action/{action-id}", + "description" : "Delete an Action.", + "parameters" : [ { + "in" : "path", + "name" : "action-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{action-id}/execute" : { + "get" : { + "summary" : "GET /api/action/{action-id}/execute", + "description" : "Fetches the values for filling in execution parameters. Pass PK parameters and values to select.", + "parameters" : [ { + "in" : "path", + "name" : "action-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "parameters", + "required" : true, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{id}" : { + "put" : { + "summary" : "PUT /api/action/{id}", + "description" : "Update an Action.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema..action.for-update" + } + } + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{id}/execute" : { + "post" : { + "summary" : "POST /api/action/{id}/execute", + "description" : "Execute the Action.\n\n `parameters` should be the mapped dashboard parameters with values.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "parameters" : { + "type" : "object", + "additionalProperties" : { } + } + }, + "optional" : true + } + } + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/action/{id}/public_link" : { + "post" : { + "summary" : "POST /api/action/{id}/public_link", + "description" : "Generate publicly-accessible links for this Action. Returns UUID to be used in public links. (If this\n Action has already been shared, it will return the existing public link rather than creating a new one.) Public\n sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + }, + "delete" : { + "summary" : "DELETE /api/action/{id}/public_link", + "description" : "Delete the publicly-accessible link to this Dashboard.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.actions.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/action" ] + } + }, + "/api/activity/most_recently_viewed_dashboard" : { + "get" : { + "summary" : "GET /api/activity/most_recently_viewed_dashboard", + "description" : "Get the most recently viewed dashboard for the current user. Returns a 204 if the user has not viewed any dashboards\n in the last 24 hours.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/activity" ] + } + }, + "/api/activity/popular_items" : { + "get" : { + "summary" : "GET /api/activity/popular_items", + "description" : "Get the list of 5 popular things on the instance. Query takes 8 and limits to 5 so that if it finds anything\n archived, deleted, etc it can usually still get 5. ", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/activity" ] + } + }, + "/api/activity/recent_views" : { + "get" : { + "summary" : "GET /api/activity/recent_views", + "description" : "Get a list of 100 models (cards, models, tables, dashboards, and collections) that the current user has been viewing most\n recently. Return a maximum of 20 model of each, if they've looked at at least 20.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/activity" ] + } + }, + "/api/activity/recents" : { + "get" : { + "summary" : "GET /api/activity/recents", + "description" : "Get a list of recent items the current user has been viewing most recently under the `:recents` key.\n Allows for filtering by context: views or selections", + "parameters" : [ { + "in" : "query", + "name" : "context", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "selections", "views" ] + } + } + }, { + "in" : "query", + "name" : "include_metadata", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/activity" ] + }, + "post" : { + "summary" : "POST /api/activity/recents", + "description" : "Adds a model to the list of recently selected items.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "context" : { + "type" : "string", + "enum" : [ "selection" ] + }, + "model" : { + "type" : "string", + "enum" : [ "card", "dataset", "metric", "dashboard", "table", "collection", "document" ] + }, + "model_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "model", "model_id", "context" ] + } + } + } + }, + "tags" : [ "/api/activity" ] + } + }, + "/api/alert/" : { + "get" : { + "summary" : "GET /api/alert/", + "description" : "Fetch alerts which the current user has created or will receive, or all alerts if the user is an admin.\n The optional `user_id` will return alerts created by the corresponding user, but is ignored for non-admin users.", + "parameters" : [ { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "user_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 }, - "metadata_sync" : { - "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap" + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - } - }, - "metabase.tiles.api.legacy-ref" : { - "description" : "Form-encoded JSON-encoded legacy MBQL :field ref.", - "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" - }, - "metabase.tiles.api.parameters" : { - "description" : "Form-encoded JSON-encoded array of parameter maps.", - "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" - }, - "metabase.tiles.api.query" : { - "description" : "Form-encoded JSON-encoded MBQL query.", - "$ref" : "#/components/schemas/metabase.lib.schema.query" - }, - "metabase.timeline.api.timeline.Timeline" : { - "type" : "object", - "properties" : { - "id" : { + }, + "tags" : [ "/api/alert" ] + } + }, + "/api/alert/{id}" : { + "get" : { + "summary" : "GET /api/alert/{id}", + "description" : "Fetch an alert by ID", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { "type" : "integer", "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, - "required" : [ "id" ] - }, - "metabase.timeline.api.timeline.include" : { - "type" : "string", - "enum" : [ "events" ] - }, - "metabase.users.api.user-group-membership" : { - "description" : "Group Membership info of a User.\n In which :is_group_manager is only included if `advanced-permissions` is enabled.", - "type" : "object", - "properties" : { - "id" : { - "description" : "value must be an integer greater than zero.", + "tags" : [ "/api/alert" ] + } + }, + "/api/alert/{id}/subscription" : { + "delete" : { + "summary" : "DELETE /api/alert/{id}/subscription", + "description" : "For users to unsubscribe themselves from the given alert.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { "type" : "integer", "minimum" : 1 }, - "is_group_manager" : { - "description" : "Only relevant if `advanced-permissions` is enabled. If it is, you should always include this key.", - "type" : "boolean" + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, - "required" : [ "id" ] - }, - "metabase.util.cron.CronHour" : { - "type" : "integer", - "minimum" : 0, - "maximum" : 23 - }, - "metabase.util.cron.CronMinute" : { - "type" : "integer", - "minimum" : 0, - "maximum" : 59 - }, - "metabase.util.cron.CronScheduleString" : { - "description" : "value must be a valid Quartz cron schedule string.", - "type" : "string", - "minLength" : 1 - }, - "metabase.util.cron.ScheduleMap" : { - "description" : "value must be a valid schedule map. See schema in metabase.util.cron for details.", - "type" : "object", - "properties" : { - "schedule_day" : { - "type" : "string", - "enum" : [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ] + "tags" : [ "/api/alert" ] + } + }, + "/api/analytics/anonymous-stats" : { + "get" : { + "summary" : "GET /api/analytics/anonymous-stats", + "description" : "Anonymous usage stats. Endpoint for testing, and eventually exposing this to instance admins to let them see\n what is being phoned home.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "schedule_frame" : { - "type" : "string", - "enum" : [ "first", "mid", "last" ] + "4XX" : { + "description" : "Client error response" }, - "schedule_hour" : { - "$ref" : "#/components/schemas/metabase.util.cron.CronHour" + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/analytics" ] + } + }, + "/api/api-key/" : { + "post" : { + "summary" : "POST /api/api-key/", + "description" : "Create a new API key (and an associated `User`) with the provided name and group ID.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "schedule_minute" : { - "$ref" : "#/components/schemas/metabase.util.cron.CronMinute" + "4XX" : { + "description" : "Client error response" }, - "schedule_type" : { - "type" : "string", - "enum" : [ "hourly", "daily", "weekly", "monthly" ] + "5XX" : { + "description" : "Server error response" } }, - "required" : [ "schedule_type" ] - }, - "metabase.warehouse-schema.api.table.data-authority-write" : { - "description" : "Schema for writing a valid table data authority.", - "type" : "string", - "enum" : [ "computed", "authoritative", "unconfigured", "ingested" ] - }, - "metabase.warehouses.api.available-settings" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "properties" : { - "enabled" : { - "type" : "boolean" - }, - "reasons" : { - "type" : "array", - "items" : { + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { "type" : "object", "properties" : { - "key" : { - "type" : "string" - }, - "message" : { - "anyOf" : [ { - "type" : "string" - }, { } ] + "group_id" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.id" }, - "type" : { + "name" : { "type" : "string", - "enum" : [ "error", "warning" ] + "minLength" : 1 } }, - "required" : [ "key", "type", "message" ] + "required" : [ "group_id", "name" ] } } - }, - "required" : [ "enabled" ] - } - }, - "metabase.xrays.api.automagic-dashboards.base-64-encoded-json" : { - "description" : "form-encoded base-64-encoded JSON" - }, - "metabase.xrays.api.automagic-dashboards.entity-id-or-query" : { - "description" : "One of these:\n\n * A non-empty string with an Entity ID (including `card__`-encoded Card IDs)\n\n * a form-encoded base-64-encoded JSON-encoded MBQL query\n\n * The name of a transform\n\n (Effectively since the names of transforms are unconstrained this parameter is allowed to be any form-encoded\n string.)", - "type" : "string", - "minLength" : 1 + } + }, + "tags" : [ "/api/api-key" ] }, - "metabot.reaction.redirect" : { - "type" : "object", - "properties" : { - "type" : { - "const" : "metabot.reaction/redirect" + "get" : { + "summary" : "GET /api/api-key/", + "description" : "Get a list of API keys with the default scope. Non-paginated.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "url" : { - "type" : "string" + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, - "required" : [ "type", "url" ] + "tags" : [ "/api/api-key" ] } - } - }, - "paths" : { - "/api/action/" : { + }, + "/api/api-key/count" : { "get" : { - "summary" : "GET /api/action/", - "description" : "Returns actions that can be used for QueryActions. By default lists all viewable actions. Pass optional\n `?model-id=` to limit to actions on a particular model.", - "parameters" : [ { - "in" : "query", - "name" : "model-id", - "required" : false, - "schema" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.card" - } - } ], + "summary" : "GET /api/api-key/count", + "description" : "Get the count of API keys in the DB with the default scope.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "sequence of An Action as it should appear when we `SELECT` it from the app DB.", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.actions.schema.action" - } - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -8934,22 +10131,26 @@ "description" : "Server error response" } }, - "tags" : [ "/api/action" ] - }, - "post" : { - "summary" : "POST /api/action/", - "description" : "Create a new action.", - "parameters" : [ ], + "tags" : [ "/api/api-key" ] + } + }, + "/api/api-key/{id}" : { + "put" : { + "summary" : "PUT /api/api-key/{id}", + "description" : "Update an API key by changing its group and/or its name", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { - "description" : "An Action as it should appear when we `SELECT` it from the app DB.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema.action" - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -8962,29 +10163,82 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema..action.for-insert" + "type" : "object", + "properties" : { + "group_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.name" + } + } } } } }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/api-key" ] + }, + "delete" : { + "summary" : "DELETE /api/api-key/{id}", + "description" : "Delete an ApiKey", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.id" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/api-key" ] } }, - "/api/action/public" : { - "get" : { - "summary" : "GET /api/action/public", - "description" : "Fetch a list of Actions with public UUIDs. These actions are publicly-accessible *if* public sharing is enabled.", - "parameters" : [ ], + "/api/api-key/{id}/regenerate" : { + "put" : { + "summary" : "PUT /api/api-key/{id}/regenerate", + "description" : "Regenerate an API Key", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.id" + } + } ], "responses" : { "2XX" : { - "description" : "sequence of An Action as it should appear when we `SELECT` it from the app DB.", + "description" : "map where {:id -> , :unmasked_key -> '.>, :masked_key -> , :prefix -> }", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.actions.schema.action" - } + "type" : "object", + "properties" : { + "id" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.id" + }, + "masked_key" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema..key.masked" + }, + "prefix" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema.prefix" + }, + "unmasked_key" : { + "$ref" : "#/components/schemas/metabase.api-keys.schema..key.raw" + } + }, + "required" : [ "id", "unmasked_key", "masked_key", "prefix" ] } } } @@ -8996,16 +10250,16 @@ "description" : "Server error response" } }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/api-key" ] } }, - "/api/action/{action-id}" : { + "/api/automagic-dashboards/database/{id}/candidates" : { "get" : { - "summary" : "GET /api/action/{action-id}", - "description" : "Fetch an Action.", + "summary" : "GET /api/automagic-dashboards/database/{id}/candidates", + "description" : "Return a list of candidates for automagic dashboards ordered by interestingness.", "parameters" : [ { "in" : "path", - "name" : "action-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -9015,14 +10269,7 @@ } ], "responses" : { "2XX" : { - "description" : "An Action as it should appear when we `SELECT` it from the app DB.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema.action" - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -9031,20 +10278,73 @@ "description" : "Server error response" } }, - "tags" : [ "/api/action" ] - }, - "delete" : { - "summary" : "DELETE /api/action/{action-id}", - "description" : "Delete an Action.", + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}", + "description" : "Return an automagic dashboard for an entity detail specified by `entity`\n with id `id` and a primary key of `indexed-value`.", "parameters" : [ { "in" : "path", - "name" : "action-id", + "name" : "model-index-id", + "required" : true, + "schema" : { + "type" : "integer" + } + }, { + "in" : "path", + "name" : "pk-id", + "required" : true, + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/automagic-dashboards" ] + } + }, + "/api/automagic-dashboards/{entity}/{entity-id-or-query}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}", + "description" : "Return an automagic dashboard for entity `entity` with id `id`.", + "parameters" : [ { + "in" : "path", + "name" : "entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "const" : "all" + }, { + "type" : "integer", + "minimum" : 0 + } ] + } } ], "responses" : { "2XX" : { @@ -9057,30 +10357,49 @@ "description" : "Server error response" } }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/action/{action-id}/execute" : { + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}" : { "get" : { - "summary" : "GET /api/action/{action-id}/execute", - "description" : "Fetches the values for filling in execution parameters. Pass PK parameters and values to select.", + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}", + "description" : "Return an automagic dashboard analyzing cell in automagic dashboard for entity `entity` defined by query\n `cell-query`.", "parameters" : [ { "in" : "path", - "name" : "action-id", + "name" : "entity", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } }, { - "in" : "query", - "name" : "parameters", + "in" : "path", + "name" : "entity-id-or-query", "required" : true, "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "path", + "name" : "cell-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] }, - "description" : "value must be a valid JSON string." + "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -9093,20 +10412,65 @@ "description" : "Server error response" } }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/action/{id}" : { - "put" : { - "summary" : "PUT /api/action/{id}", - "description" : "Update an Action.", + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}", + "description" : "Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`\n with id `id` defined by query `cell-query`; compared with entity `comparison-entity` with id\n `comparison-entity-id-or-query.`.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "entity", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema.id" + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "path", + "name" : "cell-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + } + }, { + "in" : "path", + "name" : "comparison-entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "segment", "table" ] + }, + "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + }, { + "in" : "path", + "name" : "comparison-entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -9119,29 +10483,60 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema..action.for-update" - } - } - } - }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/action/{id}/execute" : { - "post" : { - "summary" : "POST /api/action/{id}/execute", - "description" : "Execute the Action.\n\n `parameters` should be the mapped dashboard parameters with values.", + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}", + "description" : "Return an automagic dashboard analyzing cell in question with id `id` defined by query `cell-query` using\n dashboard-template `dashboard-template`.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "entity", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema.id" + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "path", + "name" : "prefix", + "required" : true, + "schema" : { } + }, { + "in" : "path", + "name" : "dashboard-template", + "required" : true, + "schema" : { }, + "description" : "invalid value for dashboard template name" + }, { + "in" : "path", + "name" : "cell-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -9154,60 +10549,76 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "parameters" : { - "type" : "object", - "additionalProperties" : { } - } - }, - "optional" : true - } - } - } - }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/action/{id}/public_link" : { - "post" : { - "summary" : "POST /api/action/{id}/public_link", - "description" : "Generate publicly-accessible links for this Action. Returns UUID to be used in public links. (If this\n Action has already been shared, it will return the existing public link rather than creating a new one.) Public\n sharing must be enabled.", + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { + "get" : { + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}", + "description" : "Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`\n with id `id` defined by query `cell-query` using dashboard-template `dashboard-template`; compared with entity\n `comparison-entity` with id `comparison-entity-id-or-query.`.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "entity", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema.id" + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } - }, - "tags" : [ "/api/action" ] - }, - "delete" : { - "summary" : "DELETE /api/action/{id}/public_link", - "description" : "Delete the publicly-accessible link to this Dashboard.", - "parameters" : [ { + }, { + "in" : "path", + "name" : "prefix", + "required" : true, + "schema" : { } + }, { + "in" : "path", + "name" : "dashboard-template", + "required" : true, + "schema" : { }, + "description" : "invalid value for dashboard template name" + }, { + "in" : "path", + "name" : "cell-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + } + }, { + "in" : "path", + "name" : "comparison-entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "segment", "table" ] + }, + "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + }, { "in" : "path", - "name" : "id", + "name" : "comparison-entity-id-or-query", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.actions.schema.id" + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -9220,52 +10631,59 @@ "description" : "Server error response" } }, - "tags" : [ "/api/action" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/activity/most_recently_viewed_dashboard" : { + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { "get" : { - "summary" : "GET /api/activity/most_recently_viewed_dashboard", - "description" : "Get the most recently viewed dashboard for the current user. Returns a 204 if the user has not viewed any dashboards\n in the last 24 hours.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}", + "description" : "Return an automagic comparison dashboard for entity `entity` with id `id` compared with entity `comparison-entity`\n with id `comparison-entity-id-or-query.`", + "parameters" : [ { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } - }, - "tags" : [ "/api/activity" ] - } - }, - "/api/activity/popular_items" : { - "get" : { - "summary" : "GET /api/activity/popular_items", - "description" : "Get the list of 5 popular things on the instance. Query takes 8 and limits to 5 so that if it finds anything\n archived, deleted, etc it can usually still get 5. ", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" + }, { + "in" : "path", + "name" : "entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "comparison-entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "segment", "table" ] }, - "5XX" : { - "description" : "Server error response" + "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + }, { + "in" : "path", + "name" : "comparison-entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } - }, - "tags" : [ "/api/activity" ] - } - }, - "/api/activity/recent_views" : { - "get" : { - "summary" : "GET /api/activity/recent_views", - "description" : "Get a list of 100 models (cards, models, tables, dashboards, and collections) that the current user has been viewing most\n recently. Return a maximum of 20 model of each, if they've looked at at least 20.", - "parameters" : [ ], + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] + }, + "description" : "invalid show value" + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -9277,31 +10695,27 @@ "description" : "Server error response" } }, - "tags" : [ "/api/activity" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/activity/recents" : { + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata" : { "get" : { - "summary" : "GET /api/activity/recents", - "description" : "Get a list of recent items the current user has been viewing most recently under the `:recents` key.\n Allows for filtering by context: views or selections", + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata", + "description" : "Return all metadata for an automagic dashboard for entity `entity` with id `id`.", "parameters" : [ { - "in" : "query", - "name" : "context", + "in" : "path", + "name" : "entity", "required" : true, "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "selections", "views" ] - } + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] } }, { - "in" : "query", - "name" : "include_metadata", - "required" : false, + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } } ], "responses" : { @@ -9315,72 +10729,53 @@ "description" : "Server error response" } }, - "tags" : [ "/api/activity" ] - }, - "post" : { - "summary" : "POST /api/activity/recents", - "description" : "Adds a model to the list of recently selected items.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "context" : { - "type" : "string", - "enum" : [ "selection" ] - }, - "model" : { - "type" : "string", - "enum" : [ "card", "dataset", "metric", "dashboard", "table", "collection", "document" ] - }, - "model_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "model", "model_id", "context" ] - } - } - } - }, - "tags" : [ "/api/activity" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/alert/" : { + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}" : { "get" : { - "summary" : "GET /api/alert/", - "description" : "Fetch alerts which the current user has created or will receive, or all alerts if the user is an admin.\n The optional `user_id` will return alerts created by the corresponding user, but is ignored for non-admin users.", + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}", + "description" : "Return an automagic dashboard for entity `entity` with id `id` using dashboard-template `dashboard-template`.", "parameters" : [ { - "in" : "query", - "name" : "archived", - "required" : false, + "in" : "path", + "name" : "entity", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" } + }, { + "in" : "path", + "name" : "prefix", + "required" : true, + "schema" : { } + }, { + "in" : "path", + "name" : "dashboard-template", + "required" : true, + "schema" : { }, + "description" : "invalid value for dashboard template name" }, { "in" : "query", - "name" : "user_id", + "name" : "show", "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] }, - "description" : "value must be an integer greater than zero." + "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -9393,50 +10788,69 @@ "description" : "Server error response" } }, - "tags" : [ "/api/alert" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/alert/{id}" : { + "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { "get" : { - "summary" : "GET /api/alert/{id}", - "description" : "Fetch an alert by ID", + "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}", + "description" : "Return an automagic comparison dashboard for entity `entity` with id `id` using dashboard-template\n `dashboard-template`; compared with entity `comparison-entity` with id `comparison-entity-id-or-query.`.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "entity", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + } + }, { + "in" : "path", + "name" : "entity-id-or-query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "path", + "name" : "prefix", + "required" : true, + "schema" : { } + }, { + "in" : "path", + "name" : "dashboard-template", + "required" : true, + "schema" : { }, + "description" : "invalid value for dashboard template name" + }, { + "in" : "path", + "name" : "comparison-entity", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" + "type" : "string", + "enum" : [ "adhoc", "segment", "table" ] }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/alert" ] - } - }, - "/api/alert/{id}/subscription" : { - "delete" : { - "summary" : "DELETE /api/alert/{id}/subscription", - "description" : "For users to unsubscribe themselves from the given alert.", - "parameters" : [ { + "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + }, { "in" : "path", - "name" : "id", + "name" : "comparison-entity-id-or-query", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 + "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + } + }, { + "in" : "query", + "name" : "show", + "required" : false, + "schema" : { + "anyOf" : [ { + "type" : "string", + "enum" : [ "all" ] + }, { + "type" : "integer", + "minimum" : 0 + } ] }, - "description" : "value must be an integer greater than zero." + "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -9449,13 +10863,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/alert" ] + "tags" : [ "/api/automagic-dashboards" ] } }, - "/api/analytics/anonymous-stats" : { + "/api/bookmark/" : { "get" : { - "summary" : "GET /api/analytics/anonymous-stats", - "description" : "Anonymous usage stats. Endpoint for testing, and eventually exposing this to instance admins to let them see\n what is being phoned home.", + "summary" : "GET /api/bookmark/", + "description" : "Fetch all bookmarks for the user", "parameters" : [ ], "responses" : { "2XX" : { @@ -9468,13 +10882,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/analytics" ] + "tags" : [ "/api/bookmark" ] } }, - "/api/api-key/" : { - "post" : { - "summary" : "POST /api/api-key/", - "description" : "Create a new API key (and an associated `User`) with the provided name and group ID.", + "/api/bookmark/ordering" : { + "put" : { + "summary" : "PUT /api/bookmark/ordering", + "description" : "Sets the order of bookmarks for user.", "parameters" : [ ], "responses" : { "2XX" : { @@ -9493,63 +10907,46 @@ "schema" : { "type" : "object", "properties" : { - "group_id" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema.id" - }, - "name" : { - "type" : "string", - "minLength" : 1 + "orderings" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "item_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "type" : { + "type" : "string", + "enum" : [ "card", "dashboard", "collection", "document" ] + } + }, + "required" : [ "type", "item_id" ] + } } }, - "required" : [ "group_id", "name" ] + "required" : [ "orderings" ] } } } }, - "tags" : [ "/api/api-key" ] - }, - "get" : { - "summary" : "GET /api/api-key/", - "description" : "Get a list of API keys with the default scope. Non-paginated.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/api-key" ] - } - }, - "/api/api-key/count" : { - "get" : { - "summary" : "GET /api/api-key/count", - "description" : "Get the count of API keys in the DB with the default scope.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/api-key" ] + "tags" : [ "/api/bookmark" ] } }, - "/api/api-key/{id}" : { - "put" : { - "summary" : "PUT /api/api-key/{id}", - "description" : "Update an API key by changing its group and/or its name", + "/api/bookmark/{model}/{id}" : { + "post" : { + "summary" : "POST /api/bookmark/{model}/{id}", + "description" : "Create a new bookmark for user.", "parameters" : [ { + "in" : "path", + "name" : "model", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "card", "dashboard", "collection", "document" ] + } + }, { "in" : "path", "name" : "id", "required" : true, @@ -9570,114 +10967,48 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "group_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "name" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema.name" - } - } - } - } - } - }, - "tags" : [ "/api/api-key" ] + "tags" : [ "/api/bookmark" ] }, "delete" : { - "summary" : "DELETE /api/api-key/{id}", - "description" : "Delete an ApiKey", + "summary" : "DELETE /api/bookmark/{model}/{id}", + "description" : "Delete a bookmark. Will delete a bookmark assigned to the user making the request by model and id.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "model", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema.id" - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + "type" : "string", + "enum" : [ "card", "dashboard", "collection", "document" ] } - }, - "tags" : [ "/api/api-key" ] - } - }, - "/api/api-key/{id}/regenerate" : { - "put" : { - "summary" : "PUT /api/api-key/{id}/regenerate", - "description" : "Regenerate an API Key", - "parameters" : [ { + }, { "in" : "path", "name" : "id", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema.id" - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { - "description" : "map where {:id -> , :unmasked_key -> '.>, :masked_key -> , :prefix -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "id" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema.id" - }, - "masked_key" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema..key.masked" - }, - "prefix" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema.prefix" - }, - "unmasked_key" : { - "$ref" : "#/components/schemas/metabase.api-keys.schema..key.raw" - } - }, - "required" : [ "id", "unmasked_key", "masked_key", "prefix" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/api-key" ] - } - }, - "/api/automagic-dashboards/database/{id}/candidates" : { - "get" : { - "summary" : "GET /api/automagic-dashboards/database/{id}/candidates", - "description" : "Return a list of candidates for automagic dashboards ordered by interestingness.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/bookmark" ] + } + }, + "/api/bug-reporting/connection-pool-details" : { + "get" : { + "summary" : "GET /api/bug-reporting/connection-pool-details", + "description" : "Returns database connection pool info for the current Metabase instance.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -9689,28 +11020,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/bug-reporting" ] } }, - "/api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}" : { + "/api/bug-reporting/details" : { "get" : { - "summary" : "GET /api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}", - "description" : "Return an automagic dashboard for an entity detail specified by `entity`\n with id `id` and a primary key of `indexed-value`.", - "parameters" : [ { - "in" : "path", - "name" : "model-index-id", - "required" : true, - "schema" : { - "type" : "integer" - } - }, { - "in" : "path", - "name" : "pk-id", - "required" : true, - "schema" : { - "type" : "integer" - } - } ], + "summary" : "GET /api/bug-reporting/details", + "description" : "Returns version and system information relevant to filing a bug report against Metabase.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -9722,40 +11039,44 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/bug-reporting" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}" : { + "/api/cache/" : { "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}", - "description" : "Return an automagic dashboard for entity `entity` with id `id`.", + "summary" : "GET /api/cache/", + "description" : "Return cache configuration.", "parameters" : [ { - "in" : "path", - "name" : "entity", + "in" : "query", + "name" : "model", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } + "default" : [ "root" ], + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "root", "database", "dashboard", "question" ] + } + }, + "description" : "Type of model" }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, + "in" : "query", + "name" : "collection", + "required" : false, "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "Collection id to filter results. Returns everything if not supplied." }, { "in" : "query", - "name" : "show", + "name" : "id", "required" : false, "schema" : { - "anyOf" : [ { - "const" : "all" - }, { - "type" : "integer", - "minimum" : 0 - } ] - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "Model id to get configuration for." } ], "responses" : { "2XX" : { @@ -9768,50 +11089,53 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] - } - }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}" : { - "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}", - "description" : "Return an automagic dashboard analyzing cell in automagic dashboard for entity `entity` defined by query\n `cell-query`.", - "parameters" : [ { - "in" : "path", - "name" : "entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } - }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + "tags" : [ "/api/cache" ] + }, + "put" : { + "summary" : "PUT /api/cache/", + "description" : "Store cache configuration.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - }, { - "in" : "path", - "name" : "cell-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "model" : { + "type" : "string", + "enum" : [ "root", "database", "dashboard", "question" ] + }, + "model_id" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "strategy" : { + "$ref" : "#/components/schemas/metabase.cache.api.cache-strategy" + } + }, + "required" : [ "model", "model_id", "strategy" ] + } + } } - }, { - "in" : "query", - "name" : "show", - "required" : false, - "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { - "type" : "integer", - "minimum" : 0 - } ] - }, - "description" : "invalid show value" - } ], + }, + "tags" : [ "/api/cache" ] + }, + "delete" : { + "summary" : "DELETE /api/cache/", + "description" : "Delete cache configurations.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -9823,65 +11147,84 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "model" : { + "type" : "string", + "enum" : [ "root", "database", "dashboard", "question" ] + }, + "model_id" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } + } + }, + "required" : [ "model", "model_id" ] + } + } + } + }, + "tags" : [ "/api/cache" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { - "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}", - "description" : "Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`\n with id `id` defined by query `cell-query`; compared with entity `comparison-entity` with id\n `comparison-entity-id-or-query.`.", + "/api/cache/invalidate" : { + "post" : { + "summary" : "POST /api/cache/invalidate", + "description" : "Invalidate cache entries.\n\n Use it like `/api/cache/invalidate?database=1&dashboard=15` (any number of database/dashboard/question can be\n supplied).\n\n `&include=overrides` controls whenever you want to invalidate cache for a specific cache configuration without\n touching all nested configurations, or you want your invalidation to trickle down to every card.", "parameters" : [ { - "in" : "path", - "name" : "entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } - }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } - }, { - "in" : "path", - "name" : "cell-query", - "required" : true, + "in" : "query", + "name" : "include", + "required" : false, "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" - } + "const" : "overrides" + }, + "description" : "All cache configuration overrides should invalidate cache too" }, { - "in" : "path", - "name" : "comparison-entity", - "required" : true, + "in" : "query", + "name" : "database", + "required" : false, "schema" : { - "type" : "string", - "enum" : [ "adhoc", "segment", "table" ] + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } }, - "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + "description" : "A list of database ids" }, { - "in" : "path", - "name" : "comparison-entity-id-or-query", - "required" : true, + "in" : "query", + "name" : "dashboard", + "required" : false, "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + } + }, + "description" : "A list of dashboard ids" }, { "in" : "query", - "name" : "show", + "name" : "question", "required" : false, "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { + "type" : "array", + "items" : { + "description" : "value must be an integer greater or equal to than zero.", "type" : "integer", "minimum" : 0 - } ] + } }, - "description" : "invalid show value" + "description" : "A list of question ids" } ], "responses" : { "2XX" : { @@ -9894,60 +11237,31 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/cache" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}" : { + "/api/card/" : { "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}", - "description" : "Return an automagic dashboard analyzing cell in question with id `id` defined by query `cell-query` using\n dashboard-template `dashboard-template`.", + "summary" : "GET /api/card/", + "description" : "Get all the Cards. Option filter param `f` can be used to change the set of Cards that are returned; default is\n `all`, but other options include `mine`, `bookmarked`, `database`, `table`, `using_model`, `using_segment`, and\n `archived`. See corresponding implementation functions above for the specific behavior of each filter\n option. :card_index:", "parameters" : [ { - "in" : "path", - "name" : "entity", + "in" : "query", + "name" : "f", "required" : true, "schema" : { + "default" : "all", "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } - }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } - }, { - "in" : "path", - "name" : "prefix", - "required" : true, - "schema" : { } - }, { - "in" : "path", - "name" : "dashboard-template", - "required" : true, - "schema" : { }, - "description" : "invalid value for dashboard template name" - }, { - "in" : "path", - "name" : "cell-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + "enum" : [ "archived", "table", "using_model", "bookmarked", "using_segment", "all", "mine", "database" ] } }, { "in" : "query", - "name" : "show", + "name" : "model_id", "required" : false, "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { - "type" : "integer", - "minimum" : 0 - } ] + "type" : "integer", + "minimum" : 1 }, - "description" : "invalid show value" + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -9960,76 +11274,177 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/card" ] + }, + "post" : { + "summary" : "POST /api/card/", + "description" : "Create a new `Card`. Card `type` can be `question`, `metric`, or `model`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "dashboard_tab_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "entity_id" : { + "type" : "string", + "minLength" : 1 + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "result_metadata" : { + "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "type" : { + "$ref" : "#/components/schemas/metabase.queries.schema.card-type" + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "description" : { + "type" : "string", + "minLength" : 1 + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "name", "dataset_query", "display", "visualization_settings" ] + } + } + } + }, + "tags" : [ "/api/card" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { - "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}", - "description" : "Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`\n with id `id` defined by query `cell-query` using dashboard-template `dashboard-template`; compared with entity\n `comparison-entity` with id `comparison-entity-id-or-query.`.", - "parameters" : [ { - "in" : "path", - "name" : "entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } - }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + "/api/card/collections" : { + "post" : { + "summary" : "POST /api/card/collections", + "description" : "Bulk update endpoint for Card Collections. Move a set of `Cards` with `card_ids` into a `Collection` with\n `collection_id`, or remove them from any Collections by passing a `null` `collection_id`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - }, { - "in" : "path", - "name" : "prefix", - "required" : true, - "schema" : { } - }, { - "in" : "path", - "name" : "dashboard-template", - "required" : true, - "schema" : { }, - "description" : "invalid value for dashboard template name" - }, { - "in" : "path", - "name" : "cell-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json" + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "card_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "card_ids" ] + } + } } - }, { - "in" : "path", - "name" : "comparison-entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "segment", "table" ] + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/embeddable" : { + "get" : { + "summary" : "GET /api/card/embeddable", + "description" : "Fetch a list of Cards where `enable_embedding` is `true`. The cards can be embedded using the embedding endpoints\n and a signed JWT.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" - }, { + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/pivot/{card-id}/query" : { + "post" : { + "summary" : "POST /api/card/pivot/{card-id}/query", + "description" : "Run the query associated with a Card.", + "parameters" : [ { "in" : "path", - "name" : "comparison-entity-id-or-query", + "name" : "card-id", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } - }, { - "in" : "query", - "name" : "show", - "required" : false, - "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { - "type" : "integer", - "minimum" : 0 - } ] + "type" : "integer", + "minimum" : 1 }, - "description" : "invalid show value" + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -10042,58 +11457,70 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "ignore_cache" : { + "type" : "boolean" + } + } + } + } + } + }, + "tags" : [ "/api/card" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { + "/api/card/public" : { "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}", - "description" : "Return an automagic comparison dashboard for entity `entity` with id `id` compared with entity `comparison-entity`\n with id `comparison-entity-id-or-query.`", + "summary" : "GET /api/card/public", + "description" : "Fetch a list of Cards with public UUIDs. These cards are publicly-accessible *if* public sharing is enabled.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + } + }, + "/api/card/{card-id}/params/{param-key}/search/{query}" : { + "get" : { + "summary" : "GET /api/card/{card-id}/params/{param-key}/search/{query}", + "description" : "Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`.\n\n ;; fetch values for Card 1 parameter 'abc' that contain 'Orange';\n GET /api/card/1/params/abc/search/Orange\n\n Currently limited to first 1000 results.", "parameters" : [ { "in" : "path", - "name" : "entity-id-or-query", + "name" : "card-id", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." }, { "in" : "path", - "name" : "entity", + "name" : "param-key", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" } }, { "in" : "path", - "name" : "comparison-entity", + "name" : "query", "required" : true, "schema" : { "type" : "string", - "enum" : [ "adhoc", "segment", "table" ] - }, - "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" - }, { - "in" : "path", - "name" : "comparison-entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + "minLength" : 1 } - }, { - "in" : "query", - "name" : "show", - "required" : false, - "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { - "type" : "integer", - "minimum" : 0 - } ] - }, - "description" : "invalid show value" } ], "responses" : { "2XX" : { @@ -10106,27 +11533,28 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/card" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata" : { + "/api/card/{card-id}/params/{param-key}/values" : { "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata", - "description" : "Return all metadata for an automagic dashboard for entity `entity` with id `id`.", + "summary" : "GET /api/card/{card-id}/params/{param-key}/values", + "description" : "Fetch possible values of the parameter whose ID is `:param-key`.\n\n ;; fetch values for Card 1 parameter 'abc' that are possible\n GET /api/card/1/params/abc/values", "parameters" : [ { "in" : "path", - "name" : "entity", + "name" : "card-id", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." }, { "in" : "path", - "name" : "entity-id-or-query", + "name" : "param-key", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" } } ], "responses" : { @@ -10140,53 +11568,22 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/card" ] } }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}" : { - "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}", - "description" : "Return an automagic dashboard for entity `entity` with id `id` using dashboard-template `dashboard-template`.", + "/api/card/{card-id}/public_link" : { + "post" : { + "summary" : "POST /api/card/{card-id}/public_link", + "description" : "Generate publicly-accessible links for this Card. Returns UUID to be used in public links. (If this Card has\n already been shared, it will return the existing public link rather than creating a new one.) Public sharing must\n be enabled.", "parameters" : [ { "in" : "path", - "name" : "entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } - }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } - }, { - "in" : "path", - "name" : "prefix", - "required" : true, - "schema" : { } - }, { - "in" : "path", - "name" : "dashboard-template", + "name" : "card-id", "required" : true, - "schema" : { }, - "description" : "invalid value for dashboard template name" - }, { - "in" : "query", - "name" : "show", - "required" : false, "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { - "type" : "integer", - "minimum" : 0 - } ] + "type" : "integer", + "minimum" : 1 }, - "description" : "invalid show value" + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -10199,69 +11596,20 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] - } - }, - "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : { - "get" : { - "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}", - "description" : "Return an automagic comparison dashboard for entity `entity` with id `id` using dashboard-template\n `dashboard-template`; compared with entity `comparison-entity` with id `comparison-entity-id-or-query.`.", - "parameters" : [ { - "in" : "path", - "name" : "entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ] - } - }, { - "in" : "path", - "name" : "entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } - }, { - "in" : "path", - "name" : "prefix", - "required" : true, - "schema" : { } - }, { - "in" : "path", - "name" : "dashboard-template", - "required" : true, - "schema" : { }, - "description" : "invalid value for dashboard template name" - }, { - "in" : "path", - "name" : "comparison-entity", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "adhoc", "segment", "table" ] - }, - "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" - }, { - "in" : "path", - "name" : "comparison-entity-id-or-query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query" - } - }, { - "in" : "query", - "name" : "show", - "required" : false, - "schema" : { - "anyOf" : [ { - "type" : "string", - "enum" : [ "all" ] - }, { - "type" : "integer", - "minimum" : 0 - } ] + "tags" : [ "/api/card" ] + }, + "delete" : { + "summary" : "DELETE /api/card/{card-id}/public_link", + "description" : "Delete the publicly-accessible link to this Card.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 }, - "description" : "invalid show value" + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -10274,14 +11622,29 @@ "description" : "Server error response" } }, - "tags" : [ "/api/automagic-dashboards" ] + "tags" : [ "/api/card" ] } }, - "/api/bookmark/" : { - "get" : { - "summary" : "GET /api/bookmark/", - "description" : "Fetch all bookmarks for the user", - "parameters" : [ ], + "/api/card/{card-id}/query" : { + "post" : { + "summary" : "POST /api/card/{card-id}/query", + "description" : "Run the query associated with a Card.", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -10293,14 +11656,54 @@ "description" : "Server error response" } }, - "tags" : [ "/api/bookmark" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "collection_preview" : { + "type" : "boolean" + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "ignore_cache" : { + "default" : false, + "type" : "boolean" + } + }, + "required" : [ "ignore_cache" ] + } + } + } + }, + "tags" : [ "/api/card" ] } }, - "/api/bookmark/ordering" : { - "put" : { - "summary" : "PUT /api/bookmark/ordering", - "description" : "Sets the order of bookmarks for user.", - "parameters" : [ ], + "/api/card/{card-id}/query/{export-format}" : { + "post" : { + "summary" : "POST /api/card/{card-id}/query/{export-format}", + "description" : "Run the query associated with a Card, and return its results as a file in the specified format.\n\n `parameters`, `pivot-results?` and `format-rows?` should be passed as application/x-www-form-urlencoded form content\n or json in the body. This is because this endpoint is normally used to power 'Download Results' buttons that use\n HTML `form` actions).", + "parameters" : [ { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "export-format", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" + } + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -10318,46 +11721,75 @@ "schema" : { "type" : "object", "properties" : { - "orderings" : { + "format_rows" : { + "default" : false, + "type" : "boolean" + }, + "parameters" : { "type" : "array", "items" : { "type" : "object", - "properties" : { - "item_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "type" : { - "type" : "string", - "enum" : [ "card", "dashboard", "collection", "document" ] - } - }, - "required" : [ "type", "item_id" ] + "additionalProperties" : { } } + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" } }, - "required" : [ "orderings" ] + "required" : [ "format_rows", "pivot_results" ] } } } }, - "tags" : [ "/api/bookmark" ] + "tags" : [ "/api/card" ] } }, - "/api/bookmark/{model}/{id}" : { - "post" : { - "summary" : "POST /api/bookmark/{model}/{id}", - "description" : "Create a new bookmark for user.", + "/api/card/{id}" : { + "get" : { + "summary" : "GET /api/card/{id}", + "description" : "Get `Card` with ID.\n\n As of v57, returns the MBQL query (`dataset_query`) as MBQL 5; to return the query as MBQL 4 (aka legacy MBQL)\n instead, you can specify `?legacy-mbql=true`.", "parameters" : [ { "in" : "path", - "name" : "model", + "name" : "id", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "card", "dashboard", "collection", "document" ] + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] } }, { + "in" : "query", + "name" : "legacy-mbql", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/card" ] + }, + "put" : { + "summary" : "PUT /api/card/{id}", + "description" : "Update a `Card`.", + "parameters" : [ { "in" : "path", "name" : "id", "required" : true, @@ -10366,6 +11798,13 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "delete_old_dashcards", + "required" : false, + "schema" : { + "type" : "boolean" + } } ], "responses" : { "2XX" : { @@ -10378,20 +11817,98 @@ "description" : "Server error response" } }, - "tags" : [ "/api/bookmark" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "enable_embedding" : { + "type" : "boolean" + }, + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "dashboard_tab_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "collection_preview" : { + "type" : "boolean" + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "archived" : { + "type" : "boolean" + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "embedding_params" : { + "type" : "object", + "additionalProperties" : { + "type" : "string", + "enum" : [ "disabled", "enabled", "locked" ] + }, + "description" : "value must be a valid embedding params map." + }, + "result_metadata" : { + "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "type" : { + "$ref" : "#/components/schemas/metabase.queries.schema.card-type" + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "description" : { + "type" : "string" + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + } + } + } + } + }, + "tags" : [ "/api/card" ] }, "delete" : { - "summary" : "DELETE /api/bookmark/{model}/{id}", - "description" : "Delete a bookmark. Will delete a bookmark assigned to the user making the request by model and id.", + "summary" : "DELETE /api/card/{id}", + "description" : "Hard delete a Card. To soft delete, use `PUT /api/card/:id`", "parameters" : [ { - "in" : "path", - "name" : "model", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "card", "dashboard", "collection", "document" ] - } - }, { "in" : "path", "name" : "id", "required" : true, @@ -10412,14 +11929,23 @@ "description" : "Server error response" } }, - "tags" : [ "/api/bookmark" ] + "tags" : [ "/api/card" ] } }, - "/api/bug-reporting/connection-pool-details" : { - "get" : { - "summary" : "GET /api/bug-reporting/connection-pool-details", - "description" : "Returns database connection pool info for the current Metabase instance.", - "parameters" : [ ], + "/api/card/{id}/copy" : { + "post" : { + "summary" : "POST /api/card/{id}/copy", + "description" : "Copy a `Card`, with the new name 'Copy of _name_'", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -10431,14 +11957,23 @@ "description" : "Server error response" } }, - "tags" : [ "/api/bug-reporting" ] + "tags" : [ "/api/card" ] } }, - "/api/bug-reporting/details" : { + "/api/card/{id}/dashboards" : { "get" : { - "summary" : "GET /api/bug-reporting/details", - "description" : "Returns version and system information relevant to filing a bug report against Metabase.", - "parameters" : [ ], + "summary" : "GET /api/card/{id}/dashboards", + "description" : "Get a list of `{:name ... :id ...}` pairs for all the dashboards this card appears in.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -10450,103 +11985,35 @@ "description" : "Server error response" } }, - "tags" : [ "/api/bug-reporting" ] + "tags" : [ "/api/card" ] } }, - "/api/cache/" : { + "/api/card/{id}/params/{param-key}/remapping" : { "get" : { - "summary" : "GET /api/cache/", - "description" : "Return cache configuration.", + "summary" : "GET /api/card/{id}/params/{param-key}/remapping", + "description" : "Fetch the remapped value for a given value of the parameter with ID `:param-key`.\n\n ;; fetch the remapped value for Card 1 parameter 'abc' for value 100\n GET /api/card/1/params/abc/remapping?value=100", "parameters" : [ { - "in" : "query", - "name" : "model", + "in" : "path", + "name" : "id", "required" : true, "schema" : { - "default" : [ "root" ], - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "root", "database", "dashboard", "question" ] - } - }, - "description" : "Type of model" + "$ref" : "#/components/schemas/metabase.lib.schema.id.card" + } }, { - "in" : "query", - "name" : "collection", - "required" : false, + "in" : "path", + "name" : "param-key", + "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "Collection id to filter results. Returns everything if not supplied." + "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" + } }, { "in" : "query", - "name" : "id", - "required" : false, + "name" : "value", + "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "Model id to get configuration for." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/cache" ] - }, - "put" : { - "summary" : "PUT /api/cache/", - "description" : "Store cache configuration.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "model" : { - "type" : "string", - "enum" : [ "root", "database", "dashboard", "question" ] - }, - "model_id" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - }, - "strategy" : { - "$ref" : "#/components/schemas/metabase.cache.api.cache-strategy" - } - }, - "required" : [ "model", "model_id", "strategy" ] - } - } + "type" : "string" } - }, - "tags" : [ "/api/cache" ] - }, - "delete" : { - "summary" : "DELETE /api/cache/", - "description" : "Delete cache configurations.", - "parameters" : [ ], + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -10558,84 +12025,28 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "model" : { - "type" : "string", - "enum" : [ "root", "database", "dashboard", "question" ] - }, - "model_id" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - } - } - }, - "required" : [ "model", "model_id" ] - } - } - } - }, - "tags" : [ "/api/cache" ] + "tags" : [ "/api/card" ] } }, - "/api/cache/invalidate" : { - "post" : { - "summary" : "POST /api/cache/invalidate", - "description" : "Invalidate cache entries.\n\n Use it like `/api/cache/invalidate?database=1&dashboard=15` (any number of database/dashboard/question can be\n supplied).\n\n `&include=overrides` controls whenever you want to invalidate cache for a specific cache configuration without\n touching all nested configurations, or you want your invalidation to trickle down to every card.", + "/api/card/{id}/query_metadata" : { + "get" : { + "summary" : "GET /api/card/{id}/query_metadata", + "description" : "Get all of the required query metadata for a card.", "parameters" : [ { - "in" : "query", - "name" : "include", - "required" : false, - "schema" : { - "const" : "overrides" - }, - "description" : "All cache configuration overrides should invalidate cache too" - }, { - "in" : "query", - "name" : "database", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - } - }, - "description" : "A list of database ids" - }, { - "in" : "query", - "name" : "dashboard", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - } - }, - "description" : "A list of dashboard ids" - }, { - "in" : "query", - "name" : "question", - "required" : false, + "in" : "path", + "name" : "id", + "required" : true, "schema" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater or equal to than zero.", + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", "type" : "integer", - "minimum" : 0 - } - }, - "description" : "A list of question ids" + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } } ], "responses" : { "2XX" : { @@ -10648,31 +12059,42 @@ "description" : "Server error response" } }, - "tags" : [ "/api/cache" ] + "tags" : [ "/api/card" ] } }, - "/api/card/" : { + "/api/card/{id}/series" : { "get" : { - "summary" : "GET /api/card/", - "description" : "Get all the Cards. Option filter param `f` can be used to change the set of Cards that are returned; default is\n `all`, but other options include `mine`, `bookmarked`, `database`, `table`, `using_model`, `using_segment`, and\n `archived`. See corresponding implementation functions above for the specific behavior of each filter\n option. :card_index:", - "parameters" : [ { - "in" : "query", - "name" : "f", + "summary" : "GET /api/card/{id}/series", + "description" : "Fetches a list of compatible series with the card with id `card_id`.\n\n - `last_cursor` with value is the id of the last card from the previous page to fetch the next page.\n - `query` to search card by name.\n - `exclude_ids` to filter out a list of card ids", + "parameters" : [ { + "in" : "path", + "name" : "id", "required" : true, "schema" : { - "default" : "all", - "type" : "string", - "enum" : [ "archived", "table", "using_model", "bookmarked", "using_segment", "all", "mine", "database" ] + "type" : "integer" } }, { "in" : "query", - "name" : "model_id", + "name" : "last_cursor", "required" : false, "schema" : { "type" : "integer", "minimum" : 1 }, "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "query", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "exclude_ids", + "required" : false, + "schema" : { } } ], "responses" : { "2XX" : { @@ -10686,10 +12108,12 @@ } }, "tags" : [ "/api/card" ] - }, + } + }, + "/api/cards/dashboards" : { "post" : { - "summary" : "POST /api/card/", - "description" : "Create a new `Card`. Card `type` can be `question`, `metric`, or `model`.", + "summary" : "POST /api/cards/dashboards", + "description" : "Get the dashboards that multiple cards appear in. The response is a sequence of maps, each of which has a `card_id`\n and `dashboards`. `dashboard` may include an `:error` key, either `:unreadable-dashboard` or\n `:unwritable-dashboard`. In the case of an `unreadable-dashboard` the dashboard details (name, ID) will NOT be\n present.", "parameters" : [ ], "responses" : { "2XX" : { @@ -10708,82 +12132,27 @@ "schema" : { "type" : "object", "properties" : { - "visualization_settings" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "dashboard_tab_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "entity_id" : { - "type" : "string", - "minLength" : 1 - }, - "dataset_query" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "parameter_mappings" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "result_metadata" : { - "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "type" : { - "$ref" : "#/components/schemas/metabase.queries.schema.card-type" - }, - "display" : { - "type" : "string", - "minLength" : 1 - }, - "parameters" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" - }, - "description" : { - "type" : "string", - "minLength" : 1 - }, - "dashboard_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "card_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } } }, - "required" : [ "name", "dataset_query", "display", "visualization_settings" ] + "required" : [ "card_ids" ] } } } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/cards" ] } }, - "/api/card/collections" : { + "/api/cards/move" : { "post" : { - "summary" : "POST /api/card/collections", - "description" : "Bulk update endpoint for Card Collections. Move a set of `Cards` with `card_ids` into a `Collection` with\n `collection_id`, or remove them from any Collections by passing a `null` `collection_id`.", + "summary" : "POST /api/cards/move", + "description" : "Moves a number of Cards to a single collection or dashboard.\n\n For now, just either succeed or fail as a batch - we can think more about error handling later down the road.", "parameters" : [ ], "responses" : { "2XX" : { @@ -10814,6 +12183,11 @@ "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 + }, + "dashboard_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 } }, "required" : [ "card_ids" ] @@ -10821,13 +12195,13 @@ } } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/cards" ] } }, - "/api/card/embeddable" : { + "/api/channel/" : { "get" : { - "summary" : "GET /api/card/embeddable", - "description" : "Fetch a list of Cards where `enable_embedding` is `true`. The cards can be embedded using the embedding endpoints\n and a signed JWT.", + "summary" : "GET /api/channel/", + "description" : "Get all channels", "parameters" : [ ], "responses" : { "2XX" : { @@ -10840,55 +12214,26 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] - } - }, - "/api/card/pivot/{card-id}/query" : { - "post" : { - "summary" : "POST /api/card/pivot/{card-id}/query", - "description" : "Run the query associated with a Card.", - "parameters" : [ { - "in" : "path", - "name" : "card-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, "requestBody" : { "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "ignore_cache" : { - "type" : "boolean" + "include_inactive" : { + "type" : "boolean", + "default" : false } } } } } }, - "tags" : [ "/api/card" ] - } - }, - "/api/card/public" : { - "get" : { - "summary" : "GET /api/card/public", - "description" : "Fetch a list of Cards with public UUIDs. These cards are publicly-accessible *if* public sharing is enabled.", + "tags" : [ "/api/channel" ] + }, + "post" : { + "summary" : "POST /api/channel/", + "description" : "Create a channel", "parameters" : [ ], "responses" : { "2XX" : { @@ -10901,73 +12246,45 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] - } - }, - "/api/card/{card-id}/params/{param-key}/search/{query}" : { - "get" : { - "summary" : "GET /api/card/{card-id}/params/{param-key}/search/{query}", - "description" : "Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`.\n\n ;; fetch values for Card 1 parameter 'abc' that contain 'Orange';\n GET /api/card/1/params/abc/search/Orange\n\n Currently limited to first 1000 results.", - "parameters" : [ { - "in" : "path", - "name" : "card-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "param-key", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" - } - }, { - "in" : "path", - "name" : "query", - "required" : true, - "schema" : { - "type" : "string", - "minLength" : 1 - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/card" ] - } - }, - "/api/card/{card-id}/params/{param-key}/values" : { - "get" : { - "summary" : "GET /api/card/{card-id}/params/{param-key}/values", - "description" : "Fetch possible values of the parameter whose ID is `:param-key`.\n\n ;; fetch values for Card 1 parameter 'abc' that are possible\n GET /api/card/1/params/abc/values", - "parameters" : [ { - "in" : "path", - "name" : "card-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "param-key", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "active" : { + "type" : "boolean", + "default" : true + }, + "description" : { + "type" : "string", + "minLength" : 1 + }, + "details" : { + "type" : "object", + "properties" : { } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "type" : { + "description" : "Must be a namespaced channel. E.g: channel/http" + } + }, + "required" : [ "name", "type", "details" ] + } + } } - } ], + }, + "tags" : [ "/api/channel" ] + } + }, + "/api/channel/test" : { + "post" : { + "summary" : "POST /api/channel/test", + "description" : "Test a channel connection", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -10979,16 +12296,35 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "details" : { + "type" : "object", + "properties" : { } + }, + "type" : { + "description" : "Must be a namespaced channel. E.g: channel/http" + } + }, + "required" : [ "type", "details" ] + } + } + } + }, + "tags" : [ "/api/channel" ] } }, - "/api/card/{card-id}/public_link" : { - "post" : { - "summary" : "POST /api/card/{card-id}/public_link", - "description" : "Generate publicly-accessible links for this Card. Returns UUID to be used in public links. (If this Card has\n already been shared, it will return the existing public link rather than creating a new one.) Public sharing must\n be enabled.", + "/api/channel/{id}" : { + "get" : { + "summary" : "GET /api/channel/{id}", + "description" : "Get a channel", "parameters" : [ { "in" : "path", - "name" : "card-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -11007,14 +12343,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/channel" ] }, - "delete" : { - "summary" : "DELETE /api/card/{card-id}/public_link", - "description" : "Delete the publicly-accessible link to this Card.", + "put" : { + "summary" : "PUT /api/channel/{id}", + "description" : "Update a channel", "parameters" : [ { "in" : "path", - "name" : "card-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -11033,88 +12369,60 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] - } - }, - "/api/card/{card-id}/query" : { - "post" : { - "summary" : "POST /api/card/{card-id}/query", - "description" : "Run the query associated with a Card.", - "parameters" : [ { - "in" : "path", - "name" : "card-id", - "required" : true, - "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, "requestBody" : { "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "collection_preview" : { + "active" : { "type" : "boolean" }, - "dashboard_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "description" : { + "type" : "string", + "minLength" : 1 }, - "ignore_cache" : { - "default" : false, - "type" : "boolean" + "details" : { + "type" : "object", + "properties" : { } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "type" : { + "description" : "Must be a namespaced channel. E.g: channel/http" } - }, - "required" : [ "ignore_cache" ] + } } } } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/channel" ] } }, - "/api/card/{card-id}/query/{export-format}" : { + "/api/cloud-migration/" : { "post" : { - "summary" : "POST /api/card/{card-id}/query/{export-format}", - "description" : "Run the query associated with a Card, and return its results as a file in the specified format.\n\n `parameters`, `pivot-results?` and `format-rows?` should be passed as application/x-www-form-urlencoded form content\n or json in the body. This is because this endpoint is normally used to power 'Download Results' buttons that use\n HTML `form` actions).", - "parameters" : [ { - "in" : "path", - "name" : "card-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 + "summary" : "POST /api/cloud-migration/", + "description" : "Initiate a new cloud migration.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "export-format", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - } ], + }, + "tags" : [ "/api/cloud-migration" ] + }, + "get" : { + "summary" : "GET /api/cloud-migration/", + "description" : "Get the latest cloud migration, if any.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11126,95 +12434,63 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "format_rows" : { - "default" : false, - "type" : "boolean" - }, - "parameters" : { - "type" : "array", - "items" : { - "type" : "object", - "additionalProperties" : { } - } - }, - "pivot_results" : { - "default" : false, - "type" : "boolean" - } - }, - "required" : [ "format_rows", "pivot_results" ] - } - } + "tags" : [ "/api/cloud-migration" ] + } + }, + "/api/cloud-migration/cancel" : { + "put" : { + "summary" : "PUT /api/cloud-migration/cancel", + "description" : "Cancel any ongoing cloud migrations, if any.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/cloud-migration" ] } }, - "/api/card/{id}" : { + "/api/collection/" : { "get" : { - "summary" : "GET /api/card/{id}", - "description" : "Get `Card` with ID.\n\n As of v57, returns the MBQL query (`dataset_query`) as MBQL 5; to return the query as MBQL 4 (aka legacy MBQL)\n instead, you can specify `?legacy-mbql=true`.", + "summary" : "GET /api/collection/", + "description" : "Fetch a list of all Collections that the current user has read permissions for (`:can_write` is returned as an\n additional property of each Collection so you can tell which of these you have write permissions for.)\n\n By default, this returns non-archived Collections, but instead you can show archived ones by passing\n `?archived=true`.\n\n By default, admin users will see all collections. To hide other user's collections pass in\n `?exclude-other-user-collections=true`.\n\n If personal-only is `true`, then return only personal collections where `personal_owner_id` is not `nil`.", "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, + "in" : "query", + "name" : "archived", + "required" : false, "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] + "type" : "boolean", + "default" : false } }, { "in" : "query", - "name" : "legacy-mbql", + "name" : "exclude-other-user-collections", "required" : false, "schema" : { "type" : "boolean", "default" : false } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/card" ] - }, - "put" : { - "summary" : "PUT /api/card/{id}", - "description" : "Update a `Card`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, + }, { + "in" : "query", + "name" : "namespace", + "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "minLength" : 1 + } }, { "in" : "query", - "name" : "delete_old_dashcards", + "name" : "personal-only", "required" : false, "schema" : { - "type" : "boolean" + "type" : "boolean", + "default" : false } } ], "responses" : { @@ -11228,134 +12504,75 @@ "description" : "Server error response" } }, + "tags" : [ "/api/collection" ] + }, + "post" : { + "summary" : "POST /api/collection/", + "description" : "Create a new Collection.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, "requestBody" : { "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "enable_embedding" : { - "type" : "boolean" - }, - "visualization_settings" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "dashboard_tab_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "collection_preview" : { - "type" : "boolean" - }, - "dataset_query" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } + "authority_level" : { + "type" : "string", + "enum" : [ "official" ] }, - "parameter_mappings" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + "description" : { + "type" : "string", + "minLength" : 1 }, "name" : { "type" : "string", "minLength" : 1 }, - "archived" : { - "type" : "boolean" - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "embedding_params" : { - "type" : "object", - "additionalProperties" : { - "type" : "string", - "enum" : [ "disabled", "enabled", "locked" ] - }, - "description" : "value must be a valid embedding params map." - }, - "result_metadata" : { - "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "namespace" : { + "type" : "string", + "minLength" : 1 }, - "cache_ttl" : { + "parent_id" : { "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 }, "type" : { - "$ref" : "#/components/schemas/metabase.queries.schema.card-type" - }, - "display" : { "type" : "string", - "minLength" : 1 - }, - "parameters" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" - }, - "description" : { - "type" : "string" - }, - "dashboard_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "enum" : [ "remote-synced" ] } - } + }, + "required" : [ "name" ] } } } }, - "tags" : [ "/api/card" ] - }, - "delete" : { - "summary" : "DELETE /api/card/{id}", - "description" : "Hard delete a Card. To soft delete, use `PUT /api/card/:id`", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/collection" ] } }, - "/api/card/{id}/copy" : { - "post" : { - "summary" : "POST /api/card/{id}/copy", - "description" : "Copy a `Card`, with the new name 'Copy of _name_'", + "/api/collection/graph" : { + "get" : { + "summary" : "GET /api/collection/graph", + "description" : "Fetch a graph of all Collection Permissions.", "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, + "in" : "query", + "name" : "namespace", + "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "minLength" : 1 + } } ], "responses" : { "2XX" : { @@ -11368,22 +12585,27 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] - } - }, - "/api/card/{id}/dashboards" : { - "get" : { - "summary" : "GET /api/card/{id}/dashboards", - "description" : "Get a list of `{:name ... :id ...}` pairs for all the dashboards this card appears in.", + "tags" : [ "/api/collection" ] + }, + "put" : { + "summary" : "PUT /api/collection/graph", + "description" : "Do a batch update of Collections Permissions by passing in a modified graph. Will overwrite parts of the graph that\n are present in the request, and leave the rest unchanged.\n\n If the `force` query parameter is `true`, a `revision` number is not required. The provided graph will be persisted\n as-is, and has the potential to clobber other writes that happened since the last read.\n\n If the `skip_graph` query parameter is `true`, it will only return the current revision, not the entire permissions\n graph.", "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, + "in" : "query", + "name" : "force", + "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "skip-graph", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } } ], "responses" : { "2XX" : { @@ -11396,33 +12618,44 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "groups" : { + "type" : "object", + "properties" : { } + }, + "namespace" : { + "type" : "string", + "minLength" : 1 + }, + "revision" : { + "description" : "value must be an integer.", + "type" : "integer" + } + }, + "required" : [ "groups" ] + } + } + } + }, + "tags" : [ "/api/collection" ] } }, - "/api/card/{id}/params/{param-key}/remapping" : { + "/api/collection/root" : { "get" : { - "summary" : "GET /api/card/{id}/params/{param-key}/remapping", - "description" : "Fetch the remapped value for a given value of the parameter with ID `:param-key`.\n\n ;; fetch the remapped value for Card 1 parameter 'abc' for value 100\n GET /api/card/1/params/abc/remapping?value=100", + "summary" : "GET /api/collection/root", + "description" : "Return the 'Root' Collection object with standard details added", "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.card" - } - }, { - "in" : "path", - "name" : "param-key", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" - } - }, { "in" : "query", - "name" : "value", - "required" : true, + "name" : "namespace", + "required" : false, "schema" : { - "type" : "string" + "type" : "string", + "minLength" : 1 } } ], "responses" : { @@ -11436,32 +12669,24 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/collection" ] } }, - "/api/card/{id}/query_metadata" : { + "/api/collection/root/dashboard-question-candidates" : { "get" : { - "summary" : "GET /api/card/{id}/query_metadata", - "description" : "Get all of the required query metadata for a card.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] - } - } ], + "summary" : "GET /api/collection/root/dashboard-question-candidates", + "description" : "Find cards in the root collection that can be moved into dashboards in the root collection. (Same as the above\n endpoint, but for the root collection)", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:data -> , :name -> , :description -> , :sole_dashboard_info -> , :name -> , :description -> }>}>, :total -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.collections.api.DashboardQuestionCandidatesResponse" + } + } + } }, "4XX" : { "description" : "Client error response" @@ -11470,32 +12695,51 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/collection" ] } }, - "/api/card/{id}/series" : { + "/api/collection/root/items" : { "get" : { - "summary" : "GET /api/card/{id}/series", - "description" : "Fetches a list of compatible series with the card with id `card_id`.\n\n - `last_cursor` with value is the id of the last card from the previous page to fetch the next page.\n - `query` to search card by name.\n - `exclude_ids` to filter out a list of card ids", + "summary" : "GET /api/collection/root/items", + "description" : "Fetch objects that the current user should see at their root level. As mentioned elsewhere, the 'Root' Collection\n doesn't actually exist as a row in the application DB: it's simply a virtual Collection where things with no\n `collection_id` exist. It does, however, have its own set of Permissions.\n\n This endpoint will actually show objects with no `collection_id` for Users that have Root Collection\n permissions, but for people without Root Collection perms, we'll just show the objects that have an effective\n location of `/`.\n\n This endpoint is intended to power a 'Root Folder View' for the Current User, so regardless you'll see all the\n top-level objects you're allowed to access.\n\n By default, this will show the 'normal' Collections namespace; to view a different Collections namespace, such as\n `snippets`, you can pass the `?namespace=` parameter.\n\n Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is\n changed, that should too.", "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, + "in" : "query", + "name" : "models", + "required" : false, "schema" : { - "type" : "integer" + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "dashboard", "dataset", "no_models", "timeline", "snippet", "collection", "document", "pulse", "metric", "card" ] + } } }, { "in" : "query", - "name" : "last_cursor", + "name" : "collection_type", "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "enum" : [ "remote-synced" ] + } }, { "in" : "query", - "name" : "query", + "name" : "include_can_run_adhoc_query", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "namespace", "required" : false, "schema" : { "type" : "string", @@ -11503,9 +12747,42 @@ } }, { "in" : "query", - "name" : "exclude_ids", + "name" : "pinned_state", "required" : false, - "schema" : { } + "schema" : { + "type" : "string", + "enum" : [ "is_not_pinned", "is_pinned", "all" ] + } + }, { + "in" : "query", + "name" : "sort_column", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "model", "name", "last_edited_by", "last_edited_at" ] + } + }, { + "in" : "query", + "name" : "sort_direction", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "desc", "asc" ] + } + }, { + "in" : "query", + "name" : "official_collections_first", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "show_dashboard_questions", + "required" : false, + "schema" : { + "type" : "boolean" + } } ], "responses" : { "2XX" : { @@ -11518,17 +12795,24 @@ "description" : "Server error response" } }, - "tags" : [ "/api/card" ] + "tags" : [ "/api/collection" ] } }, - "/api/cards/dashboards" : { + "/api/collection/root/move-dashboard-question-candidates" : { "post" : { - "summary" : "POST /api/cards/dashboards", - "description" : "Get the dashboards that multiple cards appear in. The response is a sequence of maps, each of which has a `card_id`\n and `dashboards`. `dashboard` may include an `:error` key, either `:unreadable-dashboard` or\n `:unwritable-dashboard`. In the case of an `unreadable-dashboard` the dashboard details (name, ID) will NOT be\n present.", + "summary" : "POST /api/collection/root/move-dashboard-question-candidates", + "description" : "Move candidate cards to the dashboards they appear in (for the root collection)", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:moved -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.collections.api.MoveDashboardQuestionCandidatesResponse" + } + } + } }, "4XX" : { "description" : "Client error response" @@ -11549,21 +12833,22 @@ "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 - } + }, + "uniqueItems" : true } }, - "required" : [ "card_ids" ] + "optional" : true } } } }, - "tags" : [ "/api/cards" ] + "tags" : [ "/api/collection" ] } }, - "/api/cards/move" : { - "post" : { - "summary" : "POST /api/cards/move", - "description" : "Moves a number of Cards to a single collection or dashboard.\n\n For now, just either succeed or fail as a batch - we can think more about error handling later down the road.", + "/api/collection/trash" : { + "get" : { + "summary" : "GET /api/collection/trash", + "description" : "Fetch the trash collection, as in `/api/collection/:trash-id`", "parameters" : [ ], "responses" : { "2XX" : { @@ -11576,44 +12861,55 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "card_ids" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "dashboard_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "card_ids" ] - } - } - } - }, - "tags" : [ "/api/cards" ] + "tags" : [ "/api/collection" ] } }, - "/api/channel/" : { + "/api/collection/tree" : { "get" : { - "summary" : "GET /api/channel/", - "description" : "Get all channels", - "parameters" : [ ], + "summary" : "GET /api/collection/tree", + "description" : "Similar to `GET /`, but returns Collections in a tree structure, e.g.\n\n ```\n [{:name \"A\"\n :below #{:card :dataset}\n :children [{:name \"B\"}\n {:name \"C\"\n :here #{:dataset :card}\n :below #{:dataset :card}\n :children [{:name \"D\"\n :here #{:dataset}\n :children [{:name \"E\"}]}\n {:name \"F\"\n :here #{:card}\n :children [{:name \"G\"}]}]}]}\n {:name \"H\"}]\n ```\n\n The here and below keys indicate the types of items at this particular level of the tree (here) and in its\n subtree (below).\n\n TODO: for historical reasons this returns Saved Questions AS 'card' AND Models as 'dataset'; we should fix this at\n some point in the future.", + "parameters" : [ { + "in" : "query", + "name" : "exclude-archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "exclude-other-user-collections", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "namespace", + "required" : false, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "shallow", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "collection-id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11625,27 +12921,55 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "include_inactive" : { - "type" : "boolean", - "default" : false - } - } - } - } + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/{id}" : { + "get" : { + "summary" : "GET /api/collection/{id}", + "description" : "Fetch a specific Collection with standard details added", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, - "tags" : [ "/api/channel" ] + "tags" : [ "/api/collection" ] }, - "post" : { - "summary" : "POST /api/channel/", - "description" : "Create a channel", - "parameters" : [ ], + "put" : { + "summary" : "PUT /api/collection/{id}", + "description" : "Modify an existing Collection, including archiving or unarchiving it, or moving it.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11663,39 +12987,52 @@ "schema" : { "type" : "object", "properties" : { - "active" : { + "archived" : { "type" : "boolean", - "default" : true + "default" : false + }, + "authority_level" : { + "type" : "string", + "enum" : [ "official" ] }, "description" : { "type" : "string", "minLength" : 1 }, - "details" : { - "type" : "object", - "properties" : { } - }, "name" : { "type" : "string", "minLength" : 1 }, + "parent_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, "type" : { - "description" : "Must be a namespaced channel. E.g: channel/http" + "type" : "string", + "enum" : [ "remote-synced" ] } }, - "required" : [ "name", "type", "details" ] + "required" : [ ] } } } }, - "tags" : [ "/api/channel" ] - } - }, - "/api/channel/test" : { - "post" : { - "summary" : "POST /api/channel/test", - "description" : "Test a channel connection", - "parameters" : [ ], + "tags" : [ "/api/collection" ] + }, + "delete" : { + "summary" : "DELETE /api/collection/{id}", + "description" : "Deletes a collection permanently", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11707,32 +13044,13 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "details" : { - "type" : "object", - "properties" : { } - }, - "type" : { - "description" : "Must be a namespaced channel. E.g: channel/http" - } - }, - "required" : [ "type", "details" ] - } - } - } - }, - "tags" : [ "/api/channel" ] + "tags" : [ "/api/collection" ] } }, - "/api/channel/{id}" : { + "/api/collection/{id}/dashboard-question-candidates" : { "get" : { - "summary" : "GET /api/channel/{id}", - "description" : "Get a channel", + "summary" : "GET /api/collection/{id}/dashboard-question-candidates", + "description" : "Find cards in this collection that can be moved into dashboards in this collection.\n\n To be eligible, a card must only appear in one dashboard (which is also in this collection), and must not already be a\n dashboard question.", "parameters" : [ { "in" : "path", "name" : "id", @@ -11743,6 +13061,113 @@ }, "description" : "value must be an integer greater than zero." } ], + "responses" : { + "2XX" : { + "description" : "map where {:data -> , :name -> , :description -> , :sole_dashboard_info -> , :name -> , :description -> }>}>, :total -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.collections.api.DashboardQuestionCandidatesResponse" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/{id}/items" : { + "get" : { + "summary" : "GET /api/collection/{id}/items", + "description" : "Fetch a specific Collection's items with the following options:\n\n * `models` - only include objects of a specific set of `models`. If unspecified, returns objects of all models\n * `archived` - when `true`, return archived objects *instead* of unarchived ones. Defaults to `false`.\n * `pinned_state` - when `is_pinned`, return pinned objects only.\n when `is_not_pinned`, return non pinned objects only.\n when `all`, return everything. By default returns everything.\n * `include_can_run_adhoc_query` - when this is true hydrates the `can_run_adhoc_query` flag on card models\n\n Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is\n changed, that should too.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + }, { + "in" : "query", + "name" : "models", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "dashboard", "dataset", "no_models", "timeline", "snippet", "collection", "document", "pulse", "metric", "card" ] + } + } + }, { + "in" : "query", + "name" : "archived", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_can_run_adhoc_query", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "pinned_state", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "is_not_pinned", "is_pinned", "all" ] + } + }, { + "in" : "query", + "name" : "sort_column", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "model", "name", "last_edited_by", "last_edited_at" ] + } + }, { + "in" : "query", + "name" : "sort_direction", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "desc", "asc" ] + } + }, { + "in" : "query", + "name" : "official_collections_first", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "show_dashboard_questions", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11754,11 +13179,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/channel" ] - }, - "put" : { - "summary" : "PUT /api/channel/{id}", - "description" : "Update a channel", + "tags" : [ "/api/collection" ] + } + }, + "/api/collection/{id}/move-dashboard-question-candidates" : { + "post" : { + "summary" : "POST /api/collection/{id}/move-dashboard-question-candidates", + "description" : "Move candidate cards to the dashboards they appear in.", "parameters" : [ { "in" : "path", "name" : "id", @@ -11769,6 +13196,78 @@ }, "description" : "value must be an integer greater than zero." } ], + "responses" : { + "2XX" : { + "description" : "map where {:moved -> }", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase.collections.api.MoveDashboardQuestionCandidatesResponse" + } + } + } + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "card_ids" : { + "type" : "array", + "items" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "uniqueItems" : true + } + }, + "optional" : true + } + } + } + }, + "tags" : [ "/api/collection" ] + } + }, + "/api/dashboard/" : { + "get" : { + "summary" : "GET /api/dashboard/", + "description" : "This endpoint is currently unused by the Metabase frontend and may be out of date with the rest of the application.\n It only exists for backwards compatibility and may be removed in the future.\n\n Get `Dashboards`. With filter option `f` (default `all`), restrict results as follows:\n * `all` - Return all Dashboards.\n * `mine` - Return Dashboards created by the current user.\n * `archived` - Return Dashboards that have been archived. (By default, these are *excluded*.)", + "parameters" : [ { + "in" : "query", + "name" : "f", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "all", "mine", "archived" ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + }, + "post" : { + "summary" : "POST /api/dashboard/", + "description" : "Create a new Dashboard.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11786,36 +13285,44 @@ "schema" : { "type" : "object", "properties" : { - "active" : { - "type" : "boolean" + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 }, - "description" : { - "type" : "string", - "minLength" : 1 + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 }, - "details" : { - "type" : "object", - "properties" : { } + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "description" : { + "type" : "string" }, "name" : { "type" : "string", "minLength" : 1 }, - "type" : { - "description" : "Must be a namespaced channel. E.g: channel/http" + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" } - } + }, + "required" : [ "name" ] } } } }, - "tags" : [ "/api/channel" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/cloud-migration/" : { - "post" : { - "summary" : "POST /api/cloud-migration/", - "description" : "Initiate a new cloud migration.", + "/api/dashboard/embeddable" : { + "get" : { + "summary" : "GET /api/dashboard/embeddable", + "description" : "Fetch a list of Dashboards where `enable_embedding` is `true`. The dashboards can be embedded using the embedding\n endpoints and a signed JWT.", "parameters" : [ ], "responses" : { "2XX" : { @@ -11828,12 +13335,34 @@ "description" : "Server error response" } }, - "tags" : [ "/api/cloud-migration" ] - }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/params/valid-filter-fields" : { "get" : { - "summary" : "GET /api/cloud-migration/", - "description" : "Get the latest cloud migration, if any.", - "parameters" : [ ], + "summary" : "GET /api/dashboard/params/valid-filter-fields", + "description" : "Utility endpoint for powering Dashboard UI. Given some set of `filtered` Field IDs (presumably Fields used in\n parameters) and a set of `filtering` Field IDs that will be used to restrict values of `filtered` Fields, for each\n `filtered` Field ID return the subset of `filtering` Field IDs that would actually be used in a chain filter query\n with these Fields.\n\n e.g. in a chain filter query like\n\n GET /api/dashboard/10/params/PARAM_1/values?PARAM_2=100\n\n Assume `PARAM_1` maps to Field 1 and `PARAM_2` maps to Fields 2 and 3. The underlying MBQL query may or may not\n filter against Fields 2 and 3, depending on whether an FK relationship that lets us create a join against Field 1\n can be found. You can use this endpoint to determine which of those Fields is actually used:\n\n GET /api/dashboard/params/valid-filter-fields?filtered=1&filtering=2&filtering=3\n ;; ->\n {1 [2 3]}\n\n Results are returned as a map of\n\n `filtered` Field ID -> subset of `filtering` Field IDs that would be used in chain filter query", + "parameters" : [ { + "in" : "query", + "name" : "filtered", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + } + }, { + "in" : "query", + "name" : "filtering", + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + } + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11845,14 +13374,41 @@ "description" : "Server error response" } }, - "tags" : [ "/api/cloud-migration" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/cloud-migration/cancel" : { - "put" : { - "summary" : "PUT /api/cloud-migration/cancel", - "description" : "Cancel any ongoing cloud migrations, if any.", - "parameters" : [ ], + "/api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : { + "post" : { + "summary" : "POST /api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query", + "description" : "Run a pivot table query for a specific DashCard.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "dashcard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11864,46 +13420,44 @@ "description" : "Server error response" } }, - "tags" : [ "/api/cloud-migration" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "parameters" : { + "type" : "array", + "items" : { + "description" : "value must be a parameter map with an 'id' key", + "allOf" : [ { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id" ] + }, { + "type" : "object", + "additionalProperties" : { } + } ] + } + } + } + } + } + } + }, + "tags" : [ "/api/dashboard" ] } }, - "/api/collection/" : { + "/api/dashboard/public" : { "get" : { - "summary" : "GET /api/collection/", - "description" : "Fetch a list of all Collections that the current user has read permissions for (`:can_write` is returned as an\n additional property of each Collection so you can tell which of these you have write permissions for.)\n\n By default, this returns non-archived Collections, but instead you can show archived ones by passing\n `?archived=true`.\n\n By default, admin users will see all collections. To hide other user's collections pass in\n `?exclude-other-user-collections=true`.\n\n If personal-only is `true`, then return only personal collections where `personal_owner_id` is not `nil`.", - "parameters" : [ { - "in" : "query", - "name" : "archived", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "exclude-other-user-collections", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "namespace", - "required" : false, - "schema" : { - "type" : "string", - "minLength" : 1 - } - }, { - "in" : "query", - "name" : "personal-only", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - } ], + "summary" : "GET /api/dashboard/public", + "description" : "Fetch a list of Dashboards with public UUIDs. These dashboards are publicly-accessible *if* public sharing is\n enabled.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -11915,11 +13469,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] - }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/save" : { "post" : { - "summary" : "POST /api/collection/", - "description" : "Create a new Collection.", + "summary" : "POST /api/dashboard/save", + "description" : "Save a denormalized description of dashboard.", "parameters" : [ ], "responses" : { "2XX" : { @@ -11932,54 +13488,22 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "authority_level" : { - "type" : "string", - "enum" : [ "official" ] - }, - "description" : { - "type" : "string", - "minLength" : 1 - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "namespace" : { - "type" : "string", - "minLength" : 1 - }, - "parent_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "name" ] - } - } - } - }, - "tags" : [ "/api/collection" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/collection/graph" : { - "get" : { - "summary" : "GET /api/collection/graph", - "description" : "Fetch a graph of all Collection Permissions.", - "parameters" : [ { - "in" : "query", - "name" : "namespace", - "required" : false, + "/api/dashboard/save/collection/{parent-collection-id}" : { + "post" : { + "summary" : "POST /api/dashboard/save/collection/{parent-collection-id}", + "description" : "Save a denormalized description of dashboard into collection with ID `:parent-collection-id`.", + "parameters" : [ { + "in" : "path", + "name" : "parent-collection-id", + "required" : true, "schema" : { - "type" : "string", - "minLength" : 1 - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -11992,27 +13516,40 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] - }, - "put" : { - "summary" : "PUT /api/collection/graph", - "description" : "Do a batch update of Collections Permissions by passing in a modified graph. Will overwrite parts of the graph that\n are present in the request, and leave the rest unchanged.\n\n If the `force` query parameter is `true`, a `revision` number is not required. The provided graph will be persisted\n as-is, and has the potential to clobber other writes that happened since the last read.\n\n If the `skip_graph` query parameter is `true`, it will only return the current revision, not the entire permissions\n graph.", + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : { + "post" : { + "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query", + "description" : "Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it.", "parameters" : [ { - "in" : "query", - "name" : "force", - "required" : false, + "in" : "path", + "name" : "dashboard-id", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." }, { - "in" : "query", - "name" : "skip-graph", - "required" : false, + "in" : "path", + "name" : "dashcard-id", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -12031,38 +13568,74 @@ "schema" : { "type" : "object", "properties" : { - "groups" : { - "type" : "object", - "properties" : { } - }, - "namespace" : { + "dashboard_load_id" : { "type" : "string", "minLength" : 1 }, - "revision" : { - "description" : "value must be an integer.", - "type" : "integer" + "parameters" : { + "type" : "array", + "items" : { + "description" : "value must be a parameter map with an 'id' key", + "allOf" : [ { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id" ] + }, { + "type" : "object", + "additionalProperties" : { } + } ] + } } - }, - "required" : [ "groups" ] + } } } } }, - "tags" : [ "/api/collection" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/collection/root" : { - "get" : { - "summary" : "GET /api/collection/root", - "description" : "Return the 'Root' Collection object with standard details added", + "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}" : { + "post" : { + "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}", + "description" : "Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it, and return\n its results as a file in the specified format.\n\n `parameters` should be passed as query parameter encoded as a serialized JSON string (this is because this endpoint\n is normally used to power 'Download Results' buttons that use HTML `form` actions).", "parameters" : [ { - "in" : "query", - "name" : "namespace", - "required" : false, + "in" : "path", + "name" : "dashboard-id", + "required" : true, "schema" : { - "type" : "string", - "minLength" : 1 + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "dashcard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "export-format", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" } } ], "responses" : { @@ -12076,112 +13649,83 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] - } - }, - "/api/collection/root/dashboard-question-candidates" : { - "get" : { - "summary" : "GET /api/collection/root/dashboard-question-candidates", - "description" : "Find cards in the root collection that can be moved into dashboards in the root collection. (Same as the above\n endpoint, but for the root collection)", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "map where {:data -> , :name -> , :description -> , :sole_dashboard_info -> , :name -> , :description -> }>}>, :total -> }", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.collections.api.DashboardQuestionCandidatesResponse" - } + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "format_rows" : { + "default" : false, + "type" : "boolean" + }, + "parameters" : { + "anyOf" : [ { + "type" : "array", + "items" : { + "description" : "value must be a parameter map with an 'id' key", + "allOf" : [ { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id" ] + }, { + "type" : "object", + "additionalProperties" : { } + } ] + } + }, { + "description" : "value must be a valid JSON string.", + "type" : "string" + } ] + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" + } + }, + "required" : [ "format_rows", "pivot_results" ] } } - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/collection" ] - } - }, - "/api/collection/root/items" : { - "get" : { - "summary" : "GET /api/collection/root/items", - "description" : "Fetch objects that the current user should see at their root level. As mentioned elsewhere, the 'Root' Collection\n doesn't actually exist as a row in the application DB: it's simply a virtual Collection where things with no\n `collection_id` exist. It does, however, have its own set of Permissions.\n\n This endpoint will actually show objects with no `collection_id` for Users that have Root Collection\n permissions, but for people without Root Collection perms, we'll just show the objects that have an effective\n location of `/`.\n\n This endpoint is intended to power a 'Root Folder View' for the Current User, so regardless you'll see all the\n top-level objects you're allowed to access.\n\n By default, this will show the 'normal' Collections namespace; to view a different Collections namespace, such as\n `snippets`, you can pass the `?namespace=` parameter.\n\n Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is\n changed, that should too.", - "parameters" : [ { - "in" : "query", - "name" : "models", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "dashboard", "dataset", "no_models", "timeline", "snippet", "collection", "document", "pulse", "metric", "card" ] - } - } - }, { - "in" : "query", - "name" : "include_can_run_adhoc_query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "archived", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "namespace", - "required" : false, - "schema" : { - "type" : "string", - "minLength" : 1 - } - }, { - "in" : "query", - "name" : "pinned_state", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "is_not_pinned", "is_pinned", "all" ] - } - }, { - "in" : "query", - "name" : "sort_column", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "model", "name", "last_edited_by", "last_edited_at" ] } - }, { - "in" : "query", - "name" : "sort_direction", - "required" : false, + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute" : { + "get" : { + "summary" : "GET /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute", + "description" : "Fetches the values for filling in execution parameters. Pass PK parameters and values to select.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, "schema" : { - "type" : "string", - "enum" : [ "desc", "asc" ] - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." }, { - "in" : "query", - "name" : "official_collections_first", - "required" : false, + "in" : "path", + "name" : "dashcard-id", + "required" : true, "schema" : { - "type" : "boolean" - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." }, { "in" : "query", - "name" : "show_dashboard_questions", + "name" : "parameters", "required" : false, "schema" : { - "type" : "boolean" - } + "type" : "string" + }, + "description" : "value must be a valid JSON string." } ], "responses" : { "2XX" : { @@ -12194,24 +13738,33 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] - } - }, - "/api/collection/root/move-dashboard-question-candidates" : { + "tags" : [ "/api/dashboard" ] + }, "post" : { - "summary" : "POST /api/collection/root/move-dashboard-question-candidates", - "description" : "Move candidate cards to the dashboards they appear in (for the root collection)", - "parameters" : [ ], + "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute", + "description" : "Execute the associated Action in the context of a `Dashboard` and `DashboardCard` that includes it.\n\n `parameters` should be the mapped dashboard parameters with values.\n `extra_parameters` should be the extra, user entered parameter values.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "dashcard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { - "description" : "map where {:moved -> }", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.collections.api.MoveDashboardQuestionCandidatesResponse" - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -12226,29 +13779,32 @@ "schema" : { "type" : "object", "properties" : { - "card_ids" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "uniqueItems" : true + "parameters" : { + "type" : "object", + "additionalProperties" : { } } - }, - "optional" : true + } } } } }, - "tags" : [ "/api/collection" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/collection/trash" : { - "get" : { - "summary" : "GET /api/collection/trash", - "description" : "Fetch the trash collection, as in `/api/collection/:trash-id`", - "parameters" : [ ], + "/api/dashboard/{dashboard-id}/public_link" : { + "post" : { + "summary" : "POST /api/dashboard/{dashboard-id}/public_link", + "description" : "Generate publicly-accessible links for this Dashboard. Returns UUID to be used in public links. (If this\n Dashboard has already been shared, it will return the existing public link rather than creating a new one.) Public\n sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "dashboard-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -12260,49 +13816,43 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] - } - }, - "/api/collection/tree" : { - "get" : { - "summary" : "GET /api/collection/tree", - "description" : "Similar to `GET /`, but returns Collections in a tree structure, e.g.\n\n ```\n [{:name \"A\"\n :below #{:card :dataset}\n :children [{:name \"B\"}\n {:name \"C\"\n :here #{:dataset :card}\n :below #{:dataset :card}\n :children [{:name \"D\"\n :here #{:dataset}\n :children [{:name \"E\"}]}\n {:name \"F\"\n :here #{:card}\n :children [{:name \"G\"}]}]}]}\n {:name \"H\"}]\n ```\n\n The here and below keys indicate the types of items at this particular level of the tree (here) and in its\n subtree (below).\n\n TODO: for historical reasons this returns Saved Questions AS 'card' AND Models as 'dataset'; we should fix this at\n some point in the future.", + "tags" : [ "/api/dashboard" ] + }, + "delete" : { + "summary" : "DELETE /api/dashboard/{dashboard-id}/public_link", + "description" : "Delete the publicly-accessible link to this Dashboard.", "parameters" : [ { - "in" : "query", - "name" : "exclude-archived", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "exclude-other-user-collections", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "namespace", - "required" : false, - "schema" : { - "type" : "string", - "minLength" : 1 - } - }, { - "in" : "query", - "name" : "shallow", - "required" : false, + "in" : "path", + "name" : "dashboard-id", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - }, { - "in" : "query", - "name" : "collection-id", - "required" : false, + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{from-dashboard-id}/copy" : { + "post" : { + "summary" : "POST /api/dashboard/{from-dashboard-id}/copy", + "description" : "Copy a Dashboard.", + "parameters" : [ { + "in" : "path", + "name" : "from-dashboard-id", + "required" : true, "schema" : { "type" : "integer", "minimum" : 1 @@ -12320,28 +13870,87 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] - } - }, - "/api/collection/{id}" : { - "get" : { - "summary" : "GET /api/collection/{id}", - "description" : "Fetch a specific Collection with standard details added", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "description" : { + "type" : "string" + }, + "is_deep_copy" : { + "type" : "boolean", + "default" : false + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ ] + } + } + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}" : { + "get" : { + "summary" : "GET /api/dashboard/{id}", + "description" : "Get Dashboard with ID.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + }, + "delete" : { + "summary" : "DELETE /api/dashboard/{id}", + "description" : "Hard delete a Dashboard. To soft delete, use `PUT /api/dashboard/:id`\n\n This will remove also any questions/models/segments/metrics that use this database.", "parameters" : [ { "in" : "path", "name" : "id", "required" : true, "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -12354,11 +13963,11 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] + "tags" : [ "/api/dashboard" ] }, "put" : { - "summary" : "PUT /api/collection/{id}", - "description" : "Modify an existing Collection, including archiving or unarchiving it, or moving it.", + "summary" : "PUT /api/dashboard/{id}", + "description" : "Update a Dashboard, and optionally the `dashcards` and `tabs` of a Dashboard. The request body should be a JSON object with the same\n structure as the response from `GET /api/dashboard/:id`.", "parameters" : [ { "in" : "path", "name" : "id", @@ -12386,38 +13995,249 @@ "schema" : { "type" : "object", "properties" : { - "archived" : { - "type" : "boolean", - "default" : false + "points_of_interest" : { + "type" : "string" }, - "authority_level" : { - "type" : "string", - "enum" : [ "official" ] + "enable_embedding" : { + "type" : "boolean" }, - "description" : { + "width" : { "type" : "string", - "minLength" : 1 + "enum" : [ "fixed", "full" ] + }, + "show_in_getting_started" : { + "type" : "boolean" + }, + "position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 }, "name" : { "type" : "string", "minLength" : 1 }, - "parent_id" : { + "archived" : { + "type" : "boolean" + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "embedding_params" : { + "type" : "object", + "additionalProperties" : { + "type" : "string", + "enum" : [ "disabled", "enabled", "locked" ] + }, + "description" : "value must be a valid embedding params map." + }, + "tabs" : { + "description" : "value must be seq of maps in which ids are unique", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer.", + "type" : "integer" + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id", "name" ] + } + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "cache_ttl" : { "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 + }, + "caveats" : { + "type" : "string" + }, + "parameters" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" + }, + "dashcards" : { + "description" : "value must be seq of maps in which ids are unique", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "col" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "id" : { + "type" : "integer" + }, + "inline_parameters" : { + "type" : "array", + "items" : { + "type" : "string", + "minLength" : 1 + } + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "row" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "series" : { + "type" : "array", + "items" : { + "type" : "object" + } + }, + "size_x" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "size_y" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "id", "size_x", "size_y", "row", "col" ] + } + }, + "description" : { + "type" : "string" + } + } + } + } + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}/cards" : { + "put" : { + "summary" : "PUT /api/dashboard/{id}/cards", + "description" : "(DEPRECATED -- Use the `PUT /api/dashboard/:id` endpoint instead.)\n Update `Cards` and `Tabs` on a Dashboard. Request body should have the form:\n\n {:cards [{:id ... ; DashboardCard ID\n :size_x ...\n :size_y ...\n :row ...\n :col ...\n :parameter_mappings ...\n :series [{:id 123\n ...}]}\n ...]\n :tabs [{:id ... ; DashboardTab ID\n :name ...}]}", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "cards" : { + "description" : "value must be seq of maps in which ids are unique", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "col" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "id" : { + "type" : "integer" + }, + "inline_parameters" : { + "type" : "array", + "items" : { + "type" : "string", + "minLength" : 1 + } + }, + "parameter_mappings" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" + }, + "row" : { + "description" : "value must be an integer greater or equal to than zero.", + "type" : "integer", + "minimum" : 0 + }, + "series" : { + "type" : "array", + "items" : { + "type" : "object" + } + }, + "size_x" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "size_y" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "id", "size_x", "size_y", "row", "col" ] + } + }, + "tabs" : { + "description" : "value must be seq of maps in which ids are unique", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer.", + "type" : "integer" + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "id", "name" ] + } } }, - "required" : [ ] + "required" : [ "cards" ] } } } }, - "tags" : [ "/api/collection" ] - }, - "delete" : { - "summary" : "DELETE /api/collection/{id}", - "description" : "Deletes a collection permanently", + "tags" : [ "/api/dashboard" ] + } + }, + "/api/dashboard/{id}/items" : { + "get" : { + "summary" : "GET /api/dashboard/{id}/items", + "description" : "Get Dashboard with ID.", "parameters" : [ { "in" : "path", "name" : "id", @@ -12439,13 +14259,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/collection/{id}/dashboard-question-candidates" : { + "/api/dashboard/{id}/params/{param-key}/remapping" : { "get" : { - "summary" : "GET /api/collection/{id}/dashboard-question-candidates", - "description" : "Find cards in this collection that can be moved into dashboards in this collection.\n\n To be eligible, a card must only appear in one dashboard (which is also in this collection), and must not already be a\n dashboard question.", + "summary" : "GET /api/dashboard/{id}/params/{param-key}/remapping", + "description" : "Fetch the remapped value for a given value of the parameter with ID `:param-key`.\n\n ;; fetch the remapped value for Dashboard 1 parameter 'abc' for value 100\n GET /api/dashboard/1/params/abc/remapping?value=100", "parameters" : [ { "in" : "path", "name" : "id", @@ -12455,112 +14275,19 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "map where {:data -> , :name -> , :description -> , :sole_dashboard_info -> , :name -> , :description -> }>}>, :total -> }", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.collections.api.DashboardQuestionCandidatesResponse" - } - } - } - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/collection" ] - } - }, - "/api/collection/{id}/items" : { - "get" : { - "summary" : "GET /api/collection/{id}/items", - "description" : "Fetch a specific Collection's items with the following options:\n\n * `models` - only include objects of a specific set of `models`. If unspecified, returns objects of all models\n * `archived` - when `true`, return archived objects *instead* of unarchived ones. Defaults to `false`.\n * `pinned_state` - when `is_pinned`, return pinned objects only.\n when `is_not_pinned`, return non pinned objects only.\n when `all`, return everything. By default returns everything.\n * `include_can_run_adhoc_query` - when this is true hydrates the `can_run_adhoc_query` flag on card models\n\n Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is\n changed, that should too.", - "parameters" : [ { + }, { "in" : "path", - "name" : "id", + "name" : "param-key", "required" : true, "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] - } - }, { - "in" : "query", - "name" : "models", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "dashboard", "dataset", "no_models", "timeline", "snippet", "collection", "document", "pulse", "metric", "card" ] - } - } - }, { - "in" : "query", - "name" : "archived", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "include_can_run_adhoc_query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "pinned_state", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "is_not_pinned", "is_pinned", "all" ] - } - }, { - "in" : "query", - "name" : "sort_column", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "model", "name", "last_edited_by", "last_edited_at" ] - } - }, { - "in" : "query", - "name" : "sort_direction", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "desc", "asc" ] - } - }, { - "in" : "query", - "name" : "official_collections_first", - "required" : false, - "schema" : { - "type" : "boolean" + "type" : "string" } }, { "in" : "query", - "name" : "show_dashboard_questions", - "required" : false, + "name" : "value", + "required" : true, "schema" : { - "type" : "boolean", - "default" : false + "type" : "string" } } ], "responses" : { @@ -12574,13 +14301,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/collection" ] + "tags" : [ "/api/dashboard" ] } }, - "/api/collection/{id}/move-dashboard-question-candidates" : { - "post" : { - "summary" : "POST /api/collection/{id}/move-dashboard-question-candidates", - "description" : "Move candidate cards to the dashboards they appear in.", + "/api/dashboard/{id}/params/{param-key}/search/{query}" : { + "get" : { + "summary" : "GET /api/dashboard/{id}/params/{param-key}/search/{query}", + "description" : "Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`. Optionally restrict\n these values by passing query parameters like `other-parameter=value` e.g.\n\n ;; fetch values for Dashboard 1 parameter 'abc' that contain 'Cam' and are possible when parameter 'def' is set\n ;; to 100\n GET /api/dashboard/1/params/abc/search/Cam?def=100\n\n Currently limited to first 1000 results.", "parameters" : [ { "in" : "path", "name" : "id", @@ -12590,60 +14317,13 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "map where {:moved -> }", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/metabase.collections.api.MoveDashboardQuestionCandidatesResponse" - } - } - } - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "card_ids" : { - "type" : "array", - "items" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "uniqueItems" : true - } - }, - "optional" : true - } - } - } - }, - "tags" : [ "/api/collection" ] - } - }, - "/api/dashboard/" : { - "get" : { - "summary" : "GET /api/dashboard/", - "description" : "This endpoint is currently unused by the Metabase frontend and may be out of date with the rest of the application.\n It only exists for backwards compatibility and may be removed in the future.\n\n Get `Dashboards`. With filter option `f` (default `all`), restrict results as follows:\n * `all` - Return all Dashboards.\n * `mine` - Return Dashboards created by the current user.\n * `archived` - Return Dashboards that have been archived. (By default, these are *excluded*.)", - "parameters" : [ { - "in" : "query", - "name" : "f", - "required" : false, + }, { + "in" : "path", + "name" : "query", + "required" : true, "schema" : { "type" : "string", - "enum" : [ "all", "mine", "archived" ] + "minLength" : 1 } } ], "responses" : { @@ -12651,74 +14331,29 @@ "description" : "Successful response" }, "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/dashboard" ] - }, - "post" : { - "summary" : "POST /api/dashboard/", - "description" : "Create a new Dashboard.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "description" : { - "type" : "string" - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "parameters" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" - } - }, - "required" : [ "name" ] - } - } + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, "tags" : [ "/api/dashboard" ] } }, - "/api/dashboard/embeddable" : { + "/api/dashboard/{id}/params/{param-key}/values" : { "get" : { - "summary" : "GET /api/dashboard/embeddable", - "description" : "Fetch a list of Dashboards where `enable_embedding` is `true`. The dashboards can be embedded using the embedding\n endpoints and a signed JWT.", - "parameters" : [ ], + "summary" : "GET /api/dashboard/{id}/params/{param-key}/values", + "description" : "Fetch possible values of the parameter whose ID is `:param-key`. If the values come directly from a query, optionally\n restrict these values by passing query parameters like `other-parameter=value` e.g.\n\n ;; fetch values for Dashboard 1 parameter 'abc' that are possible when parameter 'def' is set to 100\n GET /api/dashboard/1/params/abc/values?def=100", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -12733,29 +14368,24 @@ "tags" : [ "/api/dashboard" ] } }, - "/api/dashboard/params/valid-filter-fields" : { + "/api/dashboard/{id}/query_metadata" : { "get" : { - "summary" : "GET /api/dashboard/params/valid-filter-fields", - "description" : "Utility endpoint for powering Dashboard UI. Given some set of `filtered` Field IDs (presumably Fields used in\n parameters) and a set of `filtering` Field IDs that will be used to restrict values of `filtered` Fields, for each\n `filtered` Field ID return the subset of `filtering` Field IDs that would actually be used in a chain filter query\n with these Fields.\n\n e.g. in a chain filter query like\n\n GET /api/dashboard/10/params/PARAM_1/values?PARAM_2=100\n\n Assume `PARAM_1` maps to Field 1 and `PARAM_2` maps to Fields 2 and 3. The underlying MBQL query may or may not\n filter against Fields 2 and 3, depending on whether an FK relationship that lets us create a join against Field 1\n can be found. You can use this endpoint to determine which of those Fields is actually used:\n\n GET /api/dashboard/params/valid-filter-fields?filtered=1&filtering=2&filtering=3\n ;; ->\n {1 [2 3]}\n\n Results are returned as a map of\n\n `filtered` Field ID -> subset of `filtering` Field IDs that would be used in chain filter query", + "summary" : "GET /api/dashboard/{id}/query_metadata", + "description" : "Get all of the required query metadata for the cards on dashboard.", "parameters" : [ { - "in" : "query", - "name" : "filtered", + "in" : "path", + "name" : "id", "required" : true, "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.field" - } - } - }, { - "in" : "query", - "name" : "filtering", - "required" : false, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.field" - } + "anyOf" : [ { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, { + "description" : "String must be a valid 21-character NanoID string.", + "type" : "string", + "pattern" : "^[A-Za-z0-9_\\-]{21}$" + } ] } } ], "responses" : { @@ -12772,32 +14402,90 @@ "tags" : [ "/api/dashboard" ] } }, - "/api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : { - "post" : { - "summary" : "POST /api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query", - "description" : "Run a pivot table query for a specific DashCard.", + "/api/dashboard/{id}/related" : { + "get" : { + "summary" : "GET /api/dashboard/{id}/related", + "description" : "Return related entities.", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", "minimum" : 1 }, "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "dashcard-id", - "required" : true, + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/dashboard" ] + } + }, + "/api/database/" : { + "get" : { + "summary" : "GET /api/database/", + "description" : "Fetch all `Databases`.\n\n * `include=tables` means we should hydrate the Tables belonging to each DB. Default: `false`.\n\n * `saved` means we should include the saved questions virtual database. Default: `false`.\n\n * `include_editable_data_model` will only include DBs for which the current user has data model editing\n permissions. (If `include=tables`, this also applies to the list of tables in each DB). Should only be used if\n Enterprise Edition code is available the advanced-permissions feature is enabled.\n\n * `exclude_uneditable_details` will only include DBs for which the current user can edit the DB details. Has no\n effect unless Enterprise Edition code is available and the advanced-permissions feature is enabled.\n\n * `include_only_uploadable` will only include DBs into which Metabase can insert new data.\n\n Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in\n [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for\n `:model/Database` in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user\n lacks permission to change the database details.", + "parameters" : [ { + "in" : "query", + "name" : "include", + "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 + "const" : "tables" }, - "description" : "value must be an integer greater than zero." + "description" : "include must be either empty or the value 'tables'" }, { - "in" : "path", - "name" : "card-id", - "required" : true, + "in" : "query", + "name" : "include_analytics", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "saved", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "exclude_uneditable_details", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_only_uploadable", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "router_database_id", + "required" : false, "schema" : { "type" : "integer", "minimum" : 1 @@ -12815,43 +14503,83 @@ "description" : "Server error response" } }, + "tags" : [ "/api/database" ] + }, + "post" : { + "summary" : "POST /api/database/", + "description" : "Add a new `Database`.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, "requestBody" : { "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "parameters" : { - "type" : "array", - "items" : { - "description" : "value must be a parameter map with an 'id' key", - "allOf" : [ { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "id" ] - }, { - "type" : "object", - "additionalProperties" : { } - } ] - } + "provider_name" : { + "type" : "string" + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "is_on_demand" : { + "type" : "boolean", + "default" : false + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "engine" : { + "description" : "value must be a valid database engine.", + "type" : "string", + "minLength" : 1 + }, + "details" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "is_full_sync" : { + "type" : "boolean", + "default" : true + }, + "connection_source" : { + "type" : "string", + "enum" : [ "admin", "setup" ], + "default" : "admin" + }, + "auto_run_queries" : { + "type" : "boolean" + }, + "schedules" : { + "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap" } - } + }, + "required" : [ "name", "engine", "details" ] } } } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/public" : { - "get" : { - "summary" : "GET /api/dashboard/public", - "description" : "Fetch a list of Dashboards with public UUIDs. These dashboards are publicly-accessible *if* public sharing is\n enabled.", + "/api/database/sample_database" : { + "post" : { + "summary" : "POST /api/database/sample_database", + "description" : "Add the sample database as a new `Database`.", "parameters" : [ ], "responses" : { "2XX" : { @@ -12864,13 +14592,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/save" : { + "/api/database/validate" : { "post" : { - "summary" : "POST /api/dashboard/save", - "description" : "Save a denormalized description of dashboard.", + "summary" : "POST /api/database/validate", + "description" : "Validate that we can connect to a database given a set of details.", "parameters" : [ ], "responses" : { "2XX" : { @@ -12883,22 +14611,71 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "details" : { + "type" : "object", + "properties" : { + "details" : { + "type" : "object", + "properties" : { } + }, + "engine" : { + "description" : "value must be a valid database engine.", + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "engine", "details" ] + } + }, + "required" : [ "details" ] + } + } + } + }, + "tags" : [ "/api/database" ] } }, - "/api/dashboard/save/collection/{parent-collection-id}" : { - "post" : { - "summary" : "POST /api/dashboard/save/collection/{parent-collection-id}", - "description" : "Save a denormalized description of dashboard into collection with ID `:parent-collection-id`.", + "/api/database/{id}" : { + "get" : { + "summary" : "GET /api/database/{id}", + "description" : "Get a single Database with `id`. Optionally pass `?include=tables` or `?include=tables.fields` to include the Tables\n belonging to this database, or the Tables and Fields, respectively. If the requestor has write permissions for the\n DB\n (i.e. is an admin or has data model permissions), then certain inferred secret values will also be included in the\n returned details (see [[metabase.secrets.models.secret/expand-db-details-inferred-secret-values]] for full details).\n\n Passing include_editable_data_model will only return tables for which the current user has data model editing\n permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present.\n In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID\n and tables, with no additional metadata.\n\n Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in\n [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for `:model/Database`\n in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user lacks permission to change the\n database details.", "parameters" : [ { "in" : "path", - "name" : "parent-collection-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", "minimum" : 1 }, "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "tables", "tables.fields" ] + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "exclude_uneditable_details", + "required" : false, + "schema" : { + "type" : "boolean" + } } ], "responses" : { "2XX" : { @@ -12911,34 +14688,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] - } - }, - "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : { - "post" : { - "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query", - "description" : "Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it.", + "tags" : [ "/api/database" ] + }, + "put" : { + "summary" : "PUT /api/database/{id}", + "description" : "Update a `Database`.", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "dashcard-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "card-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -12963,53 +14720,92 @@ "schema" : { "type" : "object", "properties" : { - "dashboard_load_id" : { + "points_of_interest" : { + "type" : "string" + }, + "provider_name" : { + "type" : "string" + }, + "settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "name" : { "type" : "string", "minLength" : 1 }, - "parameters" : { - "type" : "array", - "items" : { - "description" : "value must be a parameter map with an 'id' key", - "allOf" : [ { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "id" ] - }, { - "type" : "object", - "additionalProperties" : { } - } ] - } + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "engine" : { + "description" : "value must be a valid database engine.", + "type" : "string", + "minLength" : 1 + }, + "details" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "auto_run_queries" : { + "type" : "boolean" + }, + "caveats" : { + "type" : "string" + }, + "refingerprint" : { + "type" : "boolean" + }, + "schedules" : { + "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap" + }, + "description" : { + "type" : "string" } } } } } }, - "tags" : [ "/api/dashboard" ] - } - }, - "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}" : { - "post" : { - "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}", - "description" : "Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it, and return\n its results as a file in the specified format.\n\n `parameters` should be passed as query parameter encoded as a serialized JSON string (this is because this endpoint\n is normally used to power 'Download Results' buttons that use HTML `form` actions).", + "tags" : [ "/api/database" ] + }, + "delete" : { + "summary" : "DELETE /api/database/{id}", + "description" : "Delete a `Database`.", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", "minimum" : 1 }, "description" : "value must be an integer greater than zero." - }, { + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/autocomplete_suggestions" : { + "get" : { + "summary" : "GET /api/database/{id}/autocomplete_suggestions", + "description" : "Return a list of autocomplete suggestions for a given `prefix`, or `substring`. Should only specify one, but\n `substring` will have priority if both are present.\n\n This is intended for use with the ACE Editor when the User is typing raw SQL. Suggestions include matching `Tables`\n and `Fields` in this `Database`.\n\n Tables are returned in the format `[table_name \"Table\"]`;\n When Fields have a semantic_type, they are returned in the format `[field_name \"table_name base_type semantic_type\"]`\n When Fields lack a semantic_type, they are returned in the format `[field_name \"table_name base_type\"]`", + "parameters" : [ { "in" : "path", - "name" : "dashcard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -13017,20 +14813,20 @@ }, "description" : "value must be an integer greater than zero." }, { - "in" : "path", - "name" : "card-id", - "required" : true, + "in" : "query", + "name" : "prefix", + "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "minLength" : 1 + } }, { - "in" : "path", - "name" : "export-format", - "required" : true, + "in" : "query", + "name" : "substring", + "required" : false, "schema" : { - "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" + "type" : "string", + "minLength" : 1 } } ], "responses" : { @@ -13044,69 +14840,16 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "format_rows" : { - "default" : false, - "type" : "boolean" - }, - "parameters" : { - "anyOf" : [ { - "type" : "array", - "items" : { - "description" : "value must be a parameter map with an 'id' key", - "allOf" : [ { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "id" ] - }, { - "type" : "object", - "additionalProperties" : { } - } ] - } - }, { - "description" : "value must be a valid JSON string.", - "type" : "string" - } ] - }, - "pivot_results" : { - "default" : false, - "type" : "boolean" - } - }, - "required" : [ "format_rows", "pivot_results" ] - } - } - } - }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute" : { + "/api/database/{id}/card_autocomplete_suggestions" : { "get" : { - "summary" : "GET /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute", - "description" : "Fetches the values for filling in execution parameters. Pass PK parameters and values to select.", + "summary" : "GET /api/database/{id}/card_autocomplete_suggestions", + "description" : "Return a list of `Card` autocomplete suggestions for a given `query` in a given `Database`.\n\n This is intended for use with the ACE Editor when the User is typing in a template tag for a `Card`, e.g. .", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "dashcard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -13115,12 +14858,19 @@ "description" : "value must be an integer greater than zero." }, { "in" : "query", - "name" : "parameters", + "name" : "query", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1 + } + }, { + "in" : "query", + "name" : "include_dashboard_questions", "required" : false, "schema" : { - "type" : "string" - }, - "description" : "value must be a valid JSON string." + "type" : "boolean" + } } ], "responses" : { "2XX" : { @@ -13133,23 +14883,44 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] - }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/discard_values" : { "post" : { - "summary" : "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute", - "description" : "Execute the associated Action in the context of a `Dashboard` and `DashboardCard` that includes it.\n\n `parameters` should be the mapped dashboard parameters with values.\n `extra_parameters` should be the extra, user entered parameter values.", + "summary" : "POST /api/database/{id}/discard_values", + "description" : "Discards all saved field values for this `Database`.", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", "minimum" : 1 }, "description" : "value must be an integer greater than zero." - }, { + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/dismiss_spinner" : { + "post" : { + "summary" : "POST /api/database/{id}/dismiss_spinner", + "description" : "Manually set the initial sync status of the `Database` and corresponding\n tables to be `complete` (see #20863)", + "parameters" : [ { "in" : "path", - "name" : "dashcard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -13168,31 +14939,16 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "parameters" : { - "type" : "object", - "additionalProperties" : { } - } - } - } - } - } - }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{dashboard-id}/public_link" : { - "post" : { - "summary" : "POST /api/dashboard/{dashboard-id}/public_link", - "description" : "Generate publicly-accessible links for this Dashboard. Returns UUID to be used in public links. (If this\n Dashboard has already been shared, it will return the existing public link rather than creating a new one.) Public\n sharing must be enabled.", + "/api/database/{id}/fields" : { + "get" : { + "summary" : "GET /api/database/{id}/fields", + "description" : "Get a list of all `Fields` in `Database`.", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -13211,14 +14967,16 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] - }, - "delete" : { - "summary" : "DELETE /api/dashboard/{dashboard-id}/public_link", - "description" : "Delete the publicly-accessible link to this Dashboard.", + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/healthcheck" : { + "get" : { + "summary" : "GET /api/database/{id}/healthcheck", + "description" : "Reports whether the database can currently connect", "parameters" : [ { "in" : "path", - "name" : "dashboard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -13237,16 +14995,16 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{from-dashboard-id}/copy" : { - "post" : { - "summary" : "POST /api/dashboard/{from-dashboard-id}/copy", - "description" : "Copy a Dashboard.", + "/api/database/{id}/idfields" : { + "get" : { + "summary" : "GET /api/database/{id}/idfields", + "description" : "Get a list of all primary key `Fields` for `Database`.", "parameters" : [ { "in" : "path", - "name" : "from-dashboard-id", + "name" : "id", "required" : true, "schema" : { "type" : "integer", @@ -13265,60 +15023,53 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "description" : { - "type" : "string" - }, - "is_deep_copy" : { - "type" : "boolean", - "default" : false - }, - "name" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ ] - } - } - } - }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}" : { + "/api/database/{id}/metadata" : { "get" : { - "summary" : "GET /api/dashboard/{id}", - "description" : "Get Dashboard with ID.", + "summary" : "GET /api/database/{id}/metadata", + "description" : "Get metadata about a `Database`, including all of its `Tables` and `Fields`. Returns DB, fields, and field values.\n By default only non-hidden tables and fields are returned. Passing include_hidden=true includes them.\n\n Passing include_editable_data_model will only return tables for which the current user has data model editing\n permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present.\n In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID\n and tables, with no additional metadata.", "parameters" : [ { "in" : "path", "name" : "id", "required" : true, "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_hidden", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "remove_inactive", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "skip_fields", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false } } ], "responses" : { @@ -13332,11 +15083,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] - }, - "delete" : { - "summary" : "DELETE /api/dashboard/{id}", - "description" : "Hard delete a Dashboard. To soft delete, use `PUT /api/dashboard/:id`\n\n This will remove also any questions/models/segments/metrics that use this database.", + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/rescan_values" : { + "post" : { + "summary" : "POST /api/database/{id}/rescan_values", + "description" : "Trigger a manual scan of the field values for this `Database`.", "parameters" : [ { "in" : "path", "name" : "id", @@ -13358,11 +15111,57 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] - }, - "put" : { - "summary" : "PUT /api/dashboard/{id}", - "description" : "Update a Dashboard, and optionally the `dashcards` and `tabs` of a Dashboard. The request body should be a JSON object with the same\n structure as the response from `GET /api/dashboard/:id`.", + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/schema/" : { + "get" : { + "summary" : "GET /api/database/{id}/schema/", + "description" : "Return a list of Tables for a Database whose `schema` is `nil` or an empty string.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_hidden", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/database" ] + } + }, + "/api/database/{id}/schema/{schema}" : { + "get" : { + "summary" : "GET /api/database/{id}/schema/{schema}", + "description" : "Returns a list of Tables for the given Database `id` and `schema`", "parameters" : [ { "in" : "path", "name" : "id", @@ -13372,6 +15171,22 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_hidden", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } } ], "responses" : { "2XX" : { @@ -13384,148 +15199,13 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "points_of_interest" : { - "type" : "string" - }, - "enable_embedding" : { - "type" : "boolean" - }, - "width" : { - "type" : "string", - "enum" : [ "fixed", "full" ] - }, - "show_in_getting_started" : { - "type" : "boolean" - }, - "position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "archived" : { - "type" : "boolean" - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "embedding_params" : { - "type" : "object", - "additionalProperties" : { - "type" : "string", - "enum" : [ "disabled", "enabled", "locked" ] - }, - "description" : "value must be a valid embedding params map." - }, - "tabs" : { - "description" : "value must be seq of maps in which ids are unique", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "description" : "value must be an integer.", - "type" : "integer" - }, - "name" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "id", "name" ] - } - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "caveats" : { - "type" : "string" - }, - "parameters" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameters" - }, - "dashcards" : { - "description" : "value must be seq of maps in which ids are unique", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "col" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - }, - "id" : { - "type" : "integer" - }, - "inline_parameters" : { - "type" : "array", - "items" : { - "type" : "string", - "minLength" : 1 - } - }, - "parameter_mappings" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" - }, - "row" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - }, - "series" : { - "type" : "array", - "items" : { - "type" : "object" - } - }, - "size_x" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "size_y" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "id", "size_x", "size_y", "row", "col" ] - } - }, - "description" : { - "type" : "string" - } - } - } - } - } - }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/cards" : { - "put" : { - "summary" : "PUT /api/dashboard/{id}/cards", - "description" : "(DEPRECATED -- Use the `PUT /api/dashboard/:id` endpoint instead.)\n Update `Cards` and `Tabs` on a Dashboard. Request body should have the form:\n\n {:cards [{:id ... ; DashboardCard ID\n :size_x ...\n :size_y ...\n :row ...\n :col ...\n :parameter_mappings ...\n :series [{:id 123\n ...}]}\n ...]\n :tabs [{:id ... ; DashboardTab ID\n :name ...}]}", + "/api/database/{id}/schemas" : { + "get" : { + "summary" : "GET /api/database/{id}/schemas", + "description" : "Returns a list of all the schemas with tables found for the database `id`. Excludes schemas with no tables.", "parameters" : [ { "in" : "path", "name" : "id", @@ -13535,6 +15215,22 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "include_editable_data_model", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } + }, { + "in" : "query", + "name" : "include_hidden", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : false + } } ], "responses" : { "2XX" : { @@ -13547,92 +15243,13 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "cards" : { - "description" : "value must be seq of maps in which ids are unique", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "col" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - }, - "id" : { - "type" : "integer" - }, - "inline_parameters" : { - "type" : "array", - "items" : { - "type" : "string", - "minLength" : 1 - } - }, - "parameter_mappings" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings" - }, - "row" : { - "description" : "value must be an integer greater or equal to than zero.", - "type" : "integer", - "minimum" : 0 - }, - "series" : { - "type" : "array", - "items" : { - "type" : "object" - } - }, - "size_x" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "size_y" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "id", "size_x", "size_y", "row", "col" ] - } - }, - "tabs" : { - "description" : "value must be seq of maps in which ids are unique", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "description" : "value must be an integer.", - "type" : "integer" - }, - "name" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "id", "name" ] - } - } - }, - "required" : [ "cards" ] - } - } - } - }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/items" : { + "/api/database/{id}/settings-available" : { "get" : { - "summary" : "GET /api/dashboard/{id}/items", - "description" : "Get Dashboard with ID.", + "summary" : "GET /api/database/{id}/settings-available", + "description" : "Get all database-local settings and their availability for the given database.", "parameters" : [ { "in" : "path", "name" : "id", @@ -13645,7 +15262,20 @@ } ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:settings -> to , :reasons (optional) -> , :type -> , :message -> }>}>>}", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "settings" : { + "$ref" : "#/components/schemas/metabase.warehouses.api.available-settings" + } + }, + "required" : [ "settings" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -13654,13 +15284,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/params/{param-key}/remapping" : { - "get" : { - "summary" : "GET /api/dashboard/{id}/params/{param-key}/remapping", - "description" : "Fetch the remapped value for a given value of the parameter with ID `:param-key`.\n\n ;; fetch the remapped value for Dashboard 1 parameter 'abc' for value 100\n GET /api/dashboard/1/params/abc/remapping?value=100", + "/api/database/{id}/sync_schema" : { + "post" : { + "summary" : "POST /api/database/{id}/sync_schema", + "description" : "Trigger a manual update of the schema metadata for this `Database`.", "parameters" : [ { "in" : "path", "name" : "id", @@ -13670,20 +15300,6 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "param-key", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "in" : "query", - "name" : "value", - "required" : true, - "schema" : { - "type" : "string" - } } ], "responses" : { "2XX" : { @@ -13696,13 +15312,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/params/{param-key}/search/{query}" : { + "/api/database/{id}/syncable_schemas" : { "get" : { - "summary" : "GET /api/dashboard/{id}/params/{param-key}/search/{query}", - "description" : "Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`. Optionally restrict\n these values by passing query parameters like `other-parameter=value` e.g.\n\n ;; fetch values for Dashboard 1 parameter 'abc' that contain 'Cam' and are possible when parameter 'def' is set\n ;; to 100\n GET /api/dashboard/1/params/abc/search/Cam?def=100\n\n Currently limited to first 1000 results.", + "summary" : "GET /api/database/{id}/syncable_schemas", + "description" : "Returns a list of all syncable schemas found for the database `id`.", "parameters" : [ { "in" : "path", "name" : "id", @@ -13712,14 +15328,6 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." - }, { - "in" : "path", - "name" : "query", - "required" : true, - "schema" : { - "type" : "string", - "minLength" : 1 - } } ], "responses" : { "2XX" : { @@ -13732,13 +15340,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/params/{param-key}/values" : { + "/api/database/{id}/usage_info" : { "get" : { - "summary" : "GET /api/dashboard/{id}/params/{param-key}/values", - "description" : "Fetch possible values of the parameter whose ID is `:param-key`. If the values come directly from a query, optionally\n restrict these values by passing query parameters like `other-parameter=value` e.g.\n\n ;; fetch values for Dashboard 1 parameter 'abc' that are possible when parameter 'def' is set to 100\n GET /api/dashboard/1/params/abc/values?def=100", + "summary" : "GET /api/database/{id}/usage_info", + "description" : "Get usage info for a database.\n Returns a map with keys are models and values are the number of entities that use this database.", "parameters" : [ { "in" : "path", "name" : "id", @@ -13760,29 +15368,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/query_metadata" : { + "/api/database/{virtual-db}/datasets" : { "get" : { - "summary" : "GET /api/dashboard/{id}/query_metadata", - "description" : "Get all of the required query metadata for the cards on dashboard.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "anyOf" : [ { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, { - "description" : "String must be a valid 21-character NanoID string.", - "type" : "string", - "pattern" : "^[A-Za-z0-9_\\-]{21}$" - } ] - } - } ], + "summary" : "GET /api/database/{virtual-db}/datasets", + "description" : "Returns a list of all the datasets found for the saved questions virtual database.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -13794,23 +15387,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/dashboard/{id}/related" : { + "/api/database/{virtual-db}/datasets/{schema}" : { "get" : { - "summary" : "GET /api/dashboard/{id}/related", - "description" : "Return related entities.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "summary" : "GET /api/database/{virtual-db}/datasets/{schema}", + "description" : "Returns a list of Tables for the datasets virtual database.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -13822,71 +15406,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/dashboard" ] + "tags" : [ "/api/database" ] } }, - "/api/database/" : { + "/api/database/{virtual-db}/metadata" : { "get" : { - "summary" : "GET /api/database/", - "description" : "Fetch all `Databases`.\n\n * `include=tables` means we should hydrate the Tables belonging to each DB. Default: `false`.\n\n * `saved` means we should include the saved questions virtual database. Default: `false`.\n\n * `include_editable_data_model` will only include DBs for which the current user has data model editing\n permissions. (If `include=tables`, this also applies to the list of tables in each DB). Should only be used if\n Enterprise Edition code is available the advanced-permissions feature is enabled.\n\n * `exclude_uneditable_details` will only include DBs for which the current user can edit the DB details. Has no\n effect unless Enterprise Edition code is available and the advanced-permissions feature is enabled.\n\n * `include_only_uploadable` will only include DBs into which Metabase can insert new data.\n\n Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in\n [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for `:model/Database`\n in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user lacks permission to change the\n database details.", - "parameters" : [ { - "in" : "query", - "name" : "include", - "required" : false, - "schema" : { - "const" : "tables" - }, - "description" : "include must be either empty or the value 'tables'" - }, { - "in" : "query", - "name" : "include_analytics", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "saved", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "include_editable_data_model", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "exclude_uneditable_details", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "include_only_uploadable", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "router_database_id", - "required" : false, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "summary" : "GET /api/database/{virtual-db}/metadata", + "description" : "Endpoint that provides metadata for the Saved Questions 'virtual' database. Used for fooling the frontend\n and allowing it to treat the Saved Questions virtual DB just like any other database.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -13899,10 +15426,12 @@ } }, "tags" : [ "/api/database" ] - }, - "post" : { - "summary" : "POST /api/database/", - "description" : "Add a new `Database`.", + } + }, + "/api/database/{virtual-db}/schema/{schema}" : { + "get" : { + "summary" : "GET /api/database/{virtual-db}/schema/{schema}", + "description" : "Returns a list of Tables for the saved questions virtual database.", "parameters" : [ ], "responses" : { "2XX" : { @@ -13915,66 +15444,13 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "provider_name" : { - "type" : "string" - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "is_on_demand" : { - "type" : "boolean", - "default" : false - }, - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "engine" : { - "description" : "value must be a valid database engine.", - "type" : "string", - "minLength" : 1 - }, - "details" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "is_full_sync" : { - "type" : "boolean", - "default" : true - }, - "connection_source" : { - "type" : "string", - "enum" : [ "admin", "setup" ], - "default" : "admin" - }, - "auto_run_queries" : { - "type" : "boolean" - }, - "schedules" : { - "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap" - } - }, - "required" : [ "name", "engine", "details" ] - } - } - } - }, "tags" : [ "/api/database" ] } }, - "/api/database/sample_database" : { - "post" : { - "summary" : "POST /api/database/sample_database", - "description" : "Add the sample database as a new `Database`.", + "/api/database/{virtual-db}/schemas" : { + "get" : { + "summary" : "GET /api/database/{virtual-db}/schemas", + "description" : "Returns a list of all the schemas found for the saved questions virtual database.", "parameters" : [ ], "responses" : { "2XX" : { @@ -13990,10 +15466,10 @@ "tags" : [ "/api/database" ] } }, - "/api/database/validate" : { + "/api/dataset/" : { "post" : { - "summary" : "POST /api/database/validate", - "description" : "Validate that we can connect to a database given a set of details.", + "summary" : "POST /api/dataset/", + "description" : "Execute a query and retrieve the results in the usual format. The query will not use the cache.", "parameters" : [ ], "responses" : { "2XX" : { @@ -14012,66 +15488,22 @@ "schema" : { "type" : "object", "properties" : { - "details" : { - "type" : "object", - "properties" : { - "details" : { - "type" : "object", - "properties" : { } - }, - "engine" : { - "description" : "value must be a valid database engine.", - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "engine", "details" ] + "database" : { + "type" : "integer" } - }, - "required" : [ "details" ] + } } } } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/dataset" ] } }, - "/api/database/{id}" : { - "get" : { - "summary" : "GET /api/database/{id}", - "description" : "Get a single Database with `id`. Optionally pass `?include=tables` or `?include=tables.fields` to include the Tables\n belonging to this database, or the Tables and Fields, respectively. If the requestor has write permissions for the\n DB\n (i.e. is an admin or has data model permissions), then certain inferred secret values will also be included in the\n returned details (see [[metabase.secrets.models.secret/expand-db-details-inferred-secret-values]] for full details).\n\n Passing include_editable_data_model will only return tables for which the current user has data model editing\n permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present.\n In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID\n and tables, with no additional metadata.\n\n Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in\n [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for `:model/Database`\n in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user lacks permission to change the\n database details.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "include", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "tables", "tables.fields" ] - } - }, { - "in" : "query", - "name" : "include_editable_data_model", - "required" : false, - "schema" : { - "type" : "boolean" - } - }, { - "in" : "query", - "name" : "exclude_uneditable_details", - "required" : false, - "schema" : { - "type" : "boolean" - } - } ], + "/api/dataset/native" : { + "post" : { + "summary" : "POST /api/dataset/native", + "description" : "Fetch a native version of an MBQL query.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14083,21 +15515,35 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] - }, - "put" : { - "summary" : "PUT /api/database/{id}", - "description" : "Update a `Database`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "pretty" : { + "type" : "boolean", + "default" : true + } + }, + "required" : [ "database" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] + } + }, + "/api/dataset/parameter/remapping" : { + "post" : { + "summary" : "POST /api/dataset/parameter/remapping", + "description" : "Return the remapped parameter values for cards or dashboards that are being edited.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14115,70 +15561,37 @@ "schema" : { "type" : "object", "properties" : { - "points_of_interest" : { - "type" : "string" - }, - "provider_name" : { - "type" : "string" - }, - "settings" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "engine" : { - "description" : "value must be a valid database engine.", - "type" : "string", - "minLength" : 1 - }, - "details" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "auto_run_queries" : { - "type" : "boolean" - }, - "caveats" : { - "type" : "string" - }, - "refingerprint" : { - "type" : "boolean" + "field_ids" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } }, - "schedules" : { - "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap" + "parameter" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" }, - "description" : { - "type" : "string" - } - } + "value" : { } + }, + "required" : [ "parameter", "value" ] } } } }, - "tags" : [ "/api/database" ] - }, - "delete" : { - "summary" : "DELETE /api/database/{id}", - "description" : "Delete a `Database`.", + "tags" : [ "/api/dataset" ] + } + }, + "/api/dataset/parameter/search/{query}" : { + "post" : { + "summary" : "POST /api/dataset/parameter/search/{query}", + "description" : "Return parameter values for cards or dashboards that are being edited. Expects a query string at `?query=foo`.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "query", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "minLength" : 1 + } } ], "responses" : { "2XX" : { @@ -14191,39 +15604,35 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "field_ids" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + }, + "parameter" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" + } + }, + "required" : [ "parameter" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] } }, - "/api/database/{id}/autocomplete_suggestions" : { - "get" : { - "summary" : "GET /api/database/{id}/autocomplete_suggestions", - "description" : "Return a list of autocomplete suggestions for a given `prefix`, or `substring`. Should only specify one, but\n `substring` will have priority if both are present.\n\n This is intended for use with the ACE Editor when the User is typing raw SQL. Suggestions include matching `Tables`\n and `Fields` in this `Database`.\n\n Tables are returned in the format `[table_name \"Table\"]`;\n When Fields have a semantic_type, they are returned in the format `[field_name \"table_name base_type semantic_type\"]`\n When Fields lack a semantic_type, they are returned in the format `[field_name \"table_name base_type\"]`", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "prefix", - "required" : false, - "schema" : { - "type" : "string", - "minLength" : 1 - } - }, { - "in" : "query", - "name" : "substring", - "required" : false, - "schema" : { - "type" : "string", - "minLength" : 1 - } - } ], + "/api/dataset/parameter/values" : { + "post" : { + "summary" : "POST /api/dataset/parameter/values", + "description" : "Return parameter values for cards or dashboards that are being edited.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14235,38 +15644,35 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "field_ids" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.lib.schema.id.field" + } + }, + "parameter" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" + } + }, + "required" : [ "parameter" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] } }, - "/api/database/{id}/card_autocomplete_suggestions" : { - "get" : { - "summary" : "GET /api/database/{id}/card_autocomplete_suggestions", - "description" : "Return a list of `Card` autocomplete suggestions for a given `query` in a given `Database`.\n\n This is intended for use with the ACE Editor when the User is typing in a template tag for a `Card`, e.g. .", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "query", - "required" : true, - "schema" : { - "type" : "string", - "minLength" : 1 - } - }, { - "in" : "query", - "name" : "include_dashboard_questions", - "required" : false, - "schema" : { - "type" : "boolean" - } - } ], + "/api/dataset/pivot" : { + "post" : { + "summary" : "POST /api/dataset/pivot", + "description" : "Generate a pivoted dataset for an ad-hoc query", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14278,23 +15684,31 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "database" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] } }, - "/api/database/{id}/discard_values" : { + "/api/dataset/query_metadata" : { "post" : { - "summary" : "POST /api/database/{id}/discard_values", - "description" : "Discards all saved field values for this `Database`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "summary" : "POST /api/dataset/query_metadata", + "description" : "Get all of the required query metadata for an ad-hoc query.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14306,22 +15720,37 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "database" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] } }, - "/api/database/{id}/dismiss_spinner" : { + "/api/dataset/{export-format}" : { "post" : { - "summary" : "POST /api/database/{id}/dismiss_spinner", - "description" : "Manually set the initial sync status of the `Database` and corresponding\n tables to be `complete` (see #20863)", + "summary" : "POST /api/dataset/{export-format}", + "description" : "Execute a query and download the result data as a file in the specified format.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "export-format", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" + } } ], "responses" : { "2XX" : { @@ -14334,23 +15763,43 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "format_rows" : { + "default" : false, + "type" : "boolean" + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" + }, + "query" : { + "type" : "object", + "properties" : { } + }, + "visualization_settings" : { + "default" : { }, + "type" : "object", + "properties" : { } + } + }, + "required" : [ "query", "visualization_settings", "format_rows", "pivot_results" ] + } + } + } + }, + "tags" : [ "/api/dataset" ] } }, - "/api/database/{id}/fields" : { - "get" : { - "summary" : "GET /api/database/{id}/fields", - "description" : "Get a list of all `Fields` in `Database`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "/api/ee/action-v2/execute" : { + "post" : { + "summary" : "POST /api/ee/action-v2/execute", + "description" : "Execute an action with a single input.\n\n Takes:\n - `action` - an identifier or an expression for what we want to execute.\n - `scope` - where the action is being invoked from.\n - `input` - a single map. currently these are typically a database table row pk, or query result.\n - `params` (optional) - a map of values for the parameters taken by the action's mapping.\n\n The `input` and `params` are used by the relevant mapping to calculate a map argument to the underlying action fn.\n If there is no mapping, `params` are simply used as overrides for `input`.\n\n Returns the outputs from the performed action.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14362,23 +15811,40 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "action" : { + "$ref" : "#/components/schemas/metabase-enterprise.action-v2.api.api-action-id-or-expression" + }, + "input" : { + "type" : "object", + "properties" : { } + }, + "params" : { + "type" : "object", + "properties" : { } + }, + "scope" : { + "$ref" : "#/components/schemas/metabase.actions.types..scope.raw" + } + }, + "required" : [ "action", "scope" ] + } + } + } + }, + "tags" : [ "/api/ee/action-v2" ] } }, - "/api/database/{id}/healthcheck" : { - "get" : { - "summary" : "GET /api/database/{id}/healthcheck", - "description" : "Reports whether the database can currently connect", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "/api/ee/action-v2/execute-bulk" : { + "post" : { + "summary" : "POST /api/ee/action-v2/execute-bulk", + "description" : "Execute an action with multiple inputs.\n\n This is typically more efficient than calling execute with each input individually, for example by performing batch\n SQL operations.\n\n Takes:\n - `action` - an identifier or an expression for what we want to execute.\n - `scope` - where the action is being invoked from.\n - `inputs` - a list of maps. currently these are typically a database table row pk, or query result.\n - `params` (optional) - a map of values for the parameters taken by the action's mapping.\n\n The `inputs` and `params` are used by the relevant mapping to calculate a list of args for the underlying action fn.\n If there is no mapping, `params` are simply used as overrides for each map within `inputs`.\n\n Returns the outputs from the performed action.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14390,23 +15856,44 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] - } - }, - "/api/database/{id}/idfields" : { - "get" : { - "summary" : "GET /api/database/{id}/idfields", - "description" : "Get a list of all primary key `Fields` for `Database`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "action" : { + "$ref" : "#/components/schemas/metabase-enterprise.action-v2.api.api-action-id-or-expression" + }, + "inputs" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { } + }, + "minItems" : 1 + }, + "params" : { + "type" : "object", + "additionalProperties" : { } + }, + "scope" : { + "$ref" : "#/components/schemas/metabase.actions.types..scope.raw" + } + }, + "required" : [ "action", "scope", "inputs" ] + } + } + } + }, + "tags" : [ "/api/ee/action-v2" ] + } + }, + "/api/ee/action-v2/execute-form" : { + "post" : { + "summary" : "POST /api/ee/action-v2/execute-form", + "description" : "Temporary endpoint for describing an actions parameters\n such that they can be presented correctly in a modal ahead of execution.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14418,41 +15905,33 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/action-v2" ] } }, - "/api/database/{id}/metadata" : { + "/api/ee/advanced-permissions/application/graph" : { "get" : { - "summary" : "GET /api/database/{id}/metadata", - "description" : "Get metadata about a `Database`, including all of its `Tables` and `Fields`. Returns DB, fields, and field values.\n By default only non-hidden tables and fields are returned. Passing include_hidden=true includes them.\n\n Passing include_editable_data_model will only return tables for which the current user has data model editing\n permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present.\n In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID\n and tables, with no additional metadata.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 + "summary" : "GET /api/ee/advanced-permissions/application/graph", + "description" : "Fetch a graph of Application Permissions.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "include_hidden", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "include_editable_data_model", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - }, { + }, + "tags" : [ "/api/ee/advanced-permissions/application" ] + }, + "put" : { + "summary" : "PUT /api/ee/advanced-permissions/application/graph", + "description" : "Do a batch update of Application Permissions by passing a modified graph.", + "parameters" : [ { "in" : "query", - "name" : "remove_inactive", + "name" : "skip-graph", "required" : false, "schema" : { "type" : "boolean", @@ -14460,7 +15939,7 @@ } }, { "in" : "query", - "name" : "skip_fields", + "name" : "force", "required" : false, "schema" : { "type" : "boolean", @@ -14478,17 +15957,36 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { } + } + } + } + }, + "tags" : [ "/api/ee/advanced-permissions/application" ] } }, - "/api/database/{id}/rescan_values" : { - "post" : { - "summary" : "POST /api/database/{id}/rescan_values", - "description" : "Trigger a manual scan of the field values for this `Database`.", + "/api/ee/advanced-permissions/impersonation/" : { + "get" : { + "summary" : "GET /api/ee/advanced-permissions/impersonation/", + "description" : "Fetch a list of all Impersonation policies currently in effect, or a single policy if both `group_id` and `db_id`\n are provided.", "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, + "in" : "query", + "name" : "group_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "db_id", + "required" : false, "schema" : { "type" : "integer", "minimum" : 1 @@ -14506,13 +16004,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/advanced-permissions/impersonation" ] } }, - "/api/database/{id}/schema/" : { - "get" : { - "summary" : "GET /api/database/{id}/schema/", - "description" : "Return a list of Tables for a Database whose `schema` is `nil` or an empty string.", + "/api/ee/advanced-permissions/impersonation/{id}" : { + "delete" : { + "summary" : "DELETE /api/ee/advanced-permissions/impersonation/{id}", + "description" : "Delete a Connection Impersonation entry.", "parameters" : [ { "in" : "path", "name" : "id", @@ -14522,22 +16020,6 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "include_hidden", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "include_editable_data_model", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } } ], "responses" : { "2XX" : { @@ -14550,39 +16032,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/advanced-permissions/impersonation" ] } }, - "/api/database/{id}/schema/{schema}" : { - "get" : { - "summary" : "GET /api/database/{id}/schema/{schema}", - "description" : "Returns a list of Tables for the given Database `id` and `schema`", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "include_hidden", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "include_editable_data_model", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - } ], + "/api/ee/ai-entity-analysis/analyze-chart" : { + "post" : { + "summary" : "POST /api/ee/ai-entity-analysis/analyze-chart", + "description" : "Analyze a chart image using an AI vision model. This function sends the image data to a separate external AI service for analysis.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14594,39 +16051,98 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "image_base64" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "timeline_events" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "timestamp" : { + "type" : "string" + } + }, + "required" : [ "name", "timestamp" ] + } + } + }, + "required" : [ "image_base64" ] + } + } + } + }, + "tags" : [ "/api/ee/ai-entity-analysis" ] } }, - "/api/database/{id}/schemas" : { - "get" : { - "summary" : "GET /api/database/{id}/schemas", - "description" : "Returns a list of all the schemas with tables found for the database `id`. Excludes schemas with no tables.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 + "/api/ee/ai-sql-fixer/fix" : { + "post" : { + "summary" : "POST /api/ee/ai-sql-fixer/fix", + "description" : "Suggest fixes for a SQL query.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "include_editable_data_model", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - }, { - "in" : "query", - "name" : "include_hidden", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "error_message" : { + "type" : "string" + }, + "query" : { + "type" : "object", + "properties" : { + "database" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "database" ] + } + }, + "required" : [ "query", "error_message" ] + } + } } - } ], + }, + "tags" : [ "/api/ee/ai-sql-fixer" ] + } + }, + "/api/ee/ai-sql-generation/generate" : { + "post" : { + "summary" : "POST /api/ee/ai-sql-generation/generate", + "description" : "Generate a SQL query.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14638,39 +16154,38 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "database_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "prompt" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "prompt", "database_id" ] + } + } + } + }, + "tags" : [ "/api/ee/ai-sql-generation" ] } }, - "/api/database/{id}/settings-available" : { + "/api/ee/audit-app/user/audit-info" : { "get" : { - "summary" : "GET /api/database/{id}/settings-available", - "description" : "Get all database-local settings and their availability for the given database.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "summary" : "GET /api/ee/audit-app/user/audit-info", + "description" : "Gets audit info for the current user if he has permissions to access the audit collection.\n Otherwise return an empty map.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:settings -> to , :reasons (optional) -> , :type -> , :message -> }>}>>}", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "settings" : { - "$ref" : "#/components/schemas/metabase.warehouses.api.available-settings" - } - }, - "required" : [ "settings" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -14679,13 +16194,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/audit-app/user" ] } }, - "/api/database/{id}/sync_schema" : { - "post" : { - "summary" : "POST /api/database/{id}/sync_schema", - "description" : "Trigger a manual update of the schema metadata for this `Database`.", + "/api/ee/audit-app/user/{id}/subscriptions" : { + "delete" : { + "summary" : "DELETE /api/ee/audit-app/user/{id}/subscriptions", + "description" : "Delete all Alert and DashboardSubscription subscriptions for a User (i.e., so they will no longer receive them).\n Archive all Alerts and DashboardSubscriptions created by the User. Only allowed for admins or for the current user.", "parameters" : [ { "in" : "path", "name" : "id", @@ -14707,23 +16222,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/audit-app/user" ] } }, - "/api/database/{id}/syncable_schemas" : { - "get" : { - "summary" : "GET /api/database/{id}/syncable_schemas", - "description" : "Returns a list of all syncable schemas found for the database `id`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "/api/ee/autodescribe/card/summarize" : { + "post" : { + "summary" : "POST /api/ee/autodescribe/card/summarize", + "description" : "Summarize a question.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14735,13 +16241,76 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "dataset" : { + "type" : "boolean" + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping" + } + }, + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "result_metadata" : { + "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" + }, + "collection_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" + } + }, + "description" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "dataset_query", "display", "visualization_settings" ] + } + } + } + }, + "tags" : [ "/api/ee/autodescribe" ] } }, - "/api/database/{id}/usage_info" : { - "get" : { - "summary" : "GET /api/database/{id}/usage_info", - "description" : "Get usage info for a database.\n Returns a map with keys are models and values are the number of entities that use this database.", + "/api/ee/autodescribe/dashboard/summarize/{id}" : { + "post" : { + "summary" : "POST /api/ee/autodescribe/dashboard/summarize/{id}", + "description" : "Provide a summary of a dashboard.", "parameters" : [ { "in" : "path", "name" : "id", @@ -14763,13 +16332,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/autodescribe" ] } }, - "/api/database/{virtual-db}/datasets" : { + "/api/ee/billing/" : { "get" : { - "summary" : "GET /api/database/{virtual-db}/datasets", - "description" : "Returns a list of all the datasets found for the saved questions virtual database.", + "summary" : "GET /api/ee/billing/", + "description" : "Get billing information. This acts as a proxy between `metabase-billing-info-url` and the client,\n using the embedding token and signed in user's email to fetch the billing information.", "parameters" : [ ], "responses" : { "2XX" : { @@ -14782,14 +16351,22 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/billing" ] } }, - "/api/database/{virtual-db}/datasets/{schema}" : { - "get" : { - "summary" : "GET /api/database/{virtual-db}/datasets/{schema}", - "description" : "Returns a list of Tables for the datasets virtual database.", - "parameters" : [ ], + "/api/ee/cloud-add-ons/{product-type}" : { + "post" : { + "summary" : "POST /api/ee/cloud-add-ons/{product-type}", + "description" : "Purchase an add-on.", + "parameters" : [ { + "in" : "path", + "name" : "product-type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "metabase-ai" ] + } + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14801,14 +16378,46 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "terms_of_service" : { + "type" : "boolean" + } + }, + "required" : [ "terms_of_service" ] + } + } + } + }, + "tags" : [ "/api/ee/cloud-add-ons" ] } }, - "/api/database/{virtual-db}/metadata" : { + "/api/ee/comment/" : { "get" : { - "summary" : "GET /api/database/{virtual-db}/metadata", - "description" : "Endpoint that provides metadata for the Saved Questions 'virtual' database. Used for fooling the frontend\n and allowing it to treat the Saved Questions virtual DB just like any other database.", - "parameters" : [ ], + "summary" : "GET /api/ee/comment/", + "description" : "Get comments for an entity", + "parameters" : [ { + "in" : "query", + "name" : "target_type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "document" ] + } + }, { + "in" : "query", + "name" : "target_id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14816,17 +16425,15 @@ "4XX" : { "description" : "Client error response" }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/database" ] - } - }, - "/api/database/{virtual-db}/schema/{schema}" : { - "get" : { - "summary" : "GET /api/database/{virtual-db}/schema/{schema}", - "description" : "Returns a list of Tables for the saved questions virtual database.", + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/comment" ] + }, + "post" : { + "summary" : "POST /api/ee/comment/", + "description" : "Create a new comment", "parameters" : [ ], "responses" : { "2XX" : { @@ -14839,13 +16446,48 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "child_target_id" : { + "type" : "string" + }, + "content" : { + "type" : "object" + }, + "html" : { + "type" : "string" + }, + "parent_comment_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "target_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "target_type" : { + "type" : "string", + "enum" : [ "document" ] + } + }, + "required" : [ "target_type", "target_id", "content", "html" ] + } + } + } + }, + "tags" : [ "/api/ee/comment" ] } }, - "/api/database/{virtual-db}/schemas" : { + "/api/ee/comment/mentions" : { "get" : { - "summary" : "GET /api/database/{virtual-db}/schemas", - "description" : "Returns a list of all the schemas found for the saved questions virtual database.", + "summary" : "GET /api/ee/comment/mentions", + "description" : "Get a list of entities suitable for mentions. NOTE: only users for now.", "parameters" : [ ], "responses" : { "2XX" : { @@ -14858,14 +16500,23 @@ "description" : "Server error response" } }, - "tags" : [ "/api/database" ] + "tags" : [ "/api/ee/comment" ] } }, - "/api/dataset/" : { - "post" : { - "summary" : "POST /api/dataset/", - "description" : "Execute a query and retrieve the results in the usual format. The query will not use the cache.", - "parameters" : [ ], + "/api/ee/comment/{comment-id}" : { + "put" : { + "summary" : "PUT /api/ee/comment/{comment-id}", + "description" : "Update a comment", + "parameters" : [ { + "in" : "path", + "name" : "comment-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14883,22 +16534,63 @@ "schema" : { "type" : "object", "properties" : { - "database" : { - "type" : "integer" + "content" : { + "type" : "object" + }, + "html" : { + "type" : "string" + }, + "is_resolved" : { + "type" : "boolean" } } } } } }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/comment" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/comment/{comment-id}", + "description" : "Soft delete a comment", + "parameters" : [ { + "in" : "path", + "name" : "comment-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/comment" ] } }, - "/api/dataset/native" : { + "/api/ee/comment/{comment-id}/reaction" : { "post" : { - "summary" : "POST /api/dataset/native", - "description" : "Fetch a native version of an MBQL query.", - "parameters" : [ ], + "summary" : "POST /api/ee/comment/{comment-id}/reaction", + "description" : "Toggle a reaction on a comment", + "parameters" : [ { + "in" : "path", + "name" : "comment-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -14916,28 +16608,24 @@ "schema" : { "type" : "object", "properties" : { - "database" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "pretty" : { - "type" : "boolean", - "default" : true + "emoji" : { + "type" : "string", + "minLength" : 1, + "maxLength" : 10 } }, - "required" : [ "database" ] + "required" : [ "emoji" ] } } } }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/comment" ] } }, - "/api/dataset/parameter/remapping" : { - "post" : { - "summary" : "POST /api/dataset/parameter/remapping", - "description" : "Return the remapped parameter values for cards or dashboards that are being edited.", + "/api/ee/content-translation/csv" : { + "get" : { + "summary" : "GET /api/ee/content-translation/csv", + "description" : "Provides content translation dictionary in CSV", "parameters" : [ ], "responses" : { "2XX" : { @@ -14950,42 +16638,19 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "field_ids" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.field" - } - }, - "parameter" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" - }, - "value" : { } - }, - "required" : [ "parameter", "value" ] - } - } - } - }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/content-translation" ] } }, - "/api/dataset/parameter/search/{query}" : { - "post" : { - "summary" : "POST /api/dataset/parameter/search/{query}", - "description" : "Return parameter values for cards or dashboards that are being edited. Expects a query string at `?query=foo`.", + "/api/ee/content-translation/dictionary/{token}" : { + "get" : { + "summary" : "GET /api/ee/content-translation/dictionary/{token}", + "description" : "Fetch the content translation dictionary via a JSON Web Token signed with the `embedding-secret-key`.", "parameters" : [ { "in" : "path", - "name" : "query", + "name" : "token", "required" : true, "schema" : { - "type" : "string", - "minLength" : 1 + "type" : "string" } } ], "responses" : { @@ -14999,34 +16664,13 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "field_ids" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.field" - } - }, - "parameter" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" - } - }, - "required" : [ "parameter" ] - } - } - } - }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/content-translation" ] } }, - "/api/dataset/parameter/values" : { + "/api/ee/content-translation/upload-dictionary" : { "post" : { - "summary" : "POST /api/dataset/parameter/values", - "description" : "Return parameter values for cards or dashboards that are being edited.", + "summary" : "POST /api/ee/content-translation/upload-dictionary", + "description" : "Upload a CSV of content translations", "parameters" : [ ], "responses" : { "2XX" : { @@ -15041,33 +16685,43 @@ }, "requestBody" : { "content" : { - "application/json" : { + "multipart/form-data" : { "schema" : { "type" : "object", "properties" : { - "field_ids" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.lib.schema.id.field" - } - }, - "parameter" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" + "file" : { + "type" : "object", + "properties" : { + "filename" : { + "type" : "string" + }, + "tempfile" : { } + }, + "required" : [ "filename", "tempfile" ] } }, - "required" : [ "parameter" ] + "required" : [ "file" ] } } } }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/content-translation" ] } }, - "/api/dataset/pivot" : { + "/api/ee/database-replication/connection/{database-id}" : { "post" : { - "summary" : "POST /api/dataset/pivot", - "description" : "Generate a pivoted dataset for an ad-hoc query", - "parameters" : [ ], + "summary" : "POST /api/ee/database-replication/connection/{database-id}", + "description" : "Create a new PG replication connection for the specified database.", + "parameters" : [ { + "in" : "path", + "name" : "database-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15085,25 +16739,39 @@ "schema" : { "type" : "object", "properties" : { - "database" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "replicationSchemaFilters" : { + "type" : "object", + "properties" : { + "schema-filters-patterns" : { + "type" : "string" + }, + "schema-filters-type" : { + "type" : "string", + "enum" : [ "inclusion", "exclusion", "all" ] + } + }, + "required" : [ "schema-filters-type", "schema-filters-patterns" ] } - }, - "required" : [ "database" ] + } } } } }, - "tags" : [ "/api/dataset" ] - } - }, - "/api/dataset/query_metadata" : { - "post" : { - "summary" : "POST /api/dataset/query_metadata", - "description" : "Get all of the required query metadata for an ad-hoc query.", - "parameters" : [ ], + "tags" : [ "/api/ee/database-replication" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/database-replication/connection/{database-id}", + "description" : "Delete PG replication connection for the specified database.", + "parameters" : [ { + "in" : "path", + "name" : "database-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15115,37 +16783,22 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "database" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "database" ] - } - } - } - }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/database-replication" ] } }, - "/api/dataset/{export-format}" : { + "/api/ee/database-replication/connection/{database-id}/preview" : { "post" : { - "summary" : "POST /api/dataset/{export-format}", - "description" : "Execute a query and download the result data as a file in the specified format.", + "summary" : "POST /api/ee/database-replication/connection/{database-id}/preview", + "description" : "Return info about pg-replication connection that is about to be created.", "parameters" : [ { "in" : "path", - "name" : "export-format", + "name" : "database-id", "required" : true, "schema" : { - "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" - } + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." } ], "responses" : { "2XX" : { @@ -15164,37 +16817,39 @@ "schema" : { "type" : "object", "properties" : { - "format_rows" : { - "default" : false, - "type" : "boolean" - }, - "pivot_results" : { - "default" : false, - "type" : "boolean" - }, - "query" : { - "type" : "object", - "properties" : { } - }, - "visualization_settings" : { - "default" : { }, + "replicationSchemaFilters" : { "type" : "object", - "properties" : { } + "properties" : { + "schema-filters-patterns" : { + "type" : "string" + }, + "schema-filters-type" : { + "type" : "string", + "enum" : [ "inclusion", "exclusion", "all" ] + } + }, + "required" : [ "schema-filters-type", "schema-filters-patterns" ] } - }, - "required" : [ "query", "visualization_settings", "format_rows", "pivot_results" ] + } } } } }, - "tags" : [ "/api/dataset" ] + "tags" : [ "/api/ee/database-replication" ] } }, - "/api/ee/action-v2/execute" : { + "/api/ee/database-routing/destination-database" : { "post" : { - "summary" : "POST /api/ee/action-v2/execute", - "description" : "Execute an action with a single input.\n\n Takes:\n - `action` - an identifier or an expression for what we want to execute.\n - `scope` - where the action is being invoked from.\n - `input` - a single map. currently these are typically a database table row pk, or query result.\n - `params` (optional) - a map of values for the parameters taken by the action's mapping.\n\n The `input` and `params` are used by the relevant mapping to calculate a map argument to the underlying action fn.\n If there is no mapping, `params` are simply used as overrides for `input`.\n\n Returns the outputs from the performed action.", - "parameters" : [ ], + "summary" : "POST /api/ee/database-routing/destination-database", + "description" : "Create new Destination Databases.\n\n Note that unlike the normal `POST /api/database` endpoint, does NOT check the details before adding the Database.\n\n This is OK, it's not an invariant that all database details are always valid, but it's something to note.", + "parameters" : [ { + "in" : "query", + "name" : "check_connection_details", + "required" : false, + "schema" : { + "type" : "boolean" + } + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15212,34 +16867,52 @@ "schema" : { "type" : "object", "properties" : { - "action" : { - "$ref" : "#/components/schemas/metabase-enterprise.action-v2.api.api-action-id-or-expression" - }, - "input" : { - "type" : "object", - "properties" : { } - }, - "params" : { - "type" : "object", - "properties" : { } + "destinations" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "details" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "name" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "name", "details" ] + } }, - "scope" : { - "$ref" : "#/components/schemas/metabase.actions.types..scope.raw" + "router_database_id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 } }, - "required" : [ "action", "scope" ] + "required" : [ "router_database_id", "destinations" ] } } } }, - "tags" : [ "/api/ee/action-v2" ] + "tags" : [ "/api/ee/database-routing" ] } }, - "/api/ee/action-v2/execute-bulk" : { - "post" : { - "summary" : "POST /api/ee/action-v2/execute-bulk", - "description" : "Execute an action with multiple inputs.\n\n This is typically more efficient than calling execute with each input individually, for example by performing batch\n SQL operations.\n\n Takes:\n - `action` - an identifier or an expression for what we want to execute.\n - `scope` - where the action is being invoked from.\n - `inputs` - a list of maps. currently these are typically a database table row pk, or query result.\n - `params` (optional) - a map of values for the parameters taken by the action's mapping.\n\n The `inputs` and `params` are used by the relevant mapping to calculate a list of args for the underlying action fn.\n If there is no mapping, `params` are simply used as overrides for each map within `inputs`.\n\n Returns the outputs from the performed action.", - "parameters" : [ ], + "/api/ee/database-routing/router-database/{id}" : { + "put" : { + "summary" : "PUT /api/ee/database-routing/router-database/{id}", + "description" : "Updates an existing Database with the `user_attribute` to route on. Will either:\n - turn an existing Database into a Router database\n - change the `user_attribute` used to route for an existing Router database, or\n - turn a Router database into a regular Database\n depending on the value of `user_attribute`", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15257,37 +16930,22 @@ "schema" : { "type" : "object", "properties" : { - "action" : { - "$ref" : "#/components/schemas/metabase-enterprise.action-v2.api.api-action-id-or-expression" - }, - "inputs" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { } - }, - "minItems" : 1 - }, - "params" : { - "type" : "object", - "additionalProperties" : { } - }, - "scope" : { - "$ref" : "#/components/schemas/metabase.actions.types..scope.raw" + "user_attribute" : { + "type" : "string", + "minLength" : 1 } - }, - "required" : [ "action", "scope", "inputs" ] + } } } } }, - "tags" : [ "/api/ee/action-v2" ] + "tags" : [ "/api/ee/database-routing" ] } }, - "/api/ee/action-v2/execute-form" : { + "/api/ee/dependencies/check_card" : { "post" : { - "summary" : "POST /api/ee/action-v2/execute-form", - "description" : "Temporary endpoint for describing an actions parameters\n such that they can be presented correctly in a modal ahead of execution.", + "summary" : "POST /api/ee/dependencies/check_card", + "description" : "Check a proposed edit to a card, and return the card IDs for those cards this edit will break.", "parameters" : [ ], "responses" : { "2XX" : { @@ -15300,13 +16958,22 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/action-v2" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.card-body" + } + } + } + }, + "tags" : [ "/api/ee/dependencies" ] } }, - "/api/ee/advanced-permissions/application/graph" : { - "get" : { - "summary" : "GET /api/ee/advanced-permissions/application/graph", - "description" : "Fetch a graph of Application Permissions.", + "/api/ee/dependencies/check_snippet" : { + "post" : { + "summary" : "POST /api/ee/dependencies/check_snippet", + "description" : "Check a proposed edit to a native snippet, and return the cards, etc. which will be broken.", "parameters" : [ ], "responses" : { "2XX" : { @@ -15319,28 +16986,37 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/advanced-permissions/application" ] - }, - "put" : { - "summary" : "PUT /api/ee/advanced-permissions/application/graph", - "description" : "Do a batch update of Application Permissions by passing a modified graph.", - "parameters" : [ { - "in" : "query", - "name" : "skip-graph", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false - } - }, { - "in" : "query", - "name" : "force", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : false + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "content" : { + "type" : "string" + }, + "id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "description" : "snippet names cannot include '}' or start with spaces" + } + }, + "required" : [ "id" ] + } + } } - } ], + }, + "tags" : [ "/api/ee/dependencies" ] + } + }, + "/api/ee/dependencies/check_transform" : { + "post" : { + "summary" : "POST /api/ee/dependencies/check_transform", + "description" : "Check a proposed edit to a transform, and return the card, transform, etc. IDs for things that will break.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15356,22 +17032,21 @@ "content" : { "application/json" : { "schema" : { - "type" : "object", - "properties" : { } + "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.transform-body" } } } }, - "tags" : [ "/api/ee/advanced-permissions/application" ] + "tags" : [ "/api/ee/dependencies" ] } }, - "/api/ee/advanced-permissions/impersonation/" : { + "/api/ee/dependencies/graph" : { "get" : { - "summary" : "GET /api/ee/advanced-permissions/impersonation/", - "description" : "Fetch a list of all Impersonation policies currently in effect, or a single policy if both `group_id` and `db_id`\n are provided.", + "summary" : "GET /api/ee/dependencies/graph", + "description" : "This endpoint takes an :id and a supported entity :type, and returns a graph of all its upstream dependencies.\n The graph is represented by a list of :nodes and a list of :edges. Each node has an :id, :type, :data (which\n depends on the node type), and a map of :dependent_counts per entity type. Each edge is a :model/Dependency", "parameters" : [ { "in" : "query", - "name" : "group_id", + "name" : "id", "required" : false, "schema" : { "type" : "integer", @@ -15380,13 +17055,12 @@ "description" : "value must be an integer greater than zero." }, { "in" : "query", - "name" : "db_id", + "name" : "type", "required" : false, "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." + "type" : "string", + "enum" : [ "table", "card", "snippet", "transform", "dashboard", "document", "sandbox" ] + } } ], "responses" : { "2XX" : { @@ -15399,15 +17073,15 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/advanced-permissions/impersonation" ] + "tags" : [ "/api/ee/dependencies" ] } }, - "/api/ee/advanced-permissions/impersonation/{id}" : { - "delete" : { - "summary" : "DELETE /api/ee/advanced-permissions/impersonation/{id}", - "description" : "Delete a Connection Impersonation entry.", + "/api/ee/dependencies/graph/dependents" : { + "get" : { + "summary" : "GET /api/ee/dependencies/graph/dependents", + "description" : "This endpoint takes an :id, :type, :dependent_type, and an optional :dependent_card_type, and returns a list of\n all that entity's dependents with :dependent_type. If the :dependent_type is :card, the dependents are further\n filtered by :dependent_card_type.", "parameters" : [ { - "in" : "path", + "in" : "query", "name" : "id", "required" : true, "schema" : { @@ -15415,6 +17089,30 @@ "minimum" : 1 }, "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "table", "card", "snippet", "transform", "dashboard", "document", "sandbox" ] + } + }, { + "in" : "query", + "name" : "dependent_type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "table", "card", "snippet", "transform", "dashboard", "document", "sandbox" ] + } + }, { + "in" : "query", + "name" : "dependent_card_type", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "question", "model", "metric" ] + } } ], "responses" : { "2XX" : { @@ -15427,13 +17125,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/advanced-permissions/impersonation" ] + "tags" : [ "/api/ee/dependencies" ] } }, - "/api/ee/ai-entity-analysis/analyze-chart" : { - "post" : { - "summary" : "POST /api/ee/ai-entity-analysis/analyze-chart", - "description" : "Analyze a chart image using an AI vision model. This function sends the image data to a separate external AI service for analysis.", + "/api/ee/document/" : { + "get" : { + "summary" : "GET /api/ee/document/", + "description" : "Gets existing `Documents`.", "parameters" : [ ], "responses" : { "2XX" : { @@ -15446,52 +17144,11 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "description" : { - "type" : "string" - }, - "image_base64" : { - "type" : "string" - }, - "name" : { - "type" : "string" - }, - "timeline_events" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "description" : { - "type" : "string" - }, - "name" : { - "type" : "string" - }, - "timestamp" : { - "type" : "string" - } - }, - "required" : [ "name", "timestamp" ] - } - } - }, - "required" : [ "image_base64" ] - } - } - } - }, - "tags" : [ "/api/ee/ai-entity-analysis" ] - } - }, - "/api/ee/ai-sql-fixer/fix" : { + "tags" : [ "/api/ee/document" ] + }, "post" : { - "summary" : "POST /api/ee/ai-sql-fixer/fix", - "description" : "Suggest fixes for a SQL query.", + "summary" : "POST /api/ee/document/", + "description" : "Create a new `Document`.", "parameters" : [ ], "responses" : { "2XX" : { @@ -15510,77 +17167,129 @@ "schema" : { "type" : "object", "properties" : { - "error_message" : { - "type" : "string" - }, - "query" : { + "cards" : { "type" : "object", - "properties" : { - "database" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - } - }, - "required" : [ "database" ] - } - }, - "required" : [ "query", "error_message" ] - } - } - } - }, - "tags" : [ "/api/ee/ai-sql-fixer" ] - } - }, - "/api/ee/ai-sql-generation/generate" : { - "post" : { - "summary" : "POST /api/ee/ai-sql-generation/generate", - "description" : "Generate a SQL query.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "database_id" : { + "additionalProperties" : { + "type" : "object", + "properties" : { + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "entity_id" : { + "type" : "string", + "minLength" : 1 + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "result_metadata" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "description" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "name", "dataset_query", "display", "visualization_settings" ] + } + }, + "collection_id" : { "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 }, - "prompt" : { + "collection_position" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "document" : { }, + "name" : { "type" : "string", - "minLength" : 1 + "minLength" : 1, + "maxLength" : 254 } }, - "required" : [ "prompt", "database_id" ] + "required" : [ "name", "document" ] } } } }, - "tags" : [ "/api/ee/ai-sql-generation" ] + "tags" : [ "/api/ee/document" ] } }, - "/api/ee/audit-app/user/audit-info" : { + "/api/ee/document/public" : { "get" : { - "summary" : "GET /api/ee/audit-app/user/audit-info", - "description" : "Gets audit info for the current user if he has permissions to access the audit collection.\n Otherwise return an empty map.", + "summary" : "GET /api/ee/document/public", + "description" : "List all Documents that have public links.\n\n Returns a sequence of Documents that have been publicly shared. Each Document includes its `:id`, `:name`,\n and `:public_uuid`. Documents are only actually accessible via the public endpoint if public sharing is\n currently enabled. Archived Documents are excluded from the results.\n\n This endpoint is used to populate the public links listing in the Admin settings UI.\n\n Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "sequence of map where {:name -> , :id -> , :public_uuid -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "id" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string" + }, + "public_uuid" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "name", "id", "public_uuid" ] + } + } + } + } }, "4XX" : { "description" : "Client error response" @@ -15589,16 +17298,16 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/audit-app/user" ] + "tags" : [ "/api/ee/document" ] } }, - "/api/ee/audit-app/user/{id}/subscriptions" : { - "delete" : { - "summary" : "DELETE /api/ee/audit-app/user/{id}/subscriptions", - "description" : "Delete all Alert and DashboardSubscription subscriptions for a User (i.e., so they will no longer receive them).\n Archive all Alerts and DashboardSubscriptions created by the User. Only allowed for admins or for the current user.", + "/api/ee/document/{document-id}" : { + "get" : { + "summary" : "GET /api/ee/document/{document-id}", + "description" : "Returns an existing Document by ID.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "document-id", "required" : true, "schema" : { "type" : "integer", @@ -15617,14 +17326,21 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/audit-app/user" ] - } - }, - "/api/ee/autodescribe/card/summarize" : { - "post" : { - "summary" : "POST /api/ee/autodescribe/card/summarize", - "description" : "Summarize a question.", - "parameters" : [ ], + "tags" : [ "/api/ee/document" ] + }, + "put" : { + "summary" : "PUT /api/ee/document/{document-id}", + "description" : "Updates an existing `Document`.", + "parameters" : [ { + "in" : "path", + "name" : "document-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15642,73 +17358,102 @@ "schema" : { "type" : "object", "properties" : { - "visualization_settings" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "dataset" : { + "archived" : { "type" : "boolean" }, - "dataset_query" : { - "description" : "Value must be a map.", + "cards" : { "type" : "object", - "properties" : { } - }, - "parameter_mappings" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping" + "additionalProperties" : { + "type" : "object", + "properties" : { + "visualization_settings" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "entity_id" : { + "type" : "string", + "minLength" : 1 + }, + "dataset_query" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + }, + "parameter_mappings" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "name" : { + "type" : "string", + "minLength" : 1 + }, + "result_metadata" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "cache_ttl" : { + "description" : "value must be an integer greater than zero.", + "type" : "integer", + "minimum" : 1 + }, + "display" : { + "type" : "string", + "minLength" : 1 + }, + "parameters" : { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, + "description" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "name", "dataset_query", "display", "visualization_settings" ] } }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "result_metadata" : { - "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata" - }, "collection_id" : { "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 }, - "cache_ttl" : { + "collection_position" : { "description" : "value must be an integer greater than zero.", "type" : "integer", "minimum" : 1 }, - "display" : { - "type" : "string", - "minLength" : 1 - }, - "parameters" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabase.parameters.schema.parameter" - } - }, - "description" : { + "document" : { }, + "name" : { "type" : "string", - "minLength" : 1 + "minLength" : 1, + "maxLength" : 254 } - }, - "required" : [ "dataset_query", "display", "visualization_settings" ] + } } } } }, - "tags" : [ "/api/ee/autodescribe" ] - } - }, - "/api/ee/autodescribe/dashboard/summarize/{id}" : { - "post" : { - "summary" : "POST /api/ee/autodescribe/dashboard/summarize/{id}", - "description" : "Provide a summary of a dashboard.", + "tags" : [ "/api/ee/document" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/document/{document-id}", + "description" : "Permanently deletes an archived Document.", "parameters" : [ { "in" : "path", - "name" : "id", + "name" : "document-id", "required" : true, "schema" : { "type" : "integer", @@ -15727,109 +17472,39 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/autodescribe" ] - } - }, - "/api/ee/billing/" : { - "get" : { - "summary" : "GET /api/ee/billing/", - "description" : "Get billing information. This acts as a proxy between `metabase-billing-info-url` and the client,\n using the embedding token and signed in user's email to fetch the billing information.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/ee/billing" ] + "tags" : [ "/api/ee/document" ] } }, - "/api/ee/cloud-add-ons/{product-type}" : { + "/api/ee/document/{document-id}/card/{card-id}/query/{export-format}" : { "post" : { - "summary" : "POST /api/ee/cloud-add-ons/{product-type}", - "description" : "Purchase an add-on.", + "summary" : "POST /api/ee/document/{document-id}/card/{card-id}/query/{export-format}", + "description" : "Download query results for a Card embedded in a Document.\n\n Returns query results in the requested format. The user must have read access to the document\n to download results. If the card's query fails, standard query error responses are returned.\n\n Route parameters:\n - document-id: ID of the document containing the card\n - card-id: ID of the card to download results from\n - export-format: Output format (csv, xlsx, json)\n\n Body parameters (snake_case):\n - parameters: Optional query parameters (array of maps or JSON string)\n - format_rows: Whether to apply formatting to results (boolean, default false)\n - pivot_results: Whether to pivot results (boolean, default false)", "parameters" : [ { "in" : "path", - "name" : "product-type", + "name" : "document-id", "required" : true, "schema" : { - "type" : "string", - "enum" : [ "metabase-ai" ] - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" + "type" : "integer", + "minimum" : 1 }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "terms_of_service" : { - "type" : "boolean" - } - }, - "required" : [ "terms_of_service" ] - } - } - } - }, - "tags" : [ "/api/ee/cloud-add-ons" ] - } - }, - "/api/ee/comment/" : { - "get" : { - "summary" : "GET /api/ee/comment/", - "description" : "Get comments for an entity", - "parameters" : [ { - "in" : "query", - "name" : "target_type", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "document" ] - } + "description" : "value must be an integer greater than zero." }, { - "in" : "query", - "name" : "target_id", + "in" : "path", + "name" : "card-id", "required" : true, "schema" : { "type" : "integer", "minimum" : 1 }, "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + }, { + "in" : "path", + "name" : "export-format", + "required" : true, + "schema" : { + "type" : "string" } - }, - "tags" : [ "/api/ee/comment" ] - }, - "post" : { - "summary" : "POST /api/ee/comment/", - "description" : "Create a new comment", - "parameters" : [ ], + } ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15847,46 +17522,68 @@ "schema" : { "type" : "object", "properties" : { - "child_target_id" : { - "type" : "string" - }, - "content" : { - "type" : "object" - }, - "html" : { - "type" : "string" - }, - "parent_comment_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "format_rows" : { + "default" : false, + "type" : "boolean" }, - "target_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "parameters" : { + "anyOf" : [ { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, { + "description" : "value must be a valid JSON string.", + "type" : "string" + } ] }, - "target_type" : { - "type" : "string", - "enum" : [ "document" ] + "pivot_results" : { + "default" : false, + "type" : "boolean" } }, - "required" : [ "target_type", "target_id", "content", "html" ] + "required" : [ "format_rows", "pivot_results" ] } } } }, - "tags" : [ "/api/ee/comment" ] + "tags" : [ "/api/ee/document" ] } }, - "/api/ee/comment/mentions" : { - "get" : { - "summary" : "GET /api/ee/comment/mentions", - "description" : "Get a list of entities suitable for mentions. NOTE: only users for now.", - "parameters" : [ ], + "/api/ee/document/{document-id}/public-link" : { + "post" : { + "summary" : "POST /api/ee/document/{document-id}/public-link", + "description" : "Generate a publicly-accessible UUID for a Document.\n\n Creates a public link that allows viewing the Document without authentication. If the Document already has\n a public UUID, returns the existing one rather than generating a new one. This enables sharing the Document\n via `GET /api/ee/public/document/:uuid`.\n\n Returns a map containing `:uuid` (the public UUID string).\n\n Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting.", + "parameters" : [ { + "in" : "path", + "name" : "document-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + } ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:uuid -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "uuid" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "uuid" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -15895,16 +17592,14 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/comment" ] - } - }, - "/api/ee/comment/{comment-id}" : { - "put" : { - "summary" : "PUT /api/ee/comment/{comment-id}", - "description" : "Update a comment", + "tags" : [ "/api/ee/document" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/document/{document-id}/public-link", + "description" : "Remove the public link for a Document.\n\n Deletes the public UUID from the Document, making it no longer accessible via the public sharing endpoint.\n This revokes public access to the Document - the existing public link will no longer work.\n\n Returns a 204 No Content response on success.\n\n Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting.\n Throws a 404 if the Document doesn't exist, is archived, or doesn't have a public link.", "parameters" : [ { "in" : "path", - "name" : "comment-id", + "name" : "document-id", "required" : true, "schema" : { "type" : "integer", @@ -15923,41 +17618,96 @@ "description" : "Server error response" } }, + "tags" : [ "/api/ee/document" ] + } + }, + "/api/ee/email/override" : { + "put" : { + "summary" : "PUT /api/ee/email/override", + "description" : "Update multiple cloud email Settings. You must be a superuser or have `setting` permission to do this.\n Calling this automatically sets `cloud-smtp-enabled` to true if the settings are valid.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, "requestBody" : { "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "content" : { - "type" : "object" + "email-smtp-host-override" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "null" + } ] }, - "html" : { - "type" : "string" + "email-smtp-password-override" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "null" + } ] }, - "is_resolved" : { - "type" : "boolean" + "email-smtp-port-override" : { + "anyOf" : [ { + "type" : "integer" + }, { + "type" : "null" + } ] + }, + "email-smtp-security-override" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "null" + } ] + }, + "email-smtp-username-override" : { + "anyOf" : [ { + "type" : "string" + }, { + "type" : "null" + } ] } } } } } }, - "tags" : [ "/api/ee/comment" ] + "tags" : [ "/api/ee/email" ] }, "delete" : { - "summary" : "DELETE /api/ee/comment/{comment-id}", - "description" : "Soft delete a comment", - "parameters" : [ { - "in" : "path", - "name" : "comment-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 + "summary" : "DELETE /api/ee/email/override", + "description" : "Clear all cloud email related settings. You must be a superuser or have `setting` permission to do this.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, - "description" : "value must be an integer greater than zero." - } ], + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/email" ] + } + }, + "/api/ee/embedding-hub/checklist" : { + "get" : { + "summary" : "GET /api/ee/embedding-hub/checklist", + "description" : "Get the embedding hub checklist status, indicating which setup steps have been completed.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -15969,26 +17719,24 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/comment" ] + "tags" : [ "/api/ee/embedding-hub" ] } }, - "/api/ee/comment/{comment-id}/reaction" : { + "/api/ee/gsheets/connection" : { "post" : { - "summary" : "POST /api/ee/comment/{comment-id}/reaction", - "description" : "Toggle a reaction on a comment", - "parameters" : [ { - "in" : "path", - "name" : "comment-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "summary" : "POST /api/ee/gsheets/connection", + "description" : "Hook up a new google drive folder or sheet that will be watched and have its content ETL'd into Metabase.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:error -> , :message -> }, or one of , :created_at -> , :sync_started_at -> , :created_by_id -> , :db_id -> } | active = map where {:url -> , :created_at -> , :last_sync_at -> , :next_sync_at -> , :created_by_id -> , :db_id -> } | error = map where {:url -> , :created_at -> , :error_message -> , :created_by_id -> , :db_id -> }> dispatched by :status", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/gsheets.response" + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16003,28 +17751,32 @@ "schema" : { "type" : "object", "properties" : { - "emoji" : { + "url" : { "type" : "string", - "minLength" : 1, - "maxLength" : 10 + "minLength" : 1 } }, - "required" : [ "emoji" ] + "required" : [ "url" ] } } } }, - "tags" : [ "/api/ee/comment" ] - } - }, - "/api/ee/content-translation/csv" : { + "tags" : [ "/api/ee/gsheets" ] + }, "get" : { - "summary" : "GET /api/ee/content-translation/csv", - "description" : "Provides content translation dictionary in CSV", + "summary" : "GET /api/ee/gsheets/connection", + "description" : "Check the status of a connection. This endpoint gets polled by FE to determine when to\n stop showing the setup widget.\n\n Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:error -> , :message -> }, or one of , :created_at -> , :sync_started_at -> , :created_by_id -> , :db_id -> } | active = map where {:url -> , :created_at -> , :last_sync_at -> , :next_sync_at -> , :created_by_id -> , :db_id -> } | error = map where {:url -> , :created_at -> , :error_message -> , :created_by_id -> , :db_id -> }> dispatched by :status", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/gsheets.response" + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16033,21 +17785,12 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/content-translation" ] - } - }, - "/api/ee/content-translation/dictionary/{token}" : { - "get" : { - "summary" : "GET /api/ee/content-translation/dictionary/{token}", - "description" : "Fetch the content translation dictionary via a JSON Web Token signed with the `embedding-secret-key`.", - "parameters" : [ { - "in" : "path", - "name" : "token", - "required" : true, - "schema" : { - "type" : "string" - } - } ], + "tags" : [ "/api/ee/gsheets" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/gsheets/connection", + "description" : "Disconnect the google service account. There is only one (or zero) at the time of writing.", + "parameters" : [ ], "responses" : { "2XX" : { "description" : "Successful response" @@ -16059,13 +17802,13 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/content-translation" ] + "tags" : [ "/api/ee/gsheets" ] } }, - "/api/ee/content-translation/upload-dictionary" : { + "/api/ee/gsheets/connection/sync" : { "post" : { - "summary" : "POST /api/ee/content-translation/upload-dictionary", - "description" : "Upload a CSV of content translations", + "summary" : "POST /api/ee/gsheets/connection/sync", + "description" : "Force a sync of the connection now.\n\n Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`.", "parameters" : [ ], "responses" : { "2XX" : { @@ -16078,98 +17821,30 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "type" : "object", - "properties" : { - "file" : { - "type" : "object", - "properties" : { - "filename" : { - "type" : "string" - }, - "tempfile" : { } - }, - "required" : [ "filename", "tempfile" ] - } - }, - "required" : [ "file" ] - } - } - } - }, - "tags" : [ "/api/ee/content-translation" ] + "tags" : [ "/api/ee/gsheets" ] } }, - "/api/ee/database-replication/connection/{database-id}" : { - "post" : { - "summary" : "POST /api/ee/database-replication/connection/{database-id}", - "description" : "Create a new PG replication connection for the specified database.", - "parameters" : [ { - "in" : "path", - "name" : "database-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "/api/ee/gsheets/service-account" : { + "get" : { + "summary" : "GET /api/ee/gsheets/service-account", + "description" : "Checks to see if service-account is setup or not, delegates to HM only if we haven't set it from a metabase cluster\n before.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "replicationSchemaFilters" : { - "type" : "object", - "properties" : { - "schema-filters-patterns" : { - "type" : "string" - }, - "schema-filters-type" : { - "type" : "string", - "enum" : [ "inclusion", "exclusion", "all" ] - } - }, - "required" : [ "schema-filters-type", "schema-filters-patterns" ] - } + "description" : "map where {:email -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "email" : { + "type" : "string" + } + }, + "required" : [ ] } } } - } - }, - "tags" : [ "/api/ee/database-replication" ] - }, - "delete" : { - "summary" : "DELETE /api/ee/database-replication/connection/{database-id}", - "description" : "Delete PG replication connection for the specified database.", - "parameters" : [ { - "in" : "path", - "name" : "database-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -16178,22 +17853,22 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/database-replication" ] + "tags" : [ "/api/ee/gsheets" ] } }, - "/api/ee/database-replication/connection/{database-id}/preview" : { - "post" : { - "summary" : "POST /api/ee/database-replication/connection/{database-id}/preview", - "description" : "Return info about pg-replication connection that is about to be created.", + "/api/ee/logs/query_execution/{yyyy-mm}" : { + "get" : { + "summary" : "GET /api/ee/logs/query_execution/{yyyy-mm}", + "description" : "Fetch rows for the month specified by `:yyyy-mm` from the query_execution logs table.\n Must be a superuser.", "parameters" : [ { "in" : "path", - "name" : "database-id", + "name" : "yyyy-mm", "required" : true, "schema" : { - "type" : "integer", - "minimum" : 1 + "type" : "string", + "pattern" : "\\d{4}-\\d{2}" }, - "description" : "value must be an integer greater than zero." + "description" : "Must be a string like 2020-04 or 2222-11." } ], "responses" : { "2XX" : { @@ -16206,48 +17881,32 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "replicationSchemaFilters" : { - "type" : "object", - "properties" : { - "schema-filters-patterns" : { - "type" : "string" - }, - "schema-filters-type" : { - "type" : "string", - "enum" : [ "inclusion", "exclusion", "all" ] - } - }, - "required" : [ "schema-filters-type", "schema-filters-patterns" ] - } - } - } - } - } - }, - "tags" : [ "/api/ee/database-replication" ] + "tags" : [ "/api/ee/logs" ] } }, - "/api/ee/database-routing/destination-database" : { + "/api/ee/metabot-tools/answer-sources" : { "post" : { - "summary" : "POST /api/ee/database-routing/destination-database", - "description" : "Create new Destination Databases.\n\n Note that unlike the normal `POST /api/database` endpoint, does NOT check the details before adding the Database.\n\n This is OK, it's not an invariant that all database details are always valid, but it's something to note.", - "parameters" : [ { - "in" : "query", - "name" : "check_connection_details", - "required" : false, - "schema" : { - "type" : "boolean" - } - } ], + "summary" : "POST /api/ee/metabot-tools/answer-sources", + "description" : "Return top level meta information about available information sources.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16262,55 +17921,46 @@ "schema" : { "type" : "object", "properties" : { - "destinations" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "details" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "name" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "name", "details" ] - } + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.answer-sources-arguments" }, - "router_database_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "router_database_id", "destinations" ] + "required" : [ "conversation_id" ] } } } }, - "tags" : [ "/api/ee/database-routing" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/database-routing/router-database/{id}" : { - "put" : { - "summary" : "PUT /api/ee/database-routing/router-database/{id}", - "description" : "Updates an existing Database with the `user_attribute` to route on. Will either:\n - turn an existing Database into a Router database\n - change the `user_attribute` used to route for an existing Router database, or\n - turn a Router database into a regular Database\n depending on the value of `user_attribute`", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "/api/ee/metabot-tools/check-transform-dependencies" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/check-transform-dependencies", + "description" : "Check a proposed edit to a transform and return details of cards or transforms that would be broken by the change.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16325,26 +17975,49 @@ "schema" : { "type" : "object", "properties" : { - "user_attribute" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.check-transform-dependencies-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", "type" : "string", - "minLength" : 1 + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } - } + }, + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/database-routing" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/dependencies/check_card" : { + "/api/ee/metabot-tools/create-dashboard-subscription" : { "post" : { - "summary" : "POST /api/ee/dependencies/check_card", - "description" : "Check a proposed edit to a card, and return the card IDs for those cards this edit will break.", + "summary" : "POST /api/ee/metabot-tools/create-dashboard-subscription", + "description" : "Create a dashboard subscription.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:output -> , :conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "output" : { + "type" : "string" + } + }, + "required" : [ "output", "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16357,22 +18030,48 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.card-body" + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.create-dashboard-subscription-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/dependencies" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/dependencies/check_snippet" : { + "/api/ee/metabot-tools/field-values" : { "post" : { - "summary" : "POST /api/ee/dependencies/check_snippet", - "description" : "Check a proposed edit to a native snippet, and return the cards, etc. which will be broken.", + "summary" : "POST /api/ee/metabot-tools/field-values", + "description" : "Return statistics and/or values for a given field of a given entity.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16387,34 +18086,46 @@ "schema" : { "type" : "object", "properties" : { - "content" : { - "type" : "string" - }, - "id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field-values-arguments" }, - "name" : { - "description" : "snippet names cannot include '}' or start with spaces" + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "id" ] + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/dependencies" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/dependencies/check_transform" : { + "/api/ee/metabot-tools/filter-records" : { "post" : { - "summary" : "POST /api/ee/dependencies/check_transform", - "description" : "Check a proposed edit to a transform, and return the card, transform, etc. IDs for things that will break.", + "summary" : "POST /api/ee/metabot-tools/filter-records", + "description" : "Construct a query from a metric.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16427,110 +18138,48 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.transform-body" + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.filter-records-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/dependencies" ] - } - }, - "/api/ee/dependencies/graph" : { - "get" : { - "summary" : "GET /api/ee/dependencies/graph", - "description" : "TODO: This endpoint is supposed to take an :id and :type of an entity (currently :table, :card, :snippet,\n or :transform) and return the entity with all its upstream and downstream dependencies that should be fetched\n recursively. :edges match our :model/Dependency format. Each node in :nodes has :id, :type, and :data, and :data\n depends on the node type. For :table, there should be :display_name. For :card, there should be :name\n and :type. For :snippet -> :name. For :transform -> :name.", - "parameters" : [ { - "in" : "query", - "name" : "id", - "required" : false, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "type", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "table", "card", "snippet", "transform" ] - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/ee/dependencies" ] - } - }, - "/api/ee/dependencies/graph/dependents" : { - "get" : { - "summary" : "GET /api/ee/dependencies/graph/dependents", - "description" : "TODO: This endpoint is supposed to take an :id and :type of an entity (currently :table, :card, :snippet,\n or :transform) and return the entity with all its upstream and downstream dependencies that should be fetched\n recursively. :edges match our :model/Dependency format. Each node in :nodes has :id, :type, and :data, and :data\n depends on the node type. For :table, there should be :display_name. For :card, there should be :name\n and :type. For :snippet -> :name. For :transform -> :name.", - "parameters" : [ { - "in" : "query", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - }, { - "in" : "query", - "name" : "type", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "table", "card", "snippet", "transform" ] - } - }, { - "in" : "query", - "name" : "dependent_type", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "table", "card", "snippet", "transform" ] - } - }, { - "in" : "query", - "name" : "dependent_card_type", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "question", "model", "metric" ] - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/ee/dependencies" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/document/" : { - "get" : { - "summary" : "GET /api/ee/document/", - "description" : "Gets existing `Documents`.", + "/api/ee/metabot-tools/find-outliers" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/find-outliers", + "description" : "Find outliers in the values provided by a data source for a given column.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16539,15 +18188,61 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/document" ] - }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.find-outliers-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/generate-insights" : { "post" : { - "summary" : "POST /api/ee/document/", - "description" : "Create a new `Document`.", + "summary" : "POST /api/ee/metabot-tools/generate-insights", + "description" : "Generate insights.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:output -> , :reactions -> , :url -> }>, :conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "output" : { + "type" : "string" + }, + "reactions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabot.reaction.redirect" + } + } + }, + "required" : [ "output", "reactions", "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16562,112 +18257,46 @@ "schema" : { "type" : "object", "properties" : { - "cards" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "properties" : { - "visualization_settings" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "entity_id" : { - "type" : "string", - "minLength" : 1 - }, - "dataset_query" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "parameter_mappings" : { - "type" : "array", - "items" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "result_metadata" : { - "type" : "array", - "items" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "display" : { - "type" : "string", - "minLength" : 1 - }, - "parameters" : { - "type" : "array", - "items" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "description" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "name", "dataset_query", "display", "visualization_settings" ] - } - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.generate-insights-arguments" }, - "document" : { }, - "name" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", "type" : "string", - "minLength" : 1, - "maxLength" : 254 + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "name", "document" ] + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/document" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/document/{document-id}" : { - "get" : { - "summary" : "GET /api/ee/document/{document-id}", - "description" : "Returns an existing Document by ID.", - "parameters" : [ { - "in" : "path", - "name" : "document-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], + "/api/ee/metabot-tools/get-current-user" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-current-user", + "description" : "Get information about user that started the conversation.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16676,24 +18305,101 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/document" ] - }, - "put" : { - "summary" : "PUT /api/ee/document/{document-id}", - "description" : "Updates an existing `Document`.", - "parameters" : [ { - "in" : "path", - "name" : "document-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.tool-request" + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-dashboard-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-dashboard-details", + "description" : "Get information about a given dashboard.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, - "description" : "value must be an integer greater than zero." - } ], + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "type" : "object", + "properties" : { + "dashboard_id" : { + "type" : "integer" + } + }, + "required" : [ "dashboard_id" ] + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-document-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-document-details", + "description" : "Get information about a given report.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16708,131 +18414,46 @@ "schema" : { "type" : "object", "properties" : { - "archived" : { - "type" : "boolean" - }, - "cards" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "properties" : { - "visualization_settings" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "entity_id" : { - "type" : "string", - "minLength" : 1 - }, - "dataset_query" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - }, - "parameter_mappings" : { - "type" : "array", - "items" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "name" : { - "type" : "string", - "minLength" : 1 - }, - "result_metadata" : { - "type" : "array", - "items" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "cache_ttl" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "display" : { - "type" : "string", - "minLength" : 1 - }, - "parameters" : { - "type" : "array", - "items" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "description" : { - "type" : "string", - "minLength" : 1 - } - }, - "required" : [ "name", "dataset_query", "display", "visualization_settings" ] - } - }, - "collection_id" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 - }, - "collection_position" : { - "description" : "value must be an integer greater than zero.", - "type" : "integer", - "minimum" : 1 + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-document-details-arguments" }, - "document" : { }, - "name" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", "type" : "string", - "minLength" : 1, - "maxLength" : 254 + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } - } + }, + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/document" ] - }, - "delete" : { - "summary" : "DELETE /api/ee/document/{document-id}", - "description" : "Permanently deletes an archived Document.", - "parameters" : [ { - "in" : "path", - "name" : "document-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - }, - "description" : "value must be an integer greater than zero." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/ee/document" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/email/override" : { - "put" : { - "summary" : "PUT /api/ee/email/override", - "description" : "Update multiple cloud email Settings. You must be a superuser or have `setting` permission to do this.\n Calling this automatically sets `cloud-smtp-enabled` to true if the settings are valid.", + "/api/ee/metabot-tools/get-metric-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-metric-details", + "description" : "Get information about a given metric.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16847,55 +18468,46 @@ "schema" : { "type" : "object", "properties" : { - "email-smtp-host-override" : { - "anyOf" : [ { - "type" : "string" - }, { - "type" : "null" - } ] - }, - "email-smtp-password-override" : { - "anyOf" : [ { - "type" : "string" - }, { - "type" : "null" - } ] - }, - "email-smtp-port-override" : { - "anyOf" : [ { - "type" : "integer" - }, { - "type" : "null" - } ] - }, - "email-smtp-security-override" : { - "anyOf" : [ { - "type" : "string" - }, { - "type" : "null" - } ] + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-metric-details-arguments" }, - "email-smtp-username-override" : { - "anyOf" : [ { - "type" : "string" - }, { - "type" : "null" - } ] + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } - } + }, + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/email" ] - }, - "delete" : { - "summary" : "DELETE /api/ee/email/override", - "description" : "Clear all cloud email related settings. You must be a superuser or have `setting` permission to do this.", + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-query-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-query-details", + "description" : "Get information about a given query.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16904,17 +18516,59 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/email" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "type" : "object", + "properties" : { + "query" : { + "type" : "object", + "properties" : { } + } + }, + "required" : [ "query" ] + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/embedding-hub/checklist" : { - "get" : { - "summary" : "GET /api/ee/embedding-hub/checklist", - "description" : "Get the embedding hub checklist status, indicating which setup steps have been completed.", + "/api/ee/metabot-tools/get-report-details" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-report-details", + "description" : "Get information about a given report.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -16923,21 +18577,53 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/embedding-hub" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-report-details-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/gsheets/connection" : { + "/api/ee/metabot-tools/get-snippet-details" : { "post" : { - "summary" : "POST /api/ee/gsheets/connection", - "description" : "Hook up a new google drive folder or sheet that will be watched and have its content ETL'd into Metabase.", + "summary" : "POST /api/ee/metabot-tools/get-snippet-details", + "description" : "Get the content of a single SQL snippet.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:error -> , :message -> }, or one of , :created_at -> , :sync_started_at -> , :created_by_id -> , :db_id -> } | active = map where {:url -> , :created_at -> , :last_sync_at -> , :next_sync_at -> , :created_by_id -> , :db_id -> } | error = map where {:url -> , :created_at -> , :error_message -> , :created_by_id -> , :db_id -> }> dispatched by :status", + "description" : "Schema for SQL snippet detail results", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/gsheets.response" + "description" : "Schema for SQL snippet detail results", + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "structured_output" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.full-snippet" + } + }, + "required" : [ "structured_output", "conversation_id" ] } } } @@ -16955,29 +18641,50 @@ "schema" : { "type" : "object", "properties" : { - "url" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-snippet-details-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", "type" : "string", - "minLength" : 1 + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "url" ] + "required" : [ "arguments", "conversation_id" ] } } } }, - "tags" : [ "/api/ee/gsheets" ] - }, - "get" : { - "summary" : "GET /api/ee/gsheets/connection", - "description" : "Check the status of a connection. This endpoint gets polled by FE to determine when to\n stop showing the setup widget.\n\n Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`.", + "tags" : [ "/api/ee/metabot-tools" ] + } + }, + "/api/ee/metabot-tools/get-snippets" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-snippets", + "description" : "Get a list of all known SQL snippets.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:error -> , :message -> }, or one of , :created_at -> , :sync_started_at -> , :created_by_id -> , :db_id -> } | active = map where {:url -> , :created_at -> , :last_sync_at -> , :next_sync_at -> , :created_by_id -> , :db_id -> } | error = map where {:url -> , :created_at -> , :error_message -> , :created_by_id -> , :db_id -> }> dispatched by :status", + "description" : "Schema for SQL snippet list results", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/gsheets.response" + "description" : "Schema for SQL snippet list results", + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "structured_output" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.basic-snippet" + } + } + }, + "required" : [ "structured_output", "conversation_id" ] } } } @@ -16989,34 +18696,41 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/gsheets" ] - }, - "delete" : { - "summary" : "DELETE /api/ee/gsheets/connection", - "description" : "Disconnect the google service account. There is only one (or zero) at the time of writing.", - "parameters" : [ ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.tool-request" + } + } } }, - "tags" : [ "/api/ee/gsheets" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/gsheets/connection/sync" : { + "/api/ee/metabot-tools/get-table-details" : { "post" : { - "summary" : "POST /api/ee/gsheets/connection/sync", - "description" : "Force a sync of the connection now.\n\n Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`.", + "summary" : "POST /api/ee/metabot-tools/get-table-details", + "description" : "Get information about a given table or model.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:conversation_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -17025,27 +18739,49 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/gsheets" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-table-details-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } + } + }, + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/gsheets/service-account" : { - "get" : { - "summary" : "GET /api/ee/gsheets/service-account", - "description" : "Checks to see if service-account is setup or not, delegates to HM only if we haven't set it from a metabase cluster\n before.", + "/api/ee/metabot-tools/get-tables" : { + "post" : { + "summary" : "POST /api/ee/metabot-tools/get-tables", + "description" : "Get information about the tables in a given database.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:email -> }", + "description" : "map where {:conversation_id -> }", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "email" : { - "type" : "string" + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ ] + "required" : [ "conversation_id" ] } } } @@ -17057,41 +18793,33 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/gsheets" ] - } - }, - "/api/ee/logs/query_execution/{yyyy-mm}" : { - "get" : { - "summary" : "GET /api/ee/logs/query_execution/{yyyy-mm}", - "description" : "Fetch rows for the month specified by `:yyyy-mm` from the query_execution logs table.\n Must be a superuser.", - "parameters" : [ { - "in" : "path", - "name" : "yyyy-mm", - "required" : true, - "schema" : { - "type" : "string", - "pattern" : "\\d{4}-\\d{2}" - }, - "description" : "Must be a string like 2020-04 or 2222-11." - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-tables-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "arguments", "conversation_id" ] + } + } } }, - "tags" : [ "/api/ee/logs" ] + "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/answer-sources" : { + "/api/ee/metabot-tools/get-transform-details" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/answer-sources", - "description" : "Return top level meta information about available information sources.", + "summary" : "POST /api/ee/metabot-tools/get-transform-details", + "description" : "Get information about a transform.", "parameters" : [ ], "responses" : { "2XX" : { @@ -17126,7 +18854,7 @@ "type" : "object", "properties" : { "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.answer-sources-arguments" + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-transform-details-arguments" }, "conversation_id" : { "description" : "value must be a valid UUID.", @@ -17134,7 +18862,7 @@ "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "conversation_id" ] + "required" : [ "arguments", "conversation_id" ] } } } @@ -17142,14 +18870,14 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/create-dashboard-subscription" : { + "/api/ee/metabot-tools/get-transform-python-library-details" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/create-dashboard-subscription", - "description" : "Create a dashboard subscription.", + "summary" : "POST /api/ee/metabot-tools/get-transform-python-library-details", + "description" : "Get information about a Python library by path.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:output -> , :conversation_id -> }", + "description" : "map where {:conversation_id -> }", "content" : { "application/json" : { "schema" : { @@ -17158,13 +18886,10 @@ "conversation_id" : { "description" : "value must be a valid UUID.", "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - }, - "output" : { - "type" : "string" + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "output", "conversation_id" ] + "required" : [ "conversation_id" ] } } } @@ -17183,7 +18908,7 @@ "type" : "object", "properties" : { "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.create-dashboard-subscription-arguments" + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-transform-python-library-details-arguments" }, "conversation_id" : { "description" : "value must be a valid UUID.", @@ -17199,10 +18924,10 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/field-values" : { + "/api/ee/metabot-tools/get-transforms" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/field-values", - "description" : "Return statistics and/or values for a given field of a given entity.", + "summary" : "POST /api/ee/metabot-tools/get-transforms", + "description" : "Get a list of all known transforms.", "parameters" : [ ], "responses" : { "2XX" : { @@ -17234,18 +18959,7 @@ "content" : { "application/json" : { "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.field-values-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "arguments", "conversation_id" ] + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.tool-request" } } } @@ -17253,10 +18967,10 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/filter-records" : { + "/api/ee/metabot-tools/query-datasource" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/filter-records", - "description" : "Construct a query from a metric.", + "summary" : "POST /api/ee/metabot-tools/query-datasource", + "description" : "Construct a query from a model or table data source.", "parameters" : [ ], "responses" : { "2XX" : { @@ -17291,7 +19005,7 @@ "type" : "object", "properties" : { "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.filter-records-arguments" + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-datasource-arguments" }, "conversation_id" : { "description" : "value must be a valid UUID.", @@ -17307,10 +19021,10 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/find-outliers" : { + "/api/ee/metabot-tools/query-metric" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/find-outliers", - "description" : "Find outliers in the values provided by a data source for a given column.", + "summary" : "POST /api/ee/metabot-tools/query-metric", + "description" : "Construct a query from a metric.", "parameters" : [ ], "responses" : { "2XX" : { @@ -17345,7 +19059,7 @@ "type" : "object", "properties" : { "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.find-outliers-arguments" + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-metric-arguments" }, "conversation_id" : { "description" : "value must be a valid UUID.", @@ -17361,14 +19075,14 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/generate-insights" : { + "/api/ee/metabot-tools/query-model" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/generate-insights", - "description" : "Generate insights.", + "summary" : "POST /api/ee/metabot-tools/query-model", + "description" : "Construct a query from a model.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:output -> , :reactions -> , :url -> }>, :conversation_id -> }", + "description" : "map where {:conversation_id -> }", "content" : { "application/json" : { "schema" : { @@ -17378,18 +19092,9 @@ "description" : "value must be a valid UUID.", "type" : "string", "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - }, - "output" : { - "type" : "string" - }, - "reactions" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/metabot.reaction.redirect" - } } }, - "required" : [ "output", "reactions", "conversation_id" ] + "required" : [ "conversation_id" ] } } } @@ -17408,7 +19113,7 @@ "type" : "object", "properties" : { "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.generate-insights-arguments" + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-model-arguments" }, "conversation_id" : { "description" : "value must be a valid UUID.", @@ -17424,10 +19129,10 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/get-current-user" : { + "/api/ee/metabot-tools/search" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/get-current-user", - "description" : "Get information about user that started the conversation.", + "summary" : "POST /api/ee/metabot-tools/search", + "description" : "Enhanced search with term and semantic queries using Reciprocal Rank Fusion.", "parameters" : [ ], "responses" : { "2XX" : { @@ -17459,7 +19164,18 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.tool-request" + "type" : "object", + "properties" : { + "arguments" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.search-arguments" + }, + "conversation_id" : { + "description" : "value must be a valid UUID.", + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "required" : [ "conversation_id" ] } } } @@ -17467,10 +19183,10 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/get-dashboard-details" : { + "/api/ee/metabot-tools/search_v2" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/get-dashboard-details", - "description" : "Get information about a given dashboard.", + "summary" : "POST /api/ee/metabot-tools/search_v2", + "description" : "Enhanced search with term and semantic queries using Reciprocal Rank Fusion. This is identical to /search, but\n duplicated in order to add a new capability to AI service that indicates that Metabot can search transforms. The\n /search endpoint is kept around for backward compatibility.", "parameters" : [ ], "responses" : { "2XX" : { @@ -17505,13 +19221,7 @@ "type" : "object", "properties" : { "arguments" : { - "type" : "object", - "properties" : { - "dashboard_id" : { - "type" : "integer" - } - }, - "required" : [ "dashboard_id" ] + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.search-arguments" }, "conversation_id" : { "description" : "value must be a valid UUID.", @@ -17519,7 +19229,7 @@ "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" } }, - "required" : [ "arguments", "conversation_id" ] + "required" : [ "conversation_id" ] } } } @@ -17527,29 +19237,14 @@ "tags" : [ "/api/ee/metabot-tools" ] } }, - "/api/ee/metabot-tools/get-document-details" : { + "/api/ee/metabot-v3/agent-streaming" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/get-document-details", - "description" : "Get information about a given report.", + "summary" : "POST /api/ee/metabot-v3/agent-streaming", + "description" : "Send a chat message to the LLM via the AI Proxy.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17564,46 +19259,48 @@ "schema" : { "type" : "object", "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-document-details-arguments" + "context" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.context.context" }, "conversation_id" : { "description" : "value must be a valid UUID.", "type" : "string", "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "history" : { + "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.client.schema.messages" + }, + "message" : { + "type" : "string", + "minLength" : 1 + }, + "metabot_id" : { + "type" : "string" + }, + "profile_id" : { + "type" : "string" + }, + "state" : { + "type" : "object", + "properties" : { } } }, - "required" : [ "arguments", "conversation_id" ] + "required" : [ "message", "context", "conversation_id", "state" ] } } } }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/metabot-v3" ] } }, - "/api/ee/metabot-tools/get-metric-details" : { + "/api/ee/metabot-v3/document/generate-content" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/get-metric-details", - "description" : "Get information about a given metric.", + "summary" : "POST /api/ee/metabot-v3/document/generate-content", + "description" : "Create a new piece of content to insert into the document.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17618,46 +19315,113 @@ "schema" : { "type" : "object", "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-metric-details-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", + "instructions" : { "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + "minLength" : 1 + }, + "references" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } } }, - "required" : [ "arguments", "conversation_id" ] + "required" : [ "instructions" ] } } } }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/metabot-v3/document" ] } }, - "/api/ee/metabot-tools/get-query-details" : { + "/api/ee/metabot-v3/feedback" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/get-query-details", - "description" : "Get information about a given query.", + "summary" : "POST /api/ee/metabot-v3/feedback", + "description" : "Proxy Metabot feedback to Harbormaster, adding the premium embedding token.", + "parameters" : [ ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { } + } + } + } + }, + "tags" : [ "/api/ee/metabot-v3" ] + } + }, + "/api/ee/metabot-v3/metabot/" : { + "get" : { + "summary" : "GET /api/ee/metabot-v3/metabot/", + "description" : "List configured metabot instances", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + } + }, + "/api/ee/metabot-v3/metabot/{id}" : { + "get" : { + "summary" : "GET /api/ee/metabot-v3/metabot/{id}", + "description" : "Retrieve one metabot instance", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + }, + "put" : { + "summary" : "PUT /api/ee/metabot-v3/metabot/{id}", + "description" : "Update a metabot instance", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17672,53 +19436,61 @@ "schema" : { "type" : "object", "properties" : { - "arguments" : { - "type" : "object", - "properties" : { - "query" : { - "type" : "object", - "properties" : { } - } - }, - "required" : [ "query" ] + "collection_id" : { + "type" : "integer", + "minimum" : 1 }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + "use_verified_content" : { + "type" : "boolean" } }, - "required" : [ "arguments", "conversation_id" ] + "additionalProperties" : false } } } }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/metabot-v3/metabot" ] } }, - "/api/ee/metabot-tools/get-report-details" : { - "post" : { - "summary" : "POST /api/ee/metabot-tools/get-report-details", - "description" : "Get information about a given report.", - "parameters" : [ ], + "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions" : { + "get" : { + "summary" : "GET /api/ee/metabot-v3/metabot/{id}/prompt-suggestions", + "description" : "Return the prompt suggestions for the metabot instance with `id`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + }, { + "in" : "query", + "name" : "sample", + "required" : false, + "schema" : { + "type" : "boolean" + } + }, { + "in" : "query", + "name" : "model", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "metric", "model" ] + } + }, { + "in" : "query", + "name" : "model_id", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17727,52 +19499,50 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-report-details-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "arguments", "conversation_id" ] - } - } + "tags" : [ "/api/ee/metabot-v3/metabot" ] + }, + "delete" : { + "summary" : "DELETE /api/ee/metabot-v3/metabot/{id}/prompt-suggestions", + "description" : "Delete all prompt suggestions for the metabot instance with `id`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/metabot-v3/metabot" ] } }, - "/api/ee/metabot-tools/get-table-details" : { + "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions/regenerate" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/get-table-details", - "description" : "Get information about a given table or model.", - "parameters" : [ ], + "summary" : "POST /api/ee/metabot-v3/metabot/{id}/prompt-suggestions/regenerate", + "description" : "Remove any existing prompt suggestions for the Metabot instance with `id` and generate new ones.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17781,49 +19551,79 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-table-details-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "arguments", "conversation_id" ] - } - } + "tags" : [ "/api/ee/metabot-v3/metabot" ] + } + }, + "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions/{prompt-id}" : { + "delete" : { + "summary" : "DELETE /api/ee/metabot-v3/metabot/{id}/prompt-suggestions/{prompt-id}", + "description" : "Delete the prompt suggestion with ID `prompt-id` for the metabot instance with `id`.", + "parameters" : [ { + "in" : "path", + "name" : "id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + }, { + "in" : "path", + "name" : "prompt-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + } ], + "responses" : { + "2XX" : { + "description" : "Successful response" + }, + "4XX" : { + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" + } + }, + "tags" : [ "/api/ee/metabot-v3/metabot" ] + } + }, + "/api/ee/permission_debug/" : { + "get" : { + "summary" : "GET /api/ee/permission_debug/", + "description" : "This endpoint expects a `user_id`, a `model_id` to debug permissions against, and `action_type`.\n The type of model we are debugging against is inferred by the `action_type`.\n\n It will return:\n - `decision`: The overall permission decision (\"allow\", \"denied\", or \"limited\")\n - `model-type`: The type of model being checked (e.g., \"question\")\n - `model-id`: The ID of the model being checked\n - `segment`: A set of segmentation types applied (e.g., \"sandboxed\", \"impersonated\", \"routed\")\n - `message`: A sequence of strings explaining the decision\n - `data`: A map containing details about permissions (table or collection names to group names)\n - `suggestions`: A map of group IDs to group names that could provide access\n\n Example requests:\n - Check if user can read a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/read`\n - Check if user can query a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/query`\n - Check if user can download data: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/download-data`\n\n Example responses:\n - Allowed access:\n ```json\n {\n \"decision\": \"allow\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User has permission to read this card\"],\n \"data\": {},\n \"suggestions\": {}\n }\n ```\n - Denied access with blocked table:\n ```json\n {\n \"decision\": \"denied\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User does not have permission to query this card\"],\n \"data\": {\"sample-db.PUBLIC.ORDERS\": [\"All Users\"]},\n \"suggestions\": {}\n }\n ```\n - Limited access:\n ```json\n {\n \"decision\": \"limited\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User has permission to download some data from this card\"],\n \"data\": {},\n \"suggestions\": {}\n }\n ```", + "parameters" : [ { + "in" : "query", + "name" : "user_id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + } + }, { + "in" : "query", + "name" : "model_id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "query", + "name" : "action_type", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "card/read", "card/query", "card/download-data" ] } - }, - "tags" : [ "/api/ee/metabot-tools" ] - } - }, - "/api/ee/metabot-tools/get-tables" : { - "post" : { - "summary" : "POST /api/ee/metabot-tools/get-tables", - "description" : "Get information about the tables in a given database.", - "parameters" : [ ], + } ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", + "description" : "map where {:model-type -> , :model-id -> , :decision -> , :segment -> , :message -> , :data -> , :suggestions -> to >}", "content" : { "application/json" : { "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] + "$ref" : "#/components/schemas/metabase-enterprise.permission-debug.impl.perm-debug-info" } } } @@ -17835,52 +19635,26 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.get-tables-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "arguments", "conversation_id" ] - } - } - } - }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/permission_debug" ] } }, - "/api/ee/metabot-tools/query-datasource" : { - "post" : { - "summary" : "POST /api/ee/metabot-tools/query-datasource", - "description" : "Construct a query from a model or table data source.", - "parameters" : [ ], + "/api/ee/public/document/{uuid}" : { + "get" : { + "summary" : "GET /api/ee/public/document/{uuid}", + "description" : "Fetch a publicly-accessible Document. Does not require auth credentials. Public sharing must be enabled.\n\n Returns a Document with sensitive fields removed (excludes collection_id, permissions, creator details, etc.).\n Includes all embedded Cards with their metadata hydrated so the frontend doesn't need to make separate\n requests for each card — just like public Dashboards do.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + } ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17889,52 +19663,43 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-datasource-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "arguments", "conversation_id" ] - } - } - } - }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/public" ] } }, - "/api/ee/metabot-tools/query-metric" : { - "post" : { - "summary" : "POST /api/ee/metabot-tools/query-metric", - "description" : "Construct a query from a metric.", - "parameters" : [ ], + "/api/ee/public/document/{uuid}/card/{card-id}" : { + "get" : { + "summary" : "GET /api/ee/public/document/{uuid}/card/{card-id}", + "description" : "Run a query for a Card that's embedded in a public Document. Doesn't require auth credentials. Public sharing must\n be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "query", + "name" : "parameters", + "required" : false, + "schema" : { + "type" : "string" + }, + "description" : "value must be a valid JSON string." + } ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -17943,52 +19708,42 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-metric-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "arguments", "conversation_id" ] - } - } - } - }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/public" ] } }, - "/api/ee/metabot-tools/query-model" : { + "/api/ee/public/document/{uuid}/card/{card-id}/{export-format}" : { "post" : { - "summary" : "POST /api/ee/metabot-tools/query-model", - "description" : "Construct a query from a model.", - "parameters" : [ ], + "summary" : "POST /api/ee/public/document/{uuid}/card/{card-id}/{export-format}", + "description" : "Fetch a Card embedded in a public Document and return query results in the specified format.\n Does not require auth credentials. Public sharing must be enabled.", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string", + "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + }, + "description" : "value must be a valid UUID." + }, { + "in" : "path", + "name" : "card-id", + "required" : true, + "schema" : { + "type" : "integer", + "minimum" : 1 + }, + "description" : "value must be an integer greater than zero." + }, { + "in" : "path", + "name" : "export-format", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format" + } + } ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } + "description" : "Successful response" }, "4XX" : { "description" : "Client error response" @@ -18003,43 +19758,57 @@ "schema" : { "type" : "object", "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.query-model-arguments" + "format_rows" : { + "default" : false, + "type" : "boolean" }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + "parameters" : { + "anyOf" : [ { + "type" : "array", + "items" : { + "description" : "Value must be a map.", + "type" : "object", + "properties" : { } + } + }, { + "description" : "value must be a valid JSON string.", + "type" : "string" + } ] + }, + "pivot_results" : { + "default" : false, + "type" : "boolean" } }, - "required" : [ "arguments", "conversation_id" ] + "required" : [ "format_rows", "pivot_results" ] } } } }, - "tags" : [ "/api/ee/metabot-tools" ] - } - }, - "/api/ee/metabot-tools/search" : { - "post" : { - "summary" : "POST /api/ee/metabot-tools/search", - "description" : "Enhanced search with term and semantic queries using Reciprocal Rank Fusion.", + "tags" : [ "/api/ee/public" ] + } + }, + "/api/ee/remote-sync/branches" : { + "get" : { + "summary" : "GET /api/ee/remote-sync/branches", + "description" : "Get list of branches from the configured source.\n\n Returns a JSON object with branch names under the :items key.\n\n Requires superuser permissions.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:conversation_id -> }", + "description" : "map where {:items -> }", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + "items" : { + "type" : "array", + "items" : { + "type" : "string" + } } }, - "required" : [ "conversation_id" ] + "required" : [ "items" ] } } } @@ -18051,37 +19820,33 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "arguments" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.tools.api.search-arguments" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - } - }, - "required" : [ "conversation_id" ] - } - } - } - }, - "tags" : [ "/api/ee/metabot-tools" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/agent-streaming" : { + "/api/ee/remote-sync/create-branch" : { "post" : { - "summary" : "POST /api/ee/metabot-v3/agent-streaming", - "description" : "Send a chat message to the LLM via the AI Proxy.", + "summary" : "POST /api/ee/remote-sync/create-branch", + "description" : "Create a new branch from the current remote-sync branch and switches the current remote-sync branch to it.\n Requires superuser permissions.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:status -> , :message -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + }, + "status" : { + "type" : "string" + } + }, + "required" : [ "status", "message" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18096,48 +19861,71 @@ "schema" : { "type" : "object", "properties" : { - "context" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.context.context" - }, - "conversation_id" : { - "description" : "value must be a valid UUID.", - "type" : "string", - "pattern" : "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" - }, - "history" : { - "$ref" : "#/components/schemas/metabase-enterprise.metabot-v3.client.schema.messages" - }, - "message" : { + "name" : { "type" : "string", "minLength" : 1 - }, - "metabot_id" : { - "type" : "string" - }, - "profile_id" : { - "type" : "string" - }, - "state" : { - "type" : "object", - "properties" : { } } }, - "required" : [ "message", "context", "conversation_id", "state" ] + "required" : [ "name" ] } } } }, - "tags" : [ "/api/ee/metabot-v3" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/document/generate-content" : { - "post" : { - "summary" : "POST /api/ee/metabot-v3/document/generate-content", - "description" : "Create a new piece of content to insert into the document.", + "/api/ee/remote-sync/current-task" : { + "get" : { + "summary" : "GET /api/ee/remote-sync/current-task", + "description" : "Get the current sync task", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "nullable map where {:id -> , :sync_task_type -> , :initiated_by (optional) -> , :progress -> , :started_at -> , :ended_at (optional) -> , :last_progress_report_at (optional) -> , :version (optional) -> , :cancelled (optional) -> , :error_message (optional) -> , :status -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "progress" : { + "type" : "number", + "minimum" : 0.0, + "maximum" : 1.0 + }, + "last_progress_report_at" : { }, + "id" : { + "type" : "integer", + "minimum" : 1 + }, + "started_at" : { }, + "ended_at" : { }, + "initiated_by" : { + "type" : "integer", + "minimum" : 1 + }, + "cancelled" : { + "type" : "boolean" + }, + "status" : { + "type" : "string", + "enum" : [ "running", "successful", "errored", "cancelled", "timed-out" ] + }, + "error_message" : { + "type" : "string" + }, + "sync_task_type" : { + "type" : "string", + "enum" : [ "import", "export" ] + }, + "version" : { + "type" : "string" + } + }, + "required" : [ "id", "sync_task_type", "started_at", "status" ], + "optional" : true + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18146,38 +19934,60 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { - "instructions" : { - "type" : "string", - "minLength" : 1 - }, - "references" : { - "description" : "Value must be a map.", - "type" : "object", - "properties" : { } - } - }, - "required" : [ "instructions" ] - } - } - } - }, - "tags" : [ "/api/ee/metabot-v3/document" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/feedback" : { + "/api/ee/remote-sync/current-task/cancel" : { "post" : { - "summary" : "POST /api/ee/metabot-v3/feedback", - "description" : "Proxy Metabot feedback to Harbormaster, adding the premium embedding token.", + "summary" : "POST /api/ee/remote-sync/current-task/cancel", + "description" : "Cancels the current task if one is running", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:id -> , :sync_task_type -> , :initiated_by (optional) -> , :progress -> , :started_at -> , :ended_at (optional) -> , :last_progress_report_at (optional) -> , :version (optional) -> , :cancelled (optional) -> , :error_message (optional) -> , :status -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "progress" : { + "type" : "number", + "minimum" : 0.0, + "maximum" : 1.0 + }, + "last_progress_report_at" : { }, + "id" : { + "type" : "integer", + "minimum" : 1 + }, + "started_at" : { }, + "ended_at" : { }, + "initiated_by" : { + "type" : "integer", + "minimum" : 1 + }, + "cancelled" : { + "type" : "boolean" + }, + "status" : { + "type" : "string", + "enum" : [ "running", "successful", "errored", "cancelled", "timed-out" ] + }, + "error_message" : { + "type" : "string" + }, + "sync_task_type" : { + "type" : "string", + "enum" : [ "import", "export" ] + }, + "version" : { + "type" : "string" + } + }, + "required" : [ "id", "sync_task_type", "started_at", "status" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18186,27 +19996,67 @@ "description" : "Server error response" } }, - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "properties" : { } - } - } - } - }, - "tags" : [ "/api/ee/metabot-v3" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/metabot/" : { + "/api/ee/remote-sync/dirty" : { "get" : { - "summary" : "GET /api/ee/metabot-v3/metabot/", - "description" : "List configured metabot instances", + "summary" : "GET /api/ee/remote-sync/dirty", + "description" : "Return all models with changes that have not been pushed to the remote sync source in any\n remote-synced collection.", "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:dirty -> , :name -> , :model -> , :sync_status -> , :created_at (optional) -> , :updated_at (optional) -> , :collection_id (optional) -> , :authority_level (optional) -> , :display (optional) -> , :query_type (optional) -> , :description (optional) -> }>}", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "dirty" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "model" : { + "type" : "string" + }, + "authority_level" : { + "type" : "string" + }, + "id" : { + "type" : "integer", + "minimum" : 1 + }, + "name" : { + "type" : "string" + }, + "updated_at" : { }, + "query_type" : { + "type" : "string" + }, + "collection_id" : { + "type" : "integer", + "minimum" : 1 + }, + "created_at" : { }, + "display" : { + "type" : "string" + }, + "sync_status" : { + "type" : "string" + }, + "description" : { + "type" : "string" + } + }, + "required" : [ "id", "model", "sync_status" ] + } + } + }, + "required" : [ "dirty" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18215,50 +20065,73 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/metabot/{id}" : { - "get" : { - "summary" : "GET /api/ee/metabot-v3/metabot/{id}", - "description" : "Retrieve one metabot instance", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - } ], + "/api/ee/remote-sync/export" : { + "post" : { + "summary" : "POST /api/ee/remote-sync/export", + "description" : "Export the current state of the Remote Sync collection to a Source.\n\n This endpoint will:\n - Fetch the latest changes from the source\n - Create a branch or subdirectory (depending on source support)\n If no branch is supplied, use the configured export branch\n - Export the Remote Sync collection via serialization to the branch or subdirectory\n - Commit the changes if possible\n - Sync to the source if possible\n\n Requires superuser permissions.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:message -> , :task_id -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + }, + "task_id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "message", "task_id" ] + } + } + } }, "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] - }, - "put" : { - "summary" : "PUT /api/ee/metabot-v3/metabot/{id}", - "description" : "Update a metabot instance", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 + "description" : "Client error response" + }, + "5XX" : { + "description" : "Server error response" } - } ], + }, + "tags" : [ "/api/ee/remote-sync" ] + } + }, + "/api/ee/remote-sync/import" : { + "post" : { + "summary" : "POST /api/ee/remote-sync/import", + "description" : "Import Metabase content from configured Remote Sync source.\n\n This endpoint will:\n - Fetch the latest changes from the configured source\n - Load the updated content using the serialization/deserialization system\n\n If `force=false` (default) and there are unsaved changes in the Remote Sync collection,\n the import returns a 400 response.\n\n Requires superuser permissions.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:status -> , :task_id -> , :message (optional) -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + }, + "status" : { + "const" : "success" + }, + "task_id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "status" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18273,86 +20146,42 @@ "schema" : { "type" : "object", "properties" : { - "collection_id" : { - "type" : "integer", - "minimum" : 1 + "branch" : { + "type" : "string", + "minLength" : 1 }, - "use_verified_content" : { + "force" : { "type" : "boolean" } - }, - "additionalProperties" : false + } } } } }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions" : { + "/api/ee/remote-sync/is-dirty" : { "get" : { - "summary" : "GET /api/ee/metabot-v3/metabot/{id}/prompt-suggestions", - "description" : "Return the prompt suggestions for the metabot instance with `id`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - }, { - "in" : "query", - "name" : "sample", - "required" : false, - "schema" : { - "type" : "boolean" - } - }, { - "in" : "query", - "name" : "model", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "metric", "model" ] - } - }, { - "in" : "query", - "name" : "model_id", - "required" : false, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" - } - }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] - }, - "delete" : { - "summary" : "DELETE /api/ee/metabot-v3/metabot/{id}/prompt-suggestions", - "description" : "Delete all prompt suggestions for the metabot instance with `id`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - } ], + "summary" : "GET /api/ee/remote-sync/is-dirty", + "description" : "Check if any remote-synced collection or collection item has local changes that have not been pushed\n to the remote sync source.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:is_dirty -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "is_dirty" : { + "type" : "boolean" + } + }, + "required" : [ "is_dirty" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18361,25 +20190,34 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions/regenerate" : { - "post" : { - "summary" : "POST /api/ee/metabot-v3/metabot/{id}/prompt-suggestions/regenerate", - "description" : "Remove any existing prompt suggestions for the Metabot instance with `id` and generate new ones.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - } ], + "/api/ee/remote-sync/settings" : { + "put" : { + "summary" : "PUT /api/ee/remote-sync/settings", + "description" : "Update Remote Sync related settings. You must be a superuser to do this.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "Successful response" + "description" : "map where {:success -> , :task_id (optional) -> }", + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "success" : { + "type" : "boolean" + }, + "task_id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "success" ] + } + } + } }, "4XX" : { "description" : "Client error response" @@ -18388,79 +20226,58 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] - } - }, - "/api/ee/metabot-v3/metabot/{id}/prompt-suggestions/{prompt-id}" : { - "delete" : { - "summary" : "DELETE /api/ee/metabot-v3/metabot/{id}/prompt-suggestions/{prompt-id}", - "description" : "Delete the prompt suggestion with ID `prompt-id` for the metabot instance with `id`.", - "parameters" : [ { - "in" : "path", - "name" : "id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - }, { - "in" : "path", - "name" : "prompt-id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - } ], - "responses" : { - "2XX" : { - "description" : "Successful response" - }, - "4XX" : { - "description" : "Client error response" - }, - "5XX" : { - "description" : "Server error response" + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "remote-sync-branch" : { + "type" : "string" + }, + "remote-sync-token" : { + "type" : "string" + }, + "remote-sync-type" : { + "type" : "string", + "enum" : [ "production", "development" ] + }, + "remote-sync-url" : { + "type" : "string" + } + } + } + } } }, - "tags" : [ "/api/ee/metabot-v3/metabot" ] + "tags" : [ "/api/ee/remote-sync" ] } }, - "/api/ee/permission_debug/" : { - "get" : { - "summary" : "GET /api/ee/permission_debug/", - "description" : "This endpoint expects a `user_id`, a `model_id` to debug permissions against, and `action_type`.\n The type of model we are debugging against is inferred by the `action_type`.\n\n It will return:\n - `decision`: The overall permission decision (\"allow\", \"denied\", or \"limited\")\n - `model-type`: The type of model being checked (e.g., \"question\")\n - `model-id`: The ID of the model being checked\n - `segment`: A set of segmentation types applied (e.g., \"sandboxed\", \"impersonated\", \"routed\")\n - `message`: A sequence of strings explaining the decision\n - `data`: A map containing details about permissions (table or collection names to group names)\n - `suggestions`: A map of group IDs to group names that could provide access\n\n Example requests:\n - Check if user can read a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/read`\n - Check if user can query a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/query`\n - Check if user can download data: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/download-data`\n\n Example responses:\n - Allowed access:\n ```json\n {\n \"decision\": \"allow\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User has permission to read this card\"],\n \"data\": {},\n \"suggestions\": {}\n }\n ```\n - Denied access with blocked table:\n ```json\n {\n \"decision\": \"denied\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User does not have permission to query this card\"],\n \"data\": {\"sample-db.PUBLIC.ORDERS\": [\"All Users\"]},\n \"suggestions\": {}\n }\n ```\n - Limited access:\n ```json\n {\n \"decision\": \"limited\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User has permission to download some data from this card\"],\n \"data\": {},\n \"suggestions\": {}\n }\n ```", - "parameters" : [ { - "in" : "query", - "name" : "user_id", - "required" : true, - "schema" : { - "type" : "integer", - "minimum" : 1 - } - }, { - "in" : "query", - "name" : "model_id", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "in" : "query", - "name" : "action_type", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ "card/read", "card/query", "card/download-data" ] - } - } ], + "/api/ee/remote-sync/stash" : { + "post" : { + "summary" : "POST /api/ee/remote-sync/stash", + "description" : "Stashes changes to a new branch, and changes the current branch to it.\n Requires superuser permissions.", + "parameters" : [ ], "responses" : { "2XX" : { - "description" : "map where {:model-type -> , :model-id -> , :decision -> , :segment -> , :message -> , :data -> , :suggestions -> to >}", + "description" : "map where {:status -> , :message -> , :task_id -> }", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/metabase-enterprise.permission-debug.impl.perm-debug-info" + "type" : "object", + "properties" : { + "message" : { + "type" : "string" + }, + "status" : { + "type" : "string" + }, + "task_id" : { + "type" : "integer", + "minimum" : 1 + } + }, + "required" : [ "status", "message", "task_id" ] } } } @@ -18472,7 +20289,27 @@ "description" : "Server error response" } }, - "tags" : [ "/api/ee/permission_debug" ] + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "type" : "object", + "properties" : { + "message" : { + "type" : "string", + "minLength" : 1 + }, + "new_branch" : { + "type" : "string", + "minLength" : 1 + } + }, + "required" : [ "new_branch", "message" ] + } + } + } + }, + "tags" : [ "/api/ee/remote-sync" ] } }, "/api/ee/scim/api_key" : { @@ -22274,7 +24111,9 @@ "schema" : { "type" : "object", "properties" : { - "attribute_remappings" : { }, + "attribute_remappings" : { + "$ref" : "#/components/schemas/metabase-enterprise.sandbox.schema.attribute-remappings" + }, "card_id" : { "description" : "value must be an integer greater than zero.", "type" : "integer", @@ -22397,7 +24236,9 @@ "schema" : { "type" : "object", "properties" : { - "attribute_remappings" : { }, + "attribute_remappings" : { + "$ref" : "#/components/schemas/metabase-enterprise.sandbox.schema.attribute-remappings" + }, "card_id" : { "description" : "value must be an integer greater than zero.", "type" : "integer", @@ -25985,7 +27826,7 @@ "/api/search/" : { "get" : { "summary" : "GET /api/search/", - "description" : "Search for items in Metabase.\n For the list of supported models, check [[metabase.search.config/all-models]].\n\n Filters:\n - `archived`: set to true to search archived items only, default is false\n - `table_db_id`: search for tables, cards, and models of a certain DB\n - `models`: only search for items of specific models. If not provided, search for all models\n - `filters_items_in_personal_collection`: only search for items in personal collections\n - `created_at`: search for items created at a specific timestamp\n - `created_by`: search for items created by a specific user\n - `last_edited_at`: search for items last edited at a specific timestamp\n - `last_edited_by`: search for items last edited by a specific user\n - `search_native_query`: set to true to search the content of native queries\n - `verified`: set to true to search for verified items only (requires Content Management or Official Collections premium feature)\n - `ids`: search for items with those ids, works iff single value passed to `models`\n - `display_type`: search for cards/models with specific display types\n - `non_temporal_dim_ids`: search for cards/metrics/datasets with this exact set of non temporal dimension field IDs (requires appdb engine)\n - `has_temporal_dim`: set to true for cards/metrics/datasets with 1 or more temporal dimensions (requires appdb engine)\n\n Note that not all item types support all filters, and the results will include only models that support the provided filters. For example:\n - The `created-by` filter supports dashboards, models, actions, and cards.\n - The `verified` filter supports models and cards.\n\n A search query that has both filters applied will only return models and cards.", + "description" : "Search for items in Metabase.\n For the list of supported models, check [[metabase.search.config/all-models]].\n\n Filters:\n - `archived`: set to true to search archived items only, default is false\n - `table_db_id`: search for tables, cards, and models of a certain DB\n - `models`: only search for items of specific models. If not provided, search for all models\n - `filters_items_in_personal_collection`: only search for items in personal collections\n - `created_at`: search for items created at a specific timestamp\n - `created_by`: search for items created by a specific user\n - `last_edited_at`: search for items last edited at a specific timestamp\n - `last_edited_by`: search for items last edited by a specific user\n - `search_native_query`: set to true to search the content of native queries\n - `verified`: set to true to search for verified items only (requires Content Management or Official Collections premium feature)\n - `ids`: search for items with those ids, works iff single value passed to `models`\n - `display_type`: search for cards/models with specific display types\n - `non_temporal_dim_ids`: search for cards/metrics/datasets with this exact set of non temporal dimension field IDs (requires appdb engine)\n - `has_temporal_dim`: set to true for cards/metrics/datasets with 1 or more temporal dimensions (requires appdb engine)\n\n Note that not all item types support all filters, and the results will include only models that support the provided\n filters. For example:\n\n - The `created-by` filter supports dashboards, models, actions, and cards.\n - The `verified` filter supports models and cards.\n\n A search query that has both filters applied will only return models and cards.", "parameters" : [ { "in" : "query", "name" : "q", @@ -28652,7 +30493,7 @@ "/api/user/" : { "get" : { "summary" : "GET /api/user/", - "description" : "Fetch a list of `Users` for admins or group managers.\n By default returns only active users for admins and only active users within groups that the group manager is managing for group managers.\n\n - If `status` is `deactivated`, include deactivated users only.\n - If `status` is `all`, include all users (active and inactive).\n - Also supports `include_deactivated`, which if true, is equivalent to `status=all`; If is false, is equivalent to `status=active`.\n `status` and `include_deactivated` requires superuser permissions.\n - `include_deactivated` is a legacy alias for `status` and will be removed in a future release, users are advised to use `status` for better support and flexibility.\n If both params are passed, `status` takes precedence.\n\n For users with segmented permissions, return only themselves.\n\n Takes `limit`, `offset` for pagination.\n Takes `query` for filtering on first name, last name, email.\n Also takes `group_id`, which filters on group id.", + "description" : "Fetch a list of `Users` for admins or group managers.\n By default returns only active users for admins and only active users within groups that the group manager is\n managing for group managers.\n\n - If `status` is `deactivated`, include deactivated users only.\n\n - If `status` is `all`, include all users (active and inactive).\n\n - Also supports `include_deactivated`, which if true, is equivalent to `status=all`; If is false, is equivalent to\n `status=active`. `status` and `include_deactivated` requires superuser permissions.\n\n - `include_deactivated` is a legacy alias for `status` and will be removed in a future release, users are advised\n to use `status` for better support and flexibility.\n\n If both params are passed, `status` takes precedence.\n\n For users with segmented permissions, return only themselves.\n\n Takes `limit`, `offset` for pagination.\n\n Takes `query` for filtering on first name, last name, email.\n\n Also takes `group_id`, which filters on group id.", "parameters" : [ { "in" : "query", "name" : "status", diff --git a/_site/docs/v0.57/configuring-metabase/environment-variables.html b/_site/docs/v0.57/configuring-metabase/environment-variables.html index 73acec73b..07c9a70f0 100644 --- a/_site/docs/v0.57/configuring-metabase/environment-variables.html +++ b/_site/docs/v0.57/configuring-metabase/environment-variables.html @@ -7349,7 +7349,7 @@

20

-

Limits the number of rows Metabase will display in tables sent with dashboard subscriptions and alerts. Range: 1-100. To limit the total number of rows included in the file attachment for an email dashboard subscription, use MB_UNAGGREGATED_QUERY_ROW_LIMIT.

+

Limits the number of rows Metabase will display in tables sent with dashboard subscriptions and alerts. Range: 1-100. To limit the total number of rows included in the file attachment for an email dashboard subscription, use MB_ATTACHMENT_ROW_LIMIT.

MB_AUDIT_MAX_RETENTION_DAYS