Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Auto-update documentation for master (#71454)

github-automation-metabasee5db491df45a
diff --git a/docs/api.json b/docs/api.json
index c93a651295f..44c9af18bfd 100644
--- a/docs/api.json
+++ b/docs/api.json
@@ -3332,6 +3332,20 @@
"required" : [ "unknown" ]
} ]
},
+ "metabase.agent-api.api.aggregation" : {
+ "description" : "Aggregation — count (field optional), field-based (field required), or measure-based.",
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.count-aggregation"
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.field-aggregation"
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.measure-aggregation"
+ } ]
+ },
+ "metabase.agent-api.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.agent-api.api.column-metadata" : {
"description" : "Metadata for a single result column.",
"type" : "object",
@@ -3364,7 +3378,7 @@
"oneOf" : [ {
"type" : "array",
"items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.filter"
+ "$ref" : "#/components/schemas/metabase.agent-api.api.filter"
}
}, {
"type" : "null"
@@ -3374,7 +3388,7 @@
"oneOf" : [ {
"type" : "array",
"items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.group-by"
+ "$ref" : "#/components/schemas/metabase.agent-api.api.group-by"
}
}, {
"type" : "null"
@@ -3420,7 +3434,7 @@
"oneOf" : [ {
"type" : "array",
"items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.aggregation"
+ "$ref" : "#/components/schemas/metabase.agent-api.api.aggregation"
}
}, {
"type" : "null"
@@ -3430,7 +3444,7 @@
"oneOf" : [ {
"type" : "array",
"items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.field"
+ "$ref" : "#/components/schemas/metabase.agent-api.api.field"
}
}, {
"type" : "null"
@@ -3440,7 +3454,7 @@
"oneOf" : [ {
"type" : "array",
"items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.filter"
+ "$ref" : "#/components/schemas/metabase.agent-api.api.filter"
}
}, {
"type" : "null"
@@ -3450,7 +3464,7 @@
"oneOf" : [ {
"type" : "array",
"items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.group-by"
+ "$ref" : "#/components/schemas/metabase.agent-api.api.group-by"
}
}, {
"type" : "null"
@@ -3470,7 +3484,7 @@
"oneOf" : [ {
"type" : "array",
"items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.order-by"
+ "$ref" : "#/components/schemas/metabase.agent-api.api.order-by"
}
}, {
"type" : "null"
@@ -3488,6 +3502,139 @@
"properties" : { }
} ]
},
+ "metabase.agent-api.api.count-aggregation" : {
+ "description" : "Count aggregation — counts rows, no field_id needed.\n Use sort_order to order results by this aggregation ('asc' or 'desc').",
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "bucket" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.bucket"
+ },
+ "function" : {
+ "const" : "count"
+ },
+ "sort_order" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "asc", "desc" ]
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "function" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
+ "metabase.agent-api.api.disjunctive-numeric-filter" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "field_id" : {
+ "type" : "string"
+ },
+ "operation" : {
+ "type" : "string",
+ "enum" : [ "equals", "not-equals" ]
+ },
+ "values" : {
+ "type" : "array",
+ "items" : {
+ "anyOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "number"
+ } ]
+ }
+ }
+ },
+ "required" : [ "field_id", "operation", "values" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
+ "metabase.agent-api.api.disjunctive-string-date-filter" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "field_id" : {
+ "type" : "string"
+ },
+ "operation" : {
+ "type" : "string",
+ "enum" : [ "equals", "not-equals", "string-contains", "string-not-contains", "string-starts-with", "string-ends-with" ]
+ },
+ "values" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }
+ },
+ "required" : [ "field_id", "operation", "values" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
+ "metabase.agent-api.api.disjunctive-temporal-extraction-filter" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "field_id" : {
+ "type" : "string"
+ },
+ "operation" : {
+ "type" : "string",
+ "enum" : [ "year-equals", "year-not-equals", "quarter-equals", "quarter-not-equals", "month-equals", "month-not-equals", "day-of-week-equals", "day-of-week-not-equals", "hour-equals", "hour-not-equals", "minute-equals", "minute-not-equals", "second-equals", "second-not-equals" ]
+ },
+ "values" : {
+ "type" : "array",
+ "items" : {
+ "type" : "integer"
+ }
+ }
+ },
+ "required" : [ "field_id", "operation", "values" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
+ "metabase.agent-api.api.disjunctive-temporal-filter" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "bucket" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.bucket"
+ },
+ "field_id" : {
+ "type" : "string"
+ },
+ "operation" : {
+ "type" : "string",
+ "enum" : [ "equals", "not-equals", "greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal" ]
+ },
+ "values" : {
+ "type" : "array",
+ "items" : {
+ "anyOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "integer"
+ } ]
+ }
+ }
+ },
+ "required" : [ "field_id", "operation", "values" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
"metabase.agent-api.api.entity-type" : {
"description" : "The type of queryable entity.",
"type" : "string",
@@ -3543,59 +3690,70 @@
},
"required" : [ "status" ]
},
- "metabase.agent-api.api.field" : {
- "description" : "A field from a table or metric. The field_id format is '<prefix><entity-id>-<field-index>' where prefix indicates the source (t=table, c=metric) and index is the position in the entity's fields.",
- "type" : "object",
- "properties" : {
- "database_type" : {
- "oneOf" : [ {
+ "metabase.agent-api.api.existence-filter" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "field_id" : {
"type" : "string"
- }, {
- "type" : "null"
- } ]
+ },
+ "operation" : {
+ "type" : "string",
+ "enum" : [ "is-null", "is-not-null", "string-is-empty", "string-is-not-empty", "is-true", "is-false" ]
+ }
},
- "description" : {
- "oneOf" : [ {
+ "required" : [ "field_id", "operation" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
+ "metabase.agent-api.api.field" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "bucket" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.bucket"
+ },
+ "field_id" : {
"type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "field_id" : {
- "type" : "string"
- },
- "field_values" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : { }
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
+ }
},
- "semantic_type" : {
- "oneOf" : [ {
+ "required" : [ "field_id" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
+ "metabase.agent-api.api.field-aggregation" : {
+ "description" : "Aggregation using a field and function. field_id is required.\n Use sort_order to order results by this aggregation ('asc' or 'desc').",
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "bucket" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.bucket"
+ },
+ "field_id" : {
"type" : "string"
- }, {
- "type" : "null"
- } ]
+ },
+ "function" : {
+ "type" : "string",
+ "enum" : [ "avg", "count-distinct", "max", "min", "sum" ]
+ },
+ "sort_order" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "asc", "desc" ]
+ }, {
+ "type" : "null"
+ } ]
+ }
},
- "type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.agent-api.api.field-type"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "field_id", "name" ]
- },
- "metabase.agent-api.api.field-type" : {
- "description" : "A data type for a field derived from Metabase's type hierarchy.",
- "type" : "string",
- "enum" : [ "boolean", "date", "datetime", "time", "number", "string" ]
+ "required" : [ "field_id", "function" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
},
"metabase.agent-api.api.field-values" : {
"description" : "Statistics and sample values for a specific field.",
@@ -3625,34 +3783,102 @@
}
}
},
- "metabase.agent-api.api.measure" : {
- "description" : "A reusable aggregation expression associated with a table. Reference via measure_id in the aggregations array.",
- "type" : "object",
- "properties" : {
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "display_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name" ]
- },
- "metabase.agent-api.api.metric" : {
+ "metabase.agent-api.api.filter" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.segment-filter"
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.existence-filter"
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.temporal-extraction-filter"
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.disjunctive-temporal-extraction-filter"
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.temporal-filter"
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.disjunctive-temporal-filter"
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.string-filter"
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.disjunctive-string-date-filter"
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.numeric-filter"
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.disjunctive-numeric-filter"
+ } ]
+ },
+ "metabase.agent-api.api.group-by" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "field_granularity" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "minute", "hour", "day", "week", "month", "quarter", "year", "day-of-week" ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "field_id" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "field_id" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
+ "metabase.agent-api.api.measure" : {
+ "description" : "A reusable aggregation expression associated with a table. Reference via measure_id in the aggregations array.",
+ "type" : "object",
+ "properties" : {
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "type" : "integer"
+ },
+ "name" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "id", "name" ]
+ },
+ "metabase.agent-api.api.measure-aggregation" : {
+ "description" : "Aggregation using a pre-defined measure.",
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "measure_id" : {
+ "type" : "integer"
+ },
+ "sort_order" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "asc", "desc" ]
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "measure_id" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
+ "metabase.agent-api.api.metric" : {
"description" : "A metric with its queryable dimensions and segments. The default_time_dimension_field_id is the field_id of the recommended time dimension for temporal breakouts.",
"type" : "object",
"properties" : {
@@ -3739,6 +3965,108 @@
},
"required" : [ "id", "type", "name" ]
},
+ "metabase.agent-api.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" ]
+ },
+ "value" : {
+ "anyOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "number"
+ } ]
+ }
+ },
+ "required" : [ "field_id", "operation", "value" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
+ "metabase.agent-api.api.order-by" : {
+ "description" : "Order by item specifying a field and sort direction.",
+ "type" : "object",
+ "properties" : {
+ "direction" : {
+ "type" : "string",
+ "enum" : [ "asc", "desc" ]
+ },
+ "field" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.field"
+ }
+ },
+ "required" : [ "field", "direction" ]
+ },
+ "metabase.agent-api.api.query-request" : {
+ "description" : "Request schema for /v1/query. Accepts construct params (table_id or metric_id) or a continuation_token.",
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "continuation_token" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "continuation_token" ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.construct-query-table-request"
+ }, {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.construct-query-metric-request"
+ } ]
+ },
+ "metabase.agent-api.api.query-response" : {
+ "description" : "Response from query execution. The HTTP status is always 202 because results are streamed —\n check the `status` field to determine success or failure.",
+ "type" : "object",
+ "properties" : {
+ "continuation_token" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "data" : {
+ "type" : "object",
+ "properties" : {
+ "cols" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.column-metadata"
+ }
+ },
+ "rows" : {
+ "type" : "array",
+ "items" : {
+ "type" : "array",
+ "items" : { }
+ }
+ }
+ },
+ "required" : [ "cols", "rows" ]
+ },
+ "error" : {
+ "type" : "string"
+ },
+ "row_count" : {
+ "type" : "integer"
+ },
+ "running_time" : {
+ "type" : "integer"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "completed", "failed" ]
+ }
+ },
+ "required" : [ "status" ]
+ },
"metabase.agent-api.api.related-table" : {
"description" : "A table related to the queried entity via foreign key. The related_by field indicates the FK field name.",
"type" : "object",
@@ -3912,6 +4240,21 @@
},
"required" : [ "id", "name" ]
},
+ "metabase.agent-api.api.segment-filter" : {
+ "description" : "Filter using a pre-defined segment.",
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "segment_id" : {
+ "type" : "integer"
+ }
+ },
+ "required" : [ "segment_id" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
"metabase.agent-api.api.statistics" : {
"description" : "Statistical summary of a field's values computed during database sync. Includes counts, percentages, numeric summaries (min/max/avg/quartiles/sd), and date ranges.",
"type" : "object",
@@ -4023,6 +4366,27 @@
}
}
},
+ "metabase.agent-api.api.string-filter" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "field_id" : {
+ "type" : "string"
+ },
+ "operation" : {
+ "type" : "string",
+ "enum" : [ "equals", "not-equals", "string-contains", "string-not-contains", "string-starts-with", "string-ends-with" ]
+ },
+ "value" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "field_id", "operation", "value" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
"metabase.agent-api.api.table" : {
"description" : "Full details of a table including its fields, related tables, metrics, and segments.",
"type" : "object",
@@ -4108,6 +4472,55 @@
},
"required" : [ "id", "type", "name", "display_name", "database_id", "database_engine", "fields" ]
},
+ "metabase.agent-api.api.temporal-extraction-filter" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "field_id" : {
+ "type" : "string"
+ },
+ "operation" : {
+ "type" : "string",
+ "enum" : [ "year-equals", "year-not-equals", "quarter-equals", "quarter-not-equals", "month-equals", "month-not-equals", "day-of-week-equals", "day-of-week-not-equals", "hour-equals", "hour-not-equals", "minute-equals", "minute-not-equals", "second-equals", "second-not-equals" ]
+ },
+ "value" : {
+ "type" : "integer"
+ }
+ },
+ "required" : [ "field_id", "operation", "value" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
+ "metabase.agent-api.api.temporal-filter" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "bucket" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.bucket"
+ },
+ "field_id" : {
+ "type" : "string"
+ },
+ "operation" : {
+ "type" : "string",
+ "enum" : [ "equals", "not-equals", "greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal" ]
+ },
+ "value" : {
+ "anyOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "integer"
+ } ]
+ }
+ },
+ "required" : [ "field_id", "operation", "value" ]
+ }, {
+ "type" : "object",
+ "properties" : { }
+ } ]
+ },
"metabase.analyze.query-results.ResultsMetadata" : {
"description" : "value must be an array of valid results column metadata maps.",
"oneOf" : [ {
@@ -5052,266 +5465,6 @@
"type" : "string",
"enum" : [ "component-crash", "chart-render-error" ]
},
- "metabase.legacy-mbql.schema.-" : {
- "description" : "schema for a valid MBQL 4 :- clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema..NativeQuery.Common" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "collection" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "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" : {
- "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" : {
- "$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"
- },
- "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" : {
- "description" : "optional map to be appended to filter clause",
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.FieldFilter.Options"
- }, {
- "type" : "null"
- } ]
- },
- "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..TemplateTag.FieldFilter.Options" : {
- "type" : "object",
- "additionalProperties" : { }
- },
- "metabase.legacy-mbql.schema..TemplateTag.RawValue" : {
- "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" : {
- "type" : "string",
- "enum" : [ "date", "number", "boolean", "text" ]
- }
- },
- "required" : [ "type", "name", "display-name" ]
- },
- "metabase.legacy-mbql.schema..TemplateTag.Snippet" : {
- "description" : "Things required by all template tag types.",
- "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.SourceFilter" : {
- "description" : "Schema for a single source-filter applied to a table template tag.",
- "type" : "object",
- "properties" : {
- "field-id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- },
- "op" : {
- "type" : "string",
- "enum" : [ "<=", ">", ">=", "!=", "=", "<" ]
- },
- "value" : { }
- },
- "required" : [ "field-id", "op", "value" ]
- },
- "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.SourceTable" : {
- "description" : "Things required by all template tag types.",
- "type" : "object",
- "properties" : {
- "display-name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "emit-alias" : {
- "type" : "boolean"
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id"
- },
- "name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "source-filters" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.SourceFilter"
- }
- },
- "table-id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.table"
- },
- "type" : {
- "const" : "table"
- }
- },
- "required" : [ "type", "name", "display-name", "table-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" : {
@@ -5628,43 +5781,6 @@
}
}
},
- "metabase.legacy-mbql.schema.Addable" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpressionArg"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DateTimeExpressionArg"
- }, {
- "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.",
- "allOf" : [ {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.aggregation-options"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.UnnamedAggregation"
- } ]
- }, {
- "description" : "Normalization should automatically unwrap :aggregation-options with an empty options map"
- } ]
- },
- "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.AggregationRefOptions" : {
"type" : "object",
"properties" : {
@@ -5690,256 +5806,8 @@
}
}
},
- "metabase.legacy-mbql.schema.Aggregations" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregation"
- },
- "minItems" : 1
- },
- "metabase.legacy-mbql.schema.AnyMBQLClause" : {
- "description" : "Schema for ANY valid MBQL clause"
- },
- "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"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.or"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.not"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema._EQ_"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema._BANG__EQ_"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema._LT_"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema._GT_"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema._LT__EQ_"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema._GT__EQ_"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.between"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.starts-with"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ends-with"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.contains"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.in"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.not-in"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.does-not-contain"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.inside"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.is-empty"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.not-empty"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.is-null"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.not-null"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.relative-time-interval"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.time-interval"
- }, {
- "$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" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.saved-questions-virtual-database"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
- } ]
- },
- "metabase.legacy-mbql.schema.DateOrDatetimeLiteral" : {
- "description" : "Schema for a valid date or datetime literal.",
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.relative-datetime"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.absolute-datetime"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.literal.datetime"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.literal.date"
- } ]
- },
- "metabase.legacy-mbql.schema.DateTimeExpressionArg" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregation"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatetimeExpression"
- }, {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DateOrDatetimeLiteral"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef"
- } ]
- } ]
- },
- "metabase.legacy-mbql.schema.DateTimeUnit" : {
- "description" : "Valid unit for *datetime* bucketing.",
- "type" : "string",
- "enum" : [ "quarter", "day", "hour", "week", "second", "default", "day-of-week", "hour-of-day", "month", "month-of-year", "day-of-month", "year", "day-of-year", "millisecond", "year-of-era", "week-of-year", "quarter-of-year", "minute-of-hour", "minute" ]
- },
- "metabase.legacy-mbql.schema.DateUnit" : {
- "description" : "Valid unit for date bucketing.",
- "type" : "string",
- "enum" : [ "quarter", "day", "week", "default", "day-of-week", "month", "month-of-year", "day-of-month", "year", "day-of-year", "year-of-era", "week-of-year", "quarter-of-year" ]
- },
- "metabase.legacy-mbql.schema.DatetimeDiffUnit" : {
- "description" : "Valid units for a datetime-diff clause.",
- "type" : "string",
- "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._PLUS_"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.datetime-add"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.datetime-subtract"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.convert-timezone"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.now"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.date"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.datetime"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.today"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.coalesce"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.case"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.if"
- } ]
- },
- "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.FieldOrExpressionRef"
- } ]
- },
- "metabase.legacy-mbql.schema.EqualityComparable" : {
- "description" : "Schema for things that make sense in a `=` or `!=` filter, i.e. things that can be compared for equality.",
- "oneOf" : [ {
- "anyOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "number"
- }, {
- "type" : "string"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemporalLiteral"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRefOrRelativeDatetime"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ExpressionArg"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value"
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "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"
- }, {
- "type" : "boolean"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.BooleanExpression"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpression"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatetimeExpression"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregation"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.aggregation"
- }, {
- "type" : "string"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.StringExpression"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value"
- }, {
- "$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.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.",
@@ -5998,59 +5866,6 @@
}
}
},
- "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.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"
- }, {
- "type" : "number"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.StringExpression"
- }, {
- "type" : "string"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.BooleanExpression"
- }, {
- "type" : "boolean"
- }, {
- "$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" : {
"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.",
"oneOf" : [ {
@@ -6143,1477 +5958,795 @@
"type" : "null"
} ]
},
- "metabase.legacy-mbql.schema.Fields" : {
- "allOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef"
- },
- "minItems" : 1
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.helpers.distinct"
- } ]
- },
- "metabase.legacy-mbql.schema.Filter" : {
- "description" : "Schema for a valid MBQL `:filter` clause.",
+ "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.DatetimeExpression"
- }, {
- "$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.value"
+ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.aggregation"
}, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.segment"
+ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.expression"
}, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef"
+ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field"
} ]
},
- "metabase.legacy-mbql.schema.IntGreaterThanZeroOrNumericExpression" : {
- "oneOf" : [ {
- "type" : "integer",
- "minimum" : 1
+ "metabase.legacy-mbql.schema.aggregation" : {
+ "description" : "schema for a valid MBQL 4 :aggregation clause",
+ "allOf" : [ ]
+ },
+ "metabase.legacy-mbql.schema.expression" : {
+ "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 MBQL 4 :field clause",
+ "allOf" : [ ]
}, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpression"
+ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.require-base-type-for-field-name"
} ]
},
- "metabase.legacy-mbql.schema.Join" : {
- "description" : "Perform the equivalent of a SQL `JOIN` with another Table or nested `:source-query`. JOINs are either explicitly\n specified in the incoming query, or implicitly generated when one uses a `:field` clause with `:source-field`.\n\n In the top-level query, you can reference Fields from the joined table or nested query by including `:source-field`\n in the `:field` options (known as implicit joins); for explicit joins, you *must* specify `:join-alias` yourself; in\n the `:field` options, e.g.\n\n ;; for joins against other Tables/MBQL source queries\n [:field 1 {:join-alias \"my_join_alias\"}]\n\n ;; for joins against native queries\n [:field \"my_field\" {:base-type :field/Integer, :join-alias \"my_join_alias\"}]",
+ "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`.",
"allOf" : [ {
"type" : "object",
"properties" : {
- "alias" : {
- "description" : "The name used to alias the joined table or query. This is usually generated automatically and generally looks\n like `table__via__field`. You can specify this yourself if you need to reference a joined field with a `:join-alias`\n in the options.\n\n Driver implementations: This is guaranteed to be present after pre-processing.",
- "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
- },
- "condition" : {
- "description" : "The condition on which to JOIN. Can be anything that is a valid `:filter` clause. For automatically-generated\n JOINs this is usually something like\n\n [:= <source-table-fk-field> [:field <dest-table-pk-field> {:join-alias <join-table-alias>}]]",
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Filter"
- },
- "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.",
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.JoinFields"
- },
- "fk-field-id" : {
- "description" : "Mostly used only internally. When a join is implicitly generated via a `:field` clause with\n `:source-field`, the ID of the foreign key field in the source Table will be recorded here. This information is used\n to add `fk_field_id` information to the `:cols` in the query results, and also for drill-thru. When generating\n explicit joins by hand you can usually omit this information, altho it doesn't hurt to include it if you know it.\n\n Don't set this information yourself. It will have no effect.",
+ "metabase.lib.metadata.result-metadata/field-ref" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference"
}, {
"type" : "null"
} ]
},
- "source-metadata" : {
- "description" : "Metadata about the source query being used, if pulled in from a Card via the\n `:source-table \"card__id\"` syntax. added automatically by the `resolve-card-id-source-tables` middleware.",
+ "field_ref" : {
"oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.legacy-column-metadata"
- }
+ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference"
}, {
"type" : "null"
} ]
},
- "source-query" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.SourceQuery"
- },
- "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!",
- "$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.",
- "$ref" : "#/components/schemas/metabase.lib.schema.join.strategy"
- }
- },
- "required" : [ "condition" ]
- }, {
- "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",
- "items" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Join"
- },
- "minItems" : 1
- },
- "metabase.legacy-mbql.schema.MBQLQuery" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "breakout" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Breakouts"
+ "lib/external-remap" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external"
+ }, {
+ "type" : "null"
+ } ]
},
- "source-metadata" : {
- "description" : "Info about the columns of the source query. Added in automatically by middleware. This metadata is\n primarily used to let power things like binning when used with Field Literals instead of normal Fields.",
+ "lib/source-column-alias" : {
"oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.legacy-column-metadata"
- }
+ "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"
}, {
"type" : "null"
} ]
},
- "source-query" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.SourceQuery"
+ "lib/temporal-unit" : {
+ "oneOf" : [ {
+ "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" ]
+ }, {
+ "type" : "null"
+ } ]
},
- "limit" : {
- "type" : "integer",
- "minimum" : 0
+ "lib/type" : {
+ "default" : "metadata/column",
+ "const" : "metadata/column"
},
- "filter" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Filter"
+ "fingerprint" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint"
+ }, {
+ "type" : "null"
+ } ]
},
- "joins" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Joins"
+ "visibility_type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type"
+ }, {
+ "type" : "null"
+ } ]
},
- "aggregation" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregations"
+ "base_type" : {
+ "default" : "type/*",
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
},
- "fields" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Fields"
+ "lib/source-uuid" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
+ }, {
+ "type" : "null"
+ } ]
},
- "source-table" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.SourceTable"
+ "qp/implicit-field?" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
},
- "order-by" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.OrderBys"
+ "lib/ref-name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "page" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.page"
+ "id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ }, {
+ "type" : "null"
+ } ]
},
- "expressions" : {
- "$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" : {
+ "lib/deduplicated-name" : {
+ "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.",
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ "type" : "string"
}, {
"type" : "null"
} ]
},
- "query" : { },
- "template-tags" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagMap"
- }
- },
- "required" : [ "query" ]
- }, {
- "allOf" : [ ]
- } ]
- },
- "metabase.legacy-mbql.schema.NativeSourceQuery" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "collection" : {
+ "lib/transformation-added-base-type" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ "type" : "boolean"
}, {
"type" : "null"
} ]
},
- "native" : { },
- "template-tags" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTagMap"
- }
- },
- "required" : [ "native" ]
- }, {
- "allOf" : [ ]
- } ]
- },
- "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._PLUS_"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.-"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema._SLASH_"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema._STAR_"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.coalesce"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.length"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.floor"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ceil"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.round"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.abs"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.power"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.sqrt"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.exp"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.log"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.case"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.if"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.datetime-diff"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.integer"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.float"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.temporal-extract"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.get-year"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.get-quarter"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.get-month"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.get-week"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.get-day"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.get-day-of-week"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.get-hour"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.get-minute"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.get-second"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.aggregation"
- } ]
- },
- "metabase.legacy-mbql.schema.NumericExpressionArg" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NumericExpression"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Aggregation"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference"
- } ]
- },
- "metabase.legacy-mbql.schema.OrderBy" : {
- "description" : "Schema for an `order-by` clause subclause.",
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.asc"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.desc"
- } ]
- },
- "metabase.legacy-mbql.schema.OrderBys" : {
- "allOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.OrderBy"
- },
- "minItems" : 1
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.helpers.distinct"
- } ]
- },
- "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"
- }, {
- "anyOf" : [ {
- "type" : "number"
- }, {
- "type" : "string"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemporalLiteral"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ExpressionArg"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.aggregation"
- }, {
- "$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" : {
+ "lib/original-expression-name" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.actions.row"
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
},
- "settings" : {
+ "lib/from-model?" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.settings.settings"
+ "type" : "boolean"
}, {
"type" : "null"
} ]
},
- "constraints" : {
+ "name" : {
+ "type" : "string"
+ },
+ "lib/card-id" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.constraints.constraints"
+ "description" : "Valid Card ID",
+ "type" : "integer",
+ "minimum" : 1
}, {
"type" : "null"
} ]
},
- "query" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.MBQLQuery"
+ "lib/expression-name" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
},
- "native" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.NativeQuery"
+ "lib/breakout?" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
},
- "info" : {
- "description" : "Used when recording info about this run in the QueryExecution log; things like context query was\n ran in and User who ran it.",
+ "semantic_type" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.info.info"
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
}, {
"type" : "null"
} ]
},
- "middleware" : {
+ "lib/original-effective-type" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.middleware-options.middleware-options"
+ "type" : "string"
}, {
"type" : "null"
} ]
},
- "database" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DatabaseID"
+ "lib/join-alias" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
},
- "type" : {
- "description" : "Type of query. `:query` = MBQL; `:native` = native.",
- "type" : "string",
- "enum" : [ "query", "native" ]
+ "display_name" : {
+ "type" : "string"
},
- "parameters" : {
+ "qp/native-sandbox-column.propagate-coercion?" : {
+ "type" : "boolean"
+ },
+ "lib/internal-remap" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters"
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal"
}, {
"type" : "null"
} ]
},
- "create-row" : {
+ "converted_timezone" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.actions.row"
+ "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.timezone-id"
}, {
"type" : "null"
} ]
- }
- },
- "required" : [ "type" ]
- }, {
- "$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"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.expression"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field"
- } ]
- },
- "metabase.legacy-mbql.schema.RelativeDatetimeUnit" : {
- "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__<id>` string Table ID",
- "type" : "string",
- "pattern" : "^card__[1-9]\\d*$"
- } ]
- },
- "metabase.legacy-mbql.schema.StringExpression" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.substring"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.trim"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.ltrim"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.rtrim"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.replace"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.lower"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.upper"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.concat"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.regex-match-first"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.coalesce"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.case"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.if"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.host"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.domain"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.subdomain"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.path"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.month-name"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.quarter-name"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.day-name"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.text"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.split-part"
+ },
+ "source" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "binning_info" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..legacy-column-metadata.binning-info"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-binning" : {
+ "oneOf" : [ {
+ "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" : [ {
+ "type" : "object",
+ "properties" : {
+ "strategy" : {
+ "const" : "default"
+ }
+ },
+ "required" : [ "strategy" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "bin-width" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width"
+ },
+ "strategy" : {
+ "const" : "bin-width"
+ }
+ },
+ "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" ]
+ } ]
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "effective_type" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ },
+ "lib/original-join-alias" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-display-name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "unit" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "qp/native-sandbox-column.force-coercion-strategy" : {
+ "type" : "string"
+ },
+ "lib/binning" : {
+ "oneOf" : [ {
+ "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" : [ {
+ "type" : "object",
+ "properties" : {
+ "strategy" : {
+ "const" : "default"
+ }
+ },
+ "required" : [ "strategy" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "bin-width" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width"
+ },
+ "strategy" : {
+ "const" : "bin-width"
+ }
+ },
+ "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" ]
+ } ]
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "metabase.lib.metadata.result-metadata/source" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/source" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/ref-display-name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-name" : {
+ "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.",
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/simple-display-name" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/desired-column-alias" : {
+ "oneOf" : [ {
+ "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"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "base_type", "display_name", "name" ]
}, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.collate"
+ "allOf" : [ ]
} ]
},
- "metabase.legacy-mbql.schema.StringExpressionArg" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.StringExpression"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.value"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.FieldOrExpressionRef"
- } ]
+ "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.StringFilterOptions" : {
+ "metabase.lib-metric.schema..dimension-reference.options" : {
+ "description" : "Options map for dimension references.",
"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.Snippet"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.SourceQuery"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.SourceTable"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.TemporalUnit"
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..TemplateTag.RawValue"
- } ]
- },
- "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" : [ {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.TemplateTag"
- }
- }, {
- "$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", "table" ]
- },
- "metabase.legacy-mbql.schema.TemporalExtractUnit" : {
- "description" : "Valid units to extract from a temporal.",
- "type" : "string",
- "enum" : [ "year-of-era", "quarter-of-year", "month-of-year", "week-of-year-iso", "week-of-year-us", "week-of-year-instance", "day-of-month", "day-of-week", "day-of-week-iso", "hour-of-day", "minute-of-hour", "second-of-minute" ]
- },
- "metabase.legacy-mbql.schema.TemporalLiteral" : {
- "description" : "Schema for valid temporal literals.",
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DateOrDatetimeLiteral"
- }, {
- "$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" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.time"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.literal.time"
- } ]
- },
- "metabase.legacy-mbql.schema.TimeUnit" : {
- "description" : "Valid unit for time bucketing.",
- "type" : "string",
- "enum" : [ "hour", "second", "default", "hour-of-day", "millisecond", "minute-of-hour", "minute" ]
- },
- "metabase.legacy-mbql.schema.UnnamedAggregation" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.AnyMBQLClause"
- },
- "metabase.legacy-mbql.schema.ValueTypeInfo" : {
- "description" : "Type info about a value in a `:value` clause. Added automatically by `wrap-value-literals` middleware to values in filter clauses based on the Field in the clause.",
- "type" : "object",
- "properties" : {
- "base_type" : {
+ "binning" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.binning"
}, {
"type" : "null"
} ]
},
- "database_type" : {
+ "display-name" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
}, {
"type" : "null"
} ]
},
- "name" : {
+ "effective-type" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
}, {
"type" : "null"
} ]
},
- "semantic_type" : {
+ "semantic-type" : {
"oneOf" : [ {
"$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
}, {
"type" : "null"
} ]
},
- "unit" : {
+ "temporal-unit" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.DateTimeUnit"
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
}, {
"type" : "null"
} ]
}
}
},
- "metabase.legacy-mbql.schema.WidgetType" : {
- "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._BANG__EQ_" : {
- "description" : "schema for a valid MBQL 4 :!= clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema._EQ_" : {
- "description" : "schema for a valid MBQL 4 := clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema._GT_" : {
- "description" : "schema for a valid MBQL 4 :> clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema._GT__EQ_" : {
- "description" : "schema for a valid MBQL 4 :>= clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema._LT_" : {
- "description" : "schema for a valid MBQL 4 :< clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema._LT__EQ_" : {
- "description" : "schema for a valid MBQL 4 :<= clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema._PLUS_" : {
- "description" : "schema for a valid MBQL 4 :+ clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema._SLASH_" : {
- "description" : "schema for a valid MBQL 4 :/ clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema._STAR_" : {
- "description" : "schema for a valid MBQL 4 :* clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.abs" : {
- "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 MBQL 4 :absolute-datetime clause",
- "allOf" : [ ]
+ "metabase.lib-metric.schema.binning" : {
+ "description" : "Schema for `:binning` options passed to a `:dimension` clause.",
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "strategy" : {
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.binning-strategy"
+ }
+ },
+ "required" : [ "strategy" ]
}, {
- "description" : "schema for a valid MBQL 4 :absolute-datetime clause",
- "allOf" : [ ]
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "strategy" : {
+ "const" : "default"
+ }
+ },
+ "required" : [ "strategy" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "bin-width" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.positive-number"
+ },
+ "strategy" : {
+ "const" : "bin-width"
+ }
+ },
+ "required" : [ "strategy", "bin-width" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "num-bins" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "strategy" : {
+ "const" : "num-bins"
+ }
+ },
+ "required" : [ "strategy", "num-bins" ]
+ } ]
} ]
},
- "metabase.legacy-mbql.schema.aggregation" : {
- "description" : "schema for a valid MBQL 4 :aggregation clause",
- "allOf" : [ ]
+ "metabase.lib-metric.schema.binning-strategy" : {
+ "type" : "string",
+ "enum" : [ "bin-width", "default", "num-bins" ]
},
- "metabase.legacy-mbql.schema.aggregation-options" : {
- "description" : "schema for a valid MBQL 4 :aggregation-options clause",
- "allOf" : [ ]
+ "metabase.lib-metric.schema.dimension-id" : {
+ "description" : "UUID string identifying a dimension.",
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
},
- "metabase.legacy-mbql.schema.and" : {
- "description" : "Schema for a valid MBQL 4 :and clause.",
- "oneOf" : [ {
- "description" : "schema for a valid MBQL 4 :and clause",
- "allOf" : [ ]
+ "metabase.lib-metric.schema.dimension-reference" : {
+ "description" : "Dimension reference clause [:dimension opts uuid].\n Handles normalization from JSON where the tag arrives as a string.",
+ "type" : "array",
+ "prefixItems" : [ {
+ "const" : "dimension"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema..dimension-reference.options"
}, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Filter"
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.dimension-id"
} ]
},
- "metabase.legacy-mbql.schema.asc" : {
- "description" : "schema for a valid MBQL 4 :asc clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.between" : {
- "description" : "schema for a valid MBQL 4 :between clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.case" : {
- "description" : "schema for a valid MBQL 4 :case clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.ceil" : {
- "description" : "schema for a valid MBQL 4 :ceil clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.coalesce" : {
- "description" : "schema for a valid MBQL 4 :coalesce clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.collate" : {
- "description" : "schema for a valid MBQL 4 :collate clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.concat" : {
- "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.",
+ "metabase.lib-metric.schema.expression-leaf" : {
+ "description" : "A leaf node in a metric math expression: either a metric or measure reference.",
"anyOf" : [ {
- "description" : "schema for a valid MBQL 4 :contains clause",
- "allOf" : [ ]
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.metric-expression-ref"
}, {
- "description" : "schema for a valid MBQL 4 :contains clause",
- "allOf" : [ ]
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.measure-expression-ref"
} ]
},
- "metabase.legacy-mbql.schema.convert-timezone" : {
- "description" : "schema for a valid MBQL 4 :convert-timezone clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.date" : {
- "description" : "schema for a valid MBQL 4 :date clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.datetime" : {
- "description" : "schema for a valid MBQL 4 :datetime clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.datetime-add" : {
- "description" : "schema for a valid MBQL 4 :datetime-add clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.datetime-diff" : {
- "description" : "schema for a valid MBQL 4 :datetime-diff clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.datetime-subtract" : {
- "description" : "schema for a valid MBQL 4 :datetime-subtract clause",
- "allOf" : [ ]
+ "metabase.lib-metric.schema.filter-clause" : {
+ "description" : "MBQL filter clause with normalization for API input.\n Handles string operators and dimension references."
},
- "metabase.legacy-mbql.schema.day-name" : {
- "description" : "schema for a valid MBQL 4 :day-name clause",
- "allOf" : [ ]
+ "metabase.lib-metric.schema.instance-filter" : {
+ "description" : "A filter associated with a specific expression instance via lib/uuid.",
+ "type" : "object",
+ "properties" : {
+ "filter" : {
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.filter-clause"
+ },
+ "lib/uuid" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }
+ },
+ "required" : [ "lib/uuid", "filter" ]
},
- "metabase.legacy-mbql.schema.desc" : {
- "description" : "schema for a valid MBQL 4 :desc clause",
- "allOf" : [ ]
+ "metabase.lib-metric.schema.instance-filters" : {
+ "description" : "A sequence of per-instance filters.",
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.instance-filter"
+ }
},
- "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 MBQL 4 :does-not-contain clause",
- "allOf" : [ ]
+ "metabase.lib-metric.schema.measure-expression-ref" : {
+ "description" : "A measure reference in an expression: [:measure {:lib/uuid uuid} measure-id].",
+ "type" : "array",
+ "prefixItems" : [ {
+ "const" : "measure"
}, {
- "description" : "schema for a valid MBQL 4 :does-not-contain clause",
- "allOf" : [ ]
+ "type" : "object",
+ "properties" : {
+ "lib/uuid" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }
+ },
+ "required" : [ "lib/uuid" ]
+ }, {
+ "type" : "integer",
+ "minimum" : 1
} ]
},
- "metabase.legacy-mbql.schema.domain" : {
- "description" : "schema for a valid MBQL 4 :domain clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.during" : {
- "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 MBQL 4 :ends-with clause",
- "allOf" : [ ]
+ "metabase.lib-metric.schema.metric-expression-ref" : {
+ "description" : "A metric reference in an expression: [:metric {:lib/uuid uuid} card-id].",
+ "type" : "array",
+ "prefixItems" : [ {
+ "const" : "metric"
}, {
- "description" : "schema for a valid MBQL 4 :ends-with clause",
- "allOf" : [ ]
+ "type" : "object",
+ "properties" : {
+ "lib/uuid" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }
+ },
+ "required" : [ "lib/uuid" ]
+ }, {
+ "type" : "integer",
+ "minimum" : 1
} ]
},
- "metabase.legacy-mbql.schema.exp" : {
- "description" : "schema for a valid MBQL 4 :exp clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.expression" : {
- "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 MBQL 4 :field clause",
- "allOf" : [ ]
+ "metabase.lib-metric.schema.metric-math-expression" : {
+ "description" : "A recursive metric math expression tree.\n Can be a leaf (metric/measure ref) or an arithmetic expression [op opts expr expr ...]\n with at least 2 operands.\n Note: uses :fn validator for arithmetic to avoid Malli's recursive seqex limitation.",
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.expression-leaf"
}, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.require-base-type-for-field-name"
+ "type" : "array"
} ]
},
- "metabase.legacy-mbql.schema.float" : {
- "description" : "schema for a valid MBQL 4 :float clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.floor" : {
- "description" : "schema for a valid MBQL 4 :floor clause",
- "allOf" : [ ]
+ "metabase.lib-metric.schema.typed-projection" : {
+ "description" : "A projection associated with a specific source type and ID.",
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "projection" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.dimension-reference"
+ }
+ },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "metric", "measure" ]
+ }
+ },
+ "required" : [ "type", "id", "projection" ]
},
- "metabase.legacy-mbql.schema.get-day" : {
- "description" : "schema for a valid MBQL 4 :get-day clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.get-day-of-week" : {
- "description" : "schema for a valid MBQL 4 :get-day-of-week clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.get-hour" : {
- "description" : "schema for a valid MBQL 4 :get-hour clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.get-minute" : {
- "description" : "schema for a valid MBQL 4 :get-minute clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.get-month" : {
- "description" : "schema for a valid MBQL 4 :get-month clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.get-quarter" : {
- "description" : "schema for a valid MBQL 4 :get-quarter clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.get-second" : {
- "description" : "schema for a valid MBQL 4 :get-second clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.get-week" : {
- "description" : "schema for a valid MBQL 4 :get-week clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.get-year" : {
- "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 MBQL 4 :host clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.if" : {
- "description" : "schema for a valid MBQL 4 :if clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.in" : {
- "description" : "schema for a valid MBQL 4 :in clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.inside" : {
- "description" : "schema for a valid MBQL 4 :inside clause",
- "allOf" : [ ]
+ "metabase.lib-metric.schema.typed-projections" : {
+ "description" : "A sequence of typed projections.",
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.typed-projection"
+ }
},
- "metabase.legacy-mbql.schema.integer" : {
- "description" : "schema for a valid MBQL 4 :integer clause",
- "allOf" : [ ]
+ "metabase.lib.metadata.protocols.metadata-provider" : {
+ "description" : "Schema for something that satisfies the [[metabase.lib.metadata.protocols/MetadataProvider]] protocol."
},
- "metabase.legacy-mbql.schema.interval" : {
- "description" : "schema for a valid MBQL 4 :interval clause",
- "allOf" : [ ]
+ "metabase.lib.schema..stage.additional" : {
+ "oneOf" : [ { }, { } ]
},
- "metabase.legacy-mbql.schema.is-empty" : {
- "description" : "schema for a valid MBQL 4 :is-empty clause",
- "allOf" : [ ]
+ "metabase.lib.schema..stage.common" : {
+ "type" : "object",
+ "properties" : {
+ "lib/stage-metadata" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.stage"
+ },
+ "parameters" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters"
+ }
+ }
},
- "metabase.legacy-mbql.schema.is-null" : {
- "description" : "schema for a valid MBQL 4 :is-null clause",
- "allOf" : [ ]
+ "metabase.lib.schema..stage.initial" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, { } ]
},
- "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`.",
+ "metabase.lib.schema..stage.mbql" : {
"allOf" : [ {
"type" : "object",
"properties" : {
- "metabase.lib.metadata.result-metadata/field-ref" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference"
- }, {
- "type" : "null"
- } ]
- },
- "field_ref" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference"
- }, {
- "type" : "null"
- } ]
- },
- "lib/external-remap" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external"
- }, {
- "type" : "null"
- } ]
- },
- "lib/source-column-alias" : {
- "oneOf" : [ {
- "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"
- }, {
- "type" : "null"
- } ]
- },
- "lib/temporal-unit" : {
- "oneOf" : [ {
- "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" ]
- }, {
- "type" : "null"
- } ]
+ "source-card" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
},
"lib/type" : {
- "default" : "metadata/column",
- "const" : "metadata/column"
+ "const" : "mbql.stage/mbql"
},
- "fingerprint" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint"
- }, {
- "type" : "null"
- } ]
+ "lib/stage-metadata" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.stage"
},
- "visibility_type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type"
- }, {
- "type" : "null"
- } ]
+ "breakout" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.breakouts"
},
- "base_type" : {
- "default" : "type/*",
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ "filters" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.filters"
},
- "lib/source-uuid" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
- }, {
- "type" : "null"
- } ]
+ "limit" : {
+ "type" : "integer",
+ "minimum" : 0
},
- "qp/implicit-field?" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "joins" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.join.joins"
},
- "lib/ref-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "aggregation" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.aggregation.aggregations"
},
- "id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- }, {
- "type" : "null"
- } ]
+ "fields" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.fields"
},
- "lib/deduplicated-name" : {
- "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.",
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "source-table" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.table"
},
- "lib/transformation-added-base-type" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "order-by" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.order-by.order-bys"
},
- "lib/original-expression-name" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
+ "page" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.page"
},
- "lib/from-model?" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "parameters" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters"
},
- "name" : {
- "type" : "string"
+ "expressions" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.expression.expressions"
+ }
+ },
+ "required" : [ "lib/type" ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema..stage.valid-refs"
+ }, {
+ "allOf" : [ ]
+ } ]
+ },
+ "metabase.lib.schema..stage.native" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "collection" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
},
- "lib/card-id" : {
- "oneOf" : [ {
- "description" : "Valid Card ID",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
+ "lib/stage-metadata" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.stage"
},
- "lib/expression-name" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
+ "lib/type" : {
+ "const" : "mbql.stage/native"
},
- "lib/breakout?" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "native" : { },
+ "parameters" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters"
},
- "semantic_type" : {
+ "params" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
+ "type" : "array",
+ "items" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal"
+ }, { } ]
+ }
}, {
"type" : "null"
} ]
},
- "lib/original-effective-type" : {
+ "query-permissions/referenced-card-ids" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
+ },
+ "uniqueItems" : true
}, {
"type" : "null"
} ]
},
- "lib/join-alias" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "display_name" : {
- "type" : "string"
- },
- "qp/native-sandbox-column.propagate-coercion?" : {
- "type" : "boolean"
- },
- "lib/internal-remap" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal"
- }, {
- "type" : "null"
- } ]
- },
- "converted_timezone" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.timezone-id"
- }, {
- "type" : "null"
- } ]
- },
- "source" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source"
- }, {
- "type" : "null"
- } ]
- },
- "binning_info" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..legacy-column-metadata.binning-info"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-binning" : {
- "oneOf" : [ {
- "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" : [ {
- "type" : "object",
- "properties" : {
- "strategy" : {
- "const" : "default"
- }
- },
- "required" : [ "strategy" ]
- }, {
- "type" : "object",
- "properties" : {
- "bin-width" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width"
- },
- "strategy" : {
- "const" : "bin-width"
- }
- },
- "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" ]
- } ]
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "effective_type" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- },
- "lib/original-join-alias" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-display-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "unit" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- }, {
- "type" : "null"
- } ]
- },
- "qp/native-sandbox-column.force-coercion-strategy" : {
- "type" : "string"
- },
- "lib/binning" : {
- "oneOf" : [ {
- "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" : [ {
- "type" : "object",
- "properties" : {
- "strategy" : {
- "const" : "default"
- }
- },
- "required" : [ "strategy" ]
- }, {
- "type" : "object",
- "properties" : {
- "bin-width" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width"
- },
- "strategy" : {
- "const" : "bin-width"
- }
- },
- "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" ]
- } ]
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "metabase.lib.metadata.result-metadata/source" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source"
- }, {
- "type" : "null"
- } ]
- },
- "lib/source" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source"
- }, {
- "type" : "null"
- } ]
- },
- "lib/ref-display-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-name" : {
- "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.",
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/simple-display-name" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "lib/desired-column-alias" : {
- "oneOf" : [ {
- "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"
- }, {
- "type" : "null"
- } ]
+ "template-tags" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.template-tag-map"
}
},
- "required" : [ "base_type", "display_name", "name" ]
+ "required" : [ "lib/type" ]
}, {
"allOf" : [ ]
} ]
},
- "metabase.legacy-mbql.schema.length" : {
- "description" : "schema for a valid MBQL 4 :length clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.log" : {
- "description" : "schema for a valid MBQL 4 :log clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.lower" : {
- "description" : "schema for a valid MBQL 4 :lower clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.ltrim" : {
- "description" : "schema for a valid MBQL 4 :ltrim clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.month-name" : {
- "description" : "schema for a valid MBQL 4 :month-name clause",
- "allOf" : [ ]
+ "metabase.lib.schema..stage.type" : {
+ "type" : "string",
+ "enum" : [ "mbql.stage/native", "mbql.stage/mbql" ]
},
- "metabase.legacy-mbql.schema.not" : {
- "description" : "schema for a valid MBQL 4 :not clause",
- "allOf" : [ ]
+ "metabase.lib.schema..stage.valid-refs" : { },
+ "metabase.lib.schema..stages.valid-refs" : { },
+ "metabase.lib.schema.actions.row" : {
+ "type" : "object",
+ "additionalProperties" : { }
},
- "metabase.legacy-mbql.schema.not-empty" : {
- "description" : "schema for a valid MBQL 4 :not-empty clause",
- "allOf" : [ ]
+ "metabase.lib.schema.aggregation..distinct.arg" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression"
},
- "metabase.legacy-mbql.schema.not-in" : {
- "description" : "schema for a valid MBQL 4 :not-in clause",
- "allOf" : [ ]
+ "metabase.lib.schema.aggregation..percentile.percentile" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.expression.number"
},
- "metabase.legacy-mbql.schema.not-null" : {
- "description" : "schema for a valid MBQL 4 :not-null clause",
- "allOf" : [ ]
+ "metabase.lib.schema.aggregation.aggregation" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause"
},
- "metabase.legacy-mbql.schema.now" : {
- "description" : "schema for a valid MBQL 4 :now clause",
- "allOf" : [ ]
+ "metabase.lib.schema.aggregation.aggregations" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.aggregation.aggregation"
+ },
+ "minItems" : 1
},
- "metabase.legacy-mbql.schema.offset" : {
- "description" : "schema for a valid MBQL 4 :offset clause",
- "allOf" : [ ]
+ "metabase.lib.schema.binning.bin-width" : {
+ "description" : "Bin width (size of each bin).",
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.positive-number"
},
- "metabase.legacy-mbql.schema.or" : {
- "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 MBQL 4 :path clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.power" : {
- "description" : "schema for a valid MBQL 4 :power clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.quarter-name" : {
- "description" : "schema for a valid MBQL 4 :quarter-name clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.regex-match-first" : {
- "description" : "schema for a valid MBQL 4 :regex-match-first clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.relative-datetime" : {
- "description" : "schema for a valid MBQL 4 :relative-datetime clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.relative-time-interval" : {
- "description" : "schema for a valid MBQL 4 :relative-time-interval clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.replace" : {
- "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 MBQL 4 :round clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.rtrim" : {
- "description" : "schema for a valid MBQL 4 :rtrim clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.segment" : {
- "description" : "schema for a valid MBQL 4 :segment clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.split-part" : {
- "description" : "schema for a valid MBQL 4 :split-part clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.sqrt" : {
- "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 MBQL 4 :starts-with clause",
- "allOf" : [ ]
- }, {
- "description" : "schema for a valid MBQL 4 :starts-with clause",
- "allOf" : [ ]
- } ]
- },
- "metabase.legacy-mbql.schema.subdomain" : {
- "description" : "schema for a valid MBQL 4 :subdomain clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.substring" : {
- "description" : "schema for a valid MBQL 4 :substring clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.temporal-extract" : {
- "description" : "schema for a valid MBQL 4 :temporal-extract clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.text" : {
- "description" : "schema for a valid MBQL 4 :text clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.time" : {
- "description" : "schema for a valid MBQL 4 :time clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.time-interval" : {
- "description" : "schema for a valid MBQL 4 :time-interval clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.today" : {
- "description" : "schema for a valid MBQL 4 :today clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.trim" : {
- "description" : "schema for a valid MBQL 4 :trim clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.upper" : {
- "description" : "schema for a valid MBQL 4 :upper clause",
- "allOf" : [ ]
- },
- "metabase.legacy-mbql.schema.value" : {
- "description" : "schema for a valid MBQL 4 :value clause",
- "allOf" : [ ]
- },
- "metabase.lib-metric.schema..dimension-reference.options" : {
- "description" : "Options map for dimension references.",
- "type" : "object",
- "properties" : {
- "binning" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.binning"
- }, {
- "type" : "null"
- } ]
- },
- "display-name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "effective-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "semantic-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
- }, {
- "type" : "null"
- } ]
- },
- "temporal-unit" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- }, {
- "type" : "null"
- } ]
- }
- }
- },
- "metabase.lib-metric.schema.binning" : {
- "description" : "Schema for `:binning` options passed to a `:dimension` clause.",
+ "metabase.lib.schema.binning.binning" : {
+ "description" : "Schema for `:binning` options passed to a `:field` clause.",
"allOf" : [ {
"type" : "object",
"properties" : {
"strategy" : {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.binning-strategy"
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy"
}
},
"required" : [ "strategy" ]
@@ -7630,7 +6763,7 @@
"type" : "object",
"properties" : {
"bin-width" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.positive-number"
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width"
},
"strategy" : {
"const" : "bin-width"
@@ -7641,8 +6774,7 @@
"type" : "object",
"properties" : {
"num-bins" : {
- "type" : "integer",
- "minimum" : 1
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins"
},
"strategy" : {
"const" : "num-bins"
@@ -7652,490 +6784,167 @@
} ]
} ]
},
- "metabase.lib-metric.schema.binning-strategy" : {
+ "metabase.lib.schema.binning.num-bins" : {
+ "description" : "Number of bins to use.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "metabase.lib.schema.binning.strategy" : {
"type" : "string",
"enum" : [ "bin-width", "default", "num-bins" ]
},
- "metabase.lib-metric.schema.dimension-id" : {
- "description" : "UUID string identifying a dimension.",
- "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
+ "metabase.lib.schema.breakout" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.ref.ref"
},
- "metabase.lib-metric.schema.dimension-reference" : {
- "description" : "Dimension reference clause [:dimension opts uuid].\n Handles normalization from JSON where the tag arrives as a string.",
- "type" : "array",
- "prefixItems" : [ {
- "const" : "dimension"
- }, {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema..dimension-reference.options"
+ "metabase.lib.schema.breakouts" : {
+ "allOf" : [ {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.breakout"
+ },
+ "minItems" : 1
}, {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.dimension-id"
+ "$ref" : "#/components/schemas/metabase.lib.schema.util.distinct-mbql-clauses"
} ]
},
- "metabase.lib-metric.schema.expression-leaf" : {
- "description" : "A leaf node in a metric math expression: either a metric or measure reference.",
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.metric-expression-ref"
- }, {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.measure-expression-ref"
- } ]
+ "metabase.lib.schema.common.base-type" : {
+ "type" : "string"
},
- "metabase.lib-metric.schema.filter-clause" : {
- "description" : "MBQL filter clause with normalization for API input.\n Handles string operators and dimension references."
+ "metabase.lib.schema.common.kebab-cased-map" : { },
+ "metabase.lib.schema.common.non-blank-string" : {
+ "type" : "string",
+ "minLength" : 1
},
- "metabase.lib-metric.schema.instance-filter" : {
- "description" : "A filter associated with a specific expression instance via lib/uuid.",
+ "metabase.lib.schema.common.options" : {
+ "default" : { },
"type" : "object",
"properties" : {
- "filter" : {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.filter-clause"
+ "base-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "database-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display-name" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "effective-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ }, {
+ "type" : "null"
+ } ]
},
"lib/uuid" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
+ },
+ "name" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "semantic-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "lib/uuid", "filter" ]
+ "required" : [ "lib/uuid" ]
},
- "metabase.lib-metric.schema.instance-filters" : {
- "description" : "A sequence of per-instance filters.",
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.instance-filter"
- }
+ "metabase.lib.schema.common.positive-number" : { },
+ "metabase.lib.schema.common.semantic-or-relation-type" : {
+ "description" : "valid semantic or relation type",
+ "type" : "string"
},
- "metabase.lib-metric.schema.measure-expression-ref" : {
- "description" : "A measure reference in an expression: [:measure {:lib/uuid uuid} measure-id].",
- "type" : "array",
- "prefixItems" : [ {
- "const" : "measure"
- }, {
- "type" : "object",
- "properties" : {
- "lib/uuid" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }
- },
- "required" : [ "lib/uuid" ]
- }, {
- "type" : "integer",
- "minimum" : 1
- } ]
+ "metabase.lib.schema.common.uuid" : {
+ "type" : "string",
+ "minLength" : 36,
+ "maxLength" : 36
},
- "metabase.lib-metric.schema.metric-expression-ref" : {
- "description" : "A metric reference in an expression: [:metric {:lib/uuid uuid} card-id].",
- "type" : "array",
- "prefixItems" : [ {
- "const" : "metric"
- }, {
- "type" : "object",
- "properties" : {
- "lib/uuid" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }
+ "metabase.lib.schema.constraints.constraints" : {
+ "description" : "Additional constraints added to a query limiting the maximum number of rows that can be returned. Mostly useful\n because native queries don't support the MBQL `:limit` clause. For MBQL queries, if `:limit` is set, it will\n override these values.",
+ "type" : "object",
+ "properties" : {
+ "max-results" : {
+ "description" : "Maximum number of results to allow for a query with aggregations. If `max-results-bare-rows` is unset, this\n applies to all queries",
+ "type" : "integer",
+ "minimum" : 0
},
- "required" : [ "lib/uuid" ]
- }, {
- "type" : "integer",
- "minimum" : 1
- } ]
- },
- "metabase.lib-metric.schema.metric-math-expression" : {
- "description" : "A recursive metric math expression tree.\n Can be a leaf (metric/measure ref) or an arithmetic expression [op opts expr expr ...]\n with at least 2 operands.\n Note: uses :fn validator for arithmetic to avoid Malli's recursive seqex limitation.",
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.expression-leaf"
- }, {
- "type" : "array"
- } ]
- },
- "metabase.lib-metric.schema.typed-projection" : {
- "description" : "A projection associated with a specific source type and ID.",
- "type" : "object",
- "properties" : {
- "id" : {
+ "max-results-bare-rows" : {
+ "description" : "Maximum number of results to allow for a query with no aggregations. If set, this should be LOWER than\n `:max-results`.",
"type" : "integer",
- "minimum" : 1
- },
- "projection" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.dimension-reference"
- }
- },
- "type" : {
- "type" : "string",
- "enum" : [ "metric", "measure" ]
+ "minimum" : 0
}
- },
- "required" : [ "type", "id", "projection" ]
- },
- "metabase.lib-metric.schema.typed-projections" : {
- "description" : "A sequence of typed projections.",
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.typed-projection"
}
},
- "metabase.lib.metadata.protocols.metadata-provider" : {
- "description" : "Schema for something that satisfies the [[metabase.lib.metadata.protocols/MetadataProvider]] protocol."
- },
- "metabase.lib.schema..stage.additional" : {
- "oneOf" : [ { }, { } ]
+ "metabase.lib.schema.deduplicate-refs-ignoring-source-field-name-when-possible" : { },
+ "metabase.lib.schema.expression..expression.definition" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression"
},
- "metabase.lib.schema..stage.common" : {
- "type" : "object",
- "properties" : {
- "lib/stage-metadata" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.stage"
- },
- "parameters" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters"
- }
- }
+ "metabase.lib.schema.expression.arithmetic..args.numbers" : { },
+ "metabase.lib.schema.expression.arithmetic.plus-minus-numeric-schema" : { },
+ "metabase.lib.schema.expression.arithmetic.plus-minus-temporal-interval-schema" : {
+ "allOf" : [ ]
},
- "metabase.lib.schema..stage.initial" : {
+ "metabase.lib.schema.expression.arithmetic.temporal-difference-schema" : { },
+ "metabase.lib.schema.expression.boolean" : {
"oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, { } ]
- },
- "metabase.lib.schema..stage.mbql" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "source-card" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
- },
- "lib/type" : {
- "const" : "mbql.stage/mbql"
- },
- "lib/stage-metadata" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.stage"
- },
- "breakout" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.breakouts"
- },
- "filters" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.filters"
- },
- "limit" : {
- "type" : "integer",
- "minimum" : 0
- },
- "joins" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.join.joins"
- },
- "aggregation" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.aggregation.aggregations"
- },
- "fields" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.fields"
- },
- "source-table" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.table"
- },
- "order-by" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.order-by.order-bys"
- },
- "page" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.page"
- },
- "parameters" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters"
- },
- "expressions" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.expression.expressions"
- }
- },
- "required" : [ "lib/type" ]
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema..stage.valid-refs"
+ "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause"
}, {
- "allOf" : [ ]
+ "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal"
} ]
},
- "metabase.lib.schema..stage.native" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "collection" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "lib/stage-metadata" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.stage"
- },
- "lib/type" : {
- "const" : "mbql.stage/native"
- },
- "native" : { },
- "parameters" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters"
- },
- "params" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal"
- }, { } ]
- }
- }, {
- "type" : "null"
- } ]
- },
- "query-permissions/referenced-card-ids" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
- },
- "uniqueItems" : true
- }, {
- "type" : "null"
- } ]
- },
- "template-tags" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.template-tag-map"
- }
- },
- "required" : [ "lib/type" ]
+ "metabase.lib.schema.expression.equality-comparable" : {
+ "oneOf" : [ {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal"
+ } ]
}, {
- "allOf" : [ ]
+ "type" : "null"
} ]
},
- "metabase.lib.schema..stage.type" : {
- "type" : "string",
- "enum" : [ "mbql.stage/native", "mbql.stage/mbql" ]
- },
- "metabase.lib.schema..stage.valid-refs" : { },
- "metabase.lib.schema..stages.valid-refs" : { },
- "metabase.lib.schema.actions.row" : {
- "type" : "object",
- "additionalProperties" : { }
- },
- "metabase.lib.schema.aggregation..distinct.arg" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression"
- },
- "metabase.lib.schema.aggregation..percentile.percentile" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.expression.number"
- },
- "metabase.lib.schema.aggregation.aggregation" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause"
+ "metabase.lib.schema.expression.expression" : {
+ "oneOf" : [ {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal"
+ } ]
+ }, {
+ "type" : "null"
+ } ]
},
- "metabase.lib.schema.aggregation.aggregations" : {
+ "metabase.lib.schema.expression.expressions" : {
+ "description" : "The `:expressions` definition map as found as a top-level key in an MBQL stage.",
"type" : "array",
"items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.aggregation.aggregation"
+ "$ref" : "#/components/schemas/metabase.lib.schema.expression..expression.definition"
},
"minItems" : 1
},
- "metabase.lib.schema.binning.bin-width" : {
- "description" : "Bin width (size of each bin).",
- "$ref" : "#/components/schemas/metabase.lib.schema.common.positive-number"
- },
- "metabase.lib.schema.binning.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" ]
+ "metabase.lib.schema.expression.integer" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause"
}, {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "strategy" : {
- "const" : "default"
- }
- },
- "required" : [ "strategy" ]
- }, {
- "type" : "object",
- "properties" : {
- "bin-width" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width"
- },
- "strategy" : {
- "const" : "bin-width"
- }
- },
- "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" ]
- } ]
- } ]
- },
- "metabase.lib.schema.binning.num-bins" : {
- "description" : "Number of bins to use.",
- "type" : "integer",
- "minimum" : 1
- },
- "metabase.lib.schema.binning.strategy" : {
- "type" : "string",
- "enum" : [ "bin-width", "default", "num-bins" ]
- },
- "metabase.lib.schema.breakout" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.ref.ref"
- },
- "metabase.lib.schema.breakouts" : {
- "allOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.breakout"
- },
- "minItems" : 1
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.util.distinct-mbql-clauses"
- } ]
- },
- "metabase.lib.schema.common.base-type" : {
- "type" : "string"
- },
- "metabase.lib.schema.common.kebab-cased-map" : { },
- "metabase.lib.schema.common.non-blank-string" : {
- "type" : "string",
- "minLength" : 1
- },
- "metabase.lib.schema.common.options" : {
- "default" : { },
- "type" : "object",
- "properties" : {
- "base-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "database-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "display-name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "effective-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "lib/uuid" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
- },
- "name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "semantic-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "lib/uuid" ]
- },
- "metabase.lib.schema.common.positive-number" : { },
- "metabase.lib.schema.common.semantic-or-relation-type" : {
- "description" : "valid semantic or relation type",
- "type" : "string"
- },
- "metabase.lib.schema.common.uuid" : {
- "type" : "string",
- "minLength" : 36,
- "maxLength" : 36
- },
- "metabase.lib.schema.constraints.constraints" : {
- "description" : "Additional constraints added to a query limiting the maximum number of rows that can be returned. Mostly useful\n because native queries don't support the MBQL `:limit` clause. For MBQL queries, if `:limit` is set, it will\n override these values.",
- "type" : "object",
- "properties" : {
- "max-results" : {
- "description" : "Maximum number of results to allow for a query with aggregations. If `max-results-bare-rows` is unset, this\n applies to all queries",
- "type" : "integer",
- "minimum" : 0
- },
- "max-results-bare-rows" : {
- "description" : "Maximum number of results to allow for a query with no aggregations. If set, this should be LOWER than\n `:max-results`.",
- "type" : "integer",
- "minimum" : 0
- }
- }
- },
- "metabase.lib.schema.deduplicate-refs-ignoring-source-field-name-when-possible" : { },
- "metabase.lib.schema.expression..expression.definition" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression"
- },
- "metabase.lib.schema.expression.arithmetic..args.numbers" : { },
- "metabase.lib.schema.expression.arithmetic.plus-minus-numeric-schema" : { },
- "metabase.lib.schema.expression.arithmetic.plus-minus-temporal-interval-schema" : {
- "allOf" : [ ]
- },
- "metabase.lib.schema.expression.arithmetic.temporal-difference-schema" : { },
- "metabase.lib.schema.expression.boolean" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal"
- } ]
- },
- "metabase.lib.schema.expression.equality-comparable" : {
- "oneOf" : [ {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal"
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "metabase.lib.schema.expression.expression" : {
- "oneOf" : [ {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal"
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "metabase.lib.schema.expression.expressions" : {
- "description" : "The `:expressions` definition map as found as a top-level key in an MBQL stage.",
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.expression..expression.definition"
- },
- "minItems" : 1
- },
- "metabase.lib.schema.expression.integer" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal"
+ "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal"
} ]
},
"metabase.lib.schema.expression.number" : {
@@ -8935,9710 +7744,4704 @@
}, {
"$ref" : "#/components/schemas/mbql.clause.text"
}, {
- "$ref" : "#/components/schemas/mbql.clause.time"
- }, {
- "$ref" : "#/components/schemas/mbql.clause.time-interval"
- }, {
- "$ref" : "#/components/schemas/mbql.clause.today"
- }, {
- "$ref" : "#/components/schemas/mbql.clause.trim"
- }, {
- "$ref" : "#/components/schemas/mbql.clause.upper"
- }, {
- "$ref" : "#/components/schemas/mbql.clause.value"
- }, {
- "$ref" : "#/components/schemas/mbql.clause.var"
- } ]
- },
- "metabase.lib.schema.metadata..card.type" : {
- "description" : "All acceptable card types.\n\n Previously (< 49), we only had 2 card types: question and model, which were differentiated using the boolean\n `dataset` column. Soon we'll have more card types (e.g: metric) and we will longer be able to use a boolean column\n to differentiate between all types. So we've added a new `type` column for this purpose.\n\n Migrating all the code to use `report_card.type` will be quite an effort, we decided that we'll migrate it\n gradually.",
- "type" : "string",
- "enum" : [ "question", "metric", "model" ]
- },
- "metabase.lib.schema.metadata..column.has-field-values" : {
- "type" : "string",
- "enum" : [ "auto-list", "list", "none", "search" ]
- },
- "metabase.lib.schema.metadata..column.legacy-source" : {
- "description" : "Possible values for `column.source` -- this is added by [[metabase.lib.metadata.result-metadata]] for historical\n reasons (it is used in a few places in the FE). DO NOT use this in the backend for any purpose, use `:lib/source`\n instead.",
- "type" : "string",
- "enum" : [ "aggregation", "fields", "breakout", "native" ]
- },
- "metabase.lib.schema.metadata..column.remapping.external" : {
- "description" : "External remapping (Dimension) for a column. From the [[metabase.warehouse-schema.models.dimension]] with `type =\n external` associated with a `Field` in the application database.\n See [[metabase.query-processor.middleware.add-remaps]] for what this means.",
- "type" : "object",
- "properties" : {
- "field-id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.dimension"
- },
- "lib/type" : {
- "const" : "metadata.column.remapping/external"
- },
- "name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }
- },
- "required" : [ "lib/type", "id", "name", "field-id" ]
- },
- "metabase.lib.schema.metadata..column.remapping.internal" : {
- "description" : "Internal remapping (FieldValues) for a column. From [[metabase.warehouse-schema.models.dimension]] with `type =\n internal` and the [[metabase.warehouse-schema.models.field-values]] associated with a `Field` in the application\n database. See [[metabase.query-processor.middleware.add-remaps]] for what this means.",
- "type" : "object",
- "properties" : {
- "human-readable-values" : {
- "type" : "array",
- "items" : { }
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.dimension"
- },
- "lib/type" : {
- "const" : "metadata.column.remapping/internal"
- },
- "name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "values" : {
- "type" : "array",
- "items" : { }
- }
- },
- "required" : [ "lib/type", "id", "name", "values", "human-readable-values" ]
- },
- "metabase.lib.schema.metadata..column.source" : {
- "description" : "`:lib/source` -- where a column came from with respect to the current stage.\n\n Traditionally, `:lib/source` meant something slightly different -- it denoted what part of the current stage a\n column came from, and thus included two additional options -- `:source/fields`, for columns used by `:fields`, and\n `:source/breakouts`, for columns used in `:breakout`. This was not really useful information and made `:lib/source`\n itself useless for determining if a column was 'inherited' or not (i.e., whether it came from a previous stage,\n source card, or a join, and should get field name refs instead of field ID refs --\n see [[metabase.lib.field.util/inherited-column?]]).",
- "type" : "string",
- "enum" : [ "source/card", "source/native", "source/previous-stage", "source/table-defaults", "source/aggregations", "source/joins", "source/expressions", "source/implicitly-joinable" ]
- },
- "metabase.lib.schema.metadata..column.validate-for-source" : {
- "description" : "Do additional validation for column metadata based on `:lib/source`.",
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-card"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-native"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-previous-stage"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-table-defaults"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-aggregations"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-joins"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-expressions"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-implicitly-joinable"
- }, { } ]
- },
- "metabase.lib.schema.metadata..column.validate-for-source-aggregations" : {
- "allOf" : [ ]
- },
- "metabase.lib.schema.metadata..column.validate-for-source-card" : {
- "allOf" : [ ]
- },
- "metabase.lib.schema.metadata..column.validate-for-source-expressions" : {
- "allOf" : [ ]
- },
- "metabase.lib.schema.metadata..column.validate-for-source-implicitly-joinable" : {
- "allOf" : [ ]
- },
- "metabase.lib.schema.metadata..column.validate-for-source-joins" : {
- "allOf" : [ ]
- },
- "metabase.lib.schema.metadata..column.validate-for-source-native" : {
- "allOf" : [ ]
- },
- "metabase.lib.schema.metadata..column.validate-for-source-previous-stage" : {
- "allOf" : [ ]
- },
- "metabase.lib.schema.metadata..column.validate-for-source-table-defaults" : {
- "allOf" : [ ]
- },
- "metabase.lib.schema.metadata..column.visibility-type" : {
- "type" : "string",
- "enum" : [ "retired", "sensitive", "normal", "hidden", "details-only" ]
- },
- "metabase.lib.schema.metadata.column" : {
- "description" : "Malli schema for a valid map of column metadata, which can mean one of two things:\n\n 1. Metadata about a particular Field in the application database. This will always have an `:id`\n\n 2. Results metadata from a column in `data.cols` and/or `data.results_metadata.columns` in a Query Processor\n response, or saved in something like `Card.result_metadata`. These *may* have an `:id`, or may not -- columns\n coming back from native queries or things like `SELECT count(*)` aren't associated with any particular `Field`\n and thus will not have an `:id`.\n\n Now maybe these should be two different schemas, but `:id` being there or not is the only real difference; besides\n that they are largely compatible. So they're the same for now. We can revisit this in the future if we actually want\n to differentiate between the two versions.",
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "visibility-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type"
- }, {
- "type" : "null"
- } ]
- },
- "fk-join-alias" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
- }, {
- "type" : "null"
- } ]
- },
- "metabase.lib.metadata.result-metadata/field-ref" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference"
- }, {
- "type" : "null"
- } ]
- },
- "lib/external-remap" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external"
- }, {
- "type" : "null"
- } ]
- },
- "inherited-temporal-unit" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- }, {
- "type" : "null"
- } ]
- },
- "lib/source-column-alias" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.source-column-alias"
- }, {
- "type" : "null"
- } ]
- },
- "database-type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/temporal-unit" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- }, {
- "type" : "null"
- } ]
- },
- "lib/type" : {
- "default" : "metadata/column",
- "const" : "metadata/column"
- },
- "settings" : {
- "oneOf" : [ {
- "type" : "object",
- "additionalProperties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "fingerprint" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint"
- }, {
- "type" : "null"
- } ]
- },
- "display-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/source-uuid" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
- }, {
- "type" : "null"
- } ]
- },
- "qp/implicit-field?" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "lib/ref-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- }, {
- "type" : "null"
- } ]
- },
- "effective-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "lib/deduplicated-name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.deduplicated-name"
- },
- "base-type" : {
- "default" : "type/*",
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- },
- "lib/transformation-added-base-type" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-expression-name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "fk-field-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/from-model?" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "lib/card-id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
- }, {
- "type" : "null"
- } ]
- },
- "lib/expression-name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/breakout?" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-effective-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "lib/join-alias" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
- }, {
- "type" : "null"
- } ]
- },
- "nfc-path" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }, {
- "type" : "null"
- } ]
- },
- "qp/native-sandbox-column.propagate-coercion?" : {
- "type" : "boolean"
- },
- "has-field-values" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.has-field-values"
- }, {
- "type" : "null"
- } ]
- },
- "lib/internal-remap" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal"
- }, {
- "type" : "null"
- } ]
- },
- "selected?" : {
- "type" : "boolean"
- },
- "fk-field-id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-binning" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-join-alias" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-display-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "qp/native-sandbox-column.force-coercion-strategy" : {
- "type" : "string"
- },
- "lib/binning" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
- }, {
- "type" : "null"
- } ]
- },
- "metabase.lib.metadata.result-metadata/source" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source"
- }, {
- "type" : "null"
- } ]
- },
- "lib/source" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source"
- }, {
- "type" : "null"
- } ]
- },
- "active" : {
- "type" : "boolean"
- },
- "lib/ref-display-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.original-name"
- },
- "semantic-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
- }, {
- "type" : "null"
- } ]
- },
- "fk-target-field-id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- }, {
- "type" : "null"
- } ]
- },
- "lib/simple-display-name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/desired-column-alias" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.desired-column-alias"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "lib/type", "name", "base-type" ]
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.kebab-cased-map"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source"
- }, {
- "allOf" : [ ]
- } ]
- },
- "metabase.lib.schema.metadata.deduplicated-name" : {
- "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.",
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "metabase.lib.schema.metadata.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"
- },
- "metabase.lib.schema.metadata.fingerprint..fingerprint.global" : {
- "description" : "Fingerprint values that Fields of all types should have.",
- "type" : "object",
- "properties" : {
- "distinct-count" : {
- "type" : "integer"
- },
- "nil%" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
- }, {
- "type" : "null"
- } ]
- }
- }
- },
- "metabase.lib.schema.metadata.fingerprint..fingerprint.number" : {
- "description" : "Schema for fingerprint information for Fields deriving from `:type/Number`.",
- "type" : "object",
- "properties" : {
- "avg" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "max" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "min" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "q1" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "q3" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "sd" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- }
- }
- },
- "metabase.lib.schema.metadata.fingerprint..fingerprint.temporal" : {
- "description" : "Schema for fingerprint information for Fields deriving from `:type/Temporal`.",
- "type" : "object",
- "properties" : {
- "earliest" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "latest" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- }
- },
- "metabase.lib.schema.metadata.fingerprint..fingerprint.text" : {
- "description" : "Schema for fingerprint information for Fields deriving from `:type/Text`.",
- "type" : "object",
- "properties" : {
- "average-length" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "percent-email" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
- }, {
- "type" : "null"
- } ]
- },
- "percent-json" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
- }, {
- "type" : "null"
- } ]
- },
- "percent-state" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
- }, {
- "type" : "null"
- } ]
- },
- "percent-url" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
- }, {
- "type" : "null"
- } ]
- }
- }
- },
- "metabase.lib.schema.metadata.fingerprint..fingerprint.type-specific" : {
- "description" : "Schema for type-specific fingerprint information.",
- "allOf" : [ {
- "type" : "object",
- "additionalProperties" : {
- "type" : "object",
- "properties" : { }
- }
- }, {
- "type" : "object",
- "properties" : {
- "type/DateTime" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.temporal"
- },
- "type/Number" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.number"
- },
- "type/Text" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.text"
- }
- }
- } ]
- },
- "metabase.lib.schema.metadata.fingerprint.fingerprint" : {
- "description" : "Schema for a Field 'fingerprint' generated as part of the analysis stage. Used to power the 'classification'\n sub-stage of analysis. Stored as the `fingerprint` column of Field.",
- "type" : "object",
- "properties" : {
- "experimental" : {
- "type" : "object",
- "additionalProperties" : { }
- },
- "global" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.global"
- },
- "type" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.type-specific"
- }
- }
- },
- "metabase.lib.schema.metadata.fingerprint.percent" : {
- "description" : "Schema for something represting a percentage. A floating-point value between (inclusive) 0 and 1.",
- "type" : "number"
- },
- "metabase.lib.schema.metadata.lib-or-legacy-column" : {
- "description" : "Schema for the maps in card `:result-metadata` and similar. These can be either\n `:metabase.lib.schema.metadata/result-metadata` (i.e., kebab-cased) maps, or map snake_cased as returned by QP\n metadata, but they should NOT be a mixture of both -- if we mixed them somehow there is a bug in our code.",
- "oneOf" : [ {
- "description" : "Malli schema for a valid map of column metadata, which can mean one of two things:\n\n 1. Metadata about a particular Field in the application database. This will always have an `:id`\n\n 2. Results metadata from a column in `data.cols` and/or `data.results_metadata.columns` in a Query Processor\n response, or saved in something like `Card.result_metadata`. These *may* have an `:id`, or may not -- columns\n coming back from native queries or things like `SELECT count(*)` aren't associated with any particular `Field`\n and thus will not have an `:id`.\n\n Now maybe these should be two different schemas, but `:id` being there or not is the only real difference; besides\n that they are largely compatible. So they're the same for now. We can revisit this in the future if we actually want\n to differentiate between the two versions.",
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "visibility-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type"
- }, {
- "type" : "null"
- } ]
- },
- "fk-join-alias" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
- }, {
- "type" : "null"
- } ]
- },
- "metabase.lib.metadata.result-metadata/field-ref" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference"
- }, {
- "type" : "null"
- } ]
- },
- "lib/external-remap" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external"
- }, {
- "type" : "null"
- } ]
- },
- "inherited-temporal-unit" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- }, {
- "type" : "null"
- } ]
- },
- "lib/source-column-alias" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.source-column-alias"
- }, {
- "type" : "null"
- } ]
- },
- "database-type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/temporal-unit" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- }, {
- "type" : "null"
- } ]
- },
- "lib/type" : {
- "default" : "metadata/column",
- "const" : "metadata/column"
- },
- "settings" : {
- "oneOf" : [ {
- "type" : "object",
- "additionalProperties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "fingerprint" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint"
- }, {
- "type" : "null"
- } ]
- },
- "display-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/source-uuid" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
- }, {
- "type" : "null"
- } ]
- },
- "qp/implicit-field?" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "lib/ref-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- }, {
- "type" : "null"
- } ]
- },
- "effective-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "lib/deduplicated-name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.deduplicated-name"
- },
- "base-type" : {
- "default" : "type/*",
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- },
- "lib/transformation-added-base-type" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-expression-name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "fk-field-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/from-model?" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "lib/card-id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
- }, {
- "type" : "null"
- } ]
- },
- "lib/expression-name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/breakout?" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-effective-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "lib/join-alias" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
- }, {
- "type" : "null"
- } ]
- },
- "nfc-path" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }, {
- "type" : "null"
- } ]
- },
- "qp/native-sandbox-column.propagate-coercion?" : {
- "type" : "boolean"
- },
- "has-field-values" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.has-field-values"
- }, {
- "type" : "null"
- } ]
- },
- "lib/internal-remap" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal"
- }, {
- "type" : "null"
- } ]
- },
- "selected?" : {
- "type" : "boolean"
- },
- "fk-field-id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-binning" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-join-alias" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-display-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "qp/native-sandbox-column.force-coercion-strategy" : {
- "type" : "string"
- },
- "lib/binning" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
- }, {
- "type" : "null"
- } ]
- },
- "metabase.lib.metadata.result-metadata/source" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source"
- }, {
- "type" : "null"
- } ]
- },
- "lib/source" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source"
- }, {
- "type" : "null"
- } ]
- },
- "active" : {
- "type" : "boolean"
- },
- "lib/ref-display-name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.original-name"
- },
- "semantic-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
- }, {
- "type" : "null"
- } ]
- },
- "fk-target-field-id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- }, {
- "type" : "null"
- } ]
- },
- "lib/simple-display-name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/desired-column-alias" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.desired-column-alias"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "lib/type", "name", "base-type" ]
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.kebab-cased-map"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source"
- }, {
- "allOf" : [ ]
- } ]
- }, {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.legacy-column-metadata"
- } ]
- },
- "metabase.lib.schema.metadata.metadata-provider" : {
- "description" : "Schema for something that satisfies the [[metabase.lib.metadata.protocols/MetadataProvider]] protocol.",
- "$ref" : "#/components/schemas/metabase.lib.metadata.protocols.metadata-provider"
- },
- "metabase.lib.schema.metadata.original-name" : {
- "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.",
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "metabase.lib.schema.metadata.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"
- },
- "metabase.lib.schema.metadata.stage" : {
- "description" : "Metadata about the columns returned by a particular stage of a pMBQL query. For example a single-stage native query\n like\n\n {:database 1\n :lib/type :mbql/query\n :stages [{:lib/type :mbql.stage/mbql\n :native \"SELECT id, name FROM VENUES;\"}]}\n\n might have stage metadata like\n\n {:columns [{:name \"id\", :base-type :type/Integer}\n {:name \"name\", :base-type :type/Text}]}\n\n associated with the query's lone stage.\n\n At some point in the near future we will hopefully attach this metadata directly to each stage in a query, so a\n multi-stage query will have `:lib/stage-metadata` for each stage. The main goal is to facilitate things like\n returning lists of visible or filterable columns for a given stage of a query. This is TBD, see #28717 for a WIP\n implementation of this idea.\n\n This is the same format as the results metadata returned with QP results in `data.results_metadata`. The `:columns`\n portion of this (`data.results_metadata.columns`) is also saved as `Card.result_metadata` for Saved Questions.\n\n Note that queries currently actually come back with both `data.results_metadata` AND `data.cols`; it looks like the\n Frontend actually *merges* these together -- see `applyMetadataDiff` in\n `frontend/src/metabase/query_builder/selectors.js` -- but this is ridiculous. Let's try to merge anything missing in\n `results_metadata` into `cols` going forward so things don't need to be manually merged in the future.",
- "type" : "object",
- "properties" : {
- "columns" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.column"
- }
- },
- "lib/type" : {
- "default" : "metadata/results",
- "const" : "metadata/results"
- }
- },
- "required" : [ "lib/type", "columns" ]
- },
- "metabase.lib.schema.middleware-options.middleware-options" : {
- "description" : "Additional options that can be used to toggle middleware on or off.",
- "type" : "object",
- "properties" : {
- "add-default-userland-constraints?" : {
- "description" : "Whether to add some default `max-results` and `max-results-bare-rows` constraints. By default, none are added,\n although the functions that ultimately power most API endpoints tend to set this to `true`. See\n `add-constraints` middleware for more details.",
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "disable-max-results?" : {
- "description" : "Disable applying a default limit on the query results. Handled in the `add-default-limit` middleware. If true,\n this will override the `:max-results` and `:max-results-bare-rows` values in `Constraints`.",
- "type" : "boolean"
- },
- "disable-mbql->native?" : {
- "description" : "Disable the MBQL->native middleware. If you do this, the query will not work at all, so there are no cases where\n you should set this yourself. This is only used by the `metabase.query-processor.preprocess/preprocess` function to\n get the fully pre-processed query without attempting to convert it to native.",
- "type" : "boolean"
- },
- "format-rows?" : {
- "description" : "Should we skip converting datetime types to ISO-8601 strings with appropriate timezone when post-processing\n results? Used by `metabase.query-processor.middleware.format-rows`default `false`.",
- "type" : "boolean"
- },
- "process-viz-settings?" : {
- "description" : "Whether to process a question's visualization settings and include them in the result metadata so that they can\n incorporated into an export. Used by `metabase.query-processor.middleware.visualization-settings`; default\n `false`.",
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "skip-results-metadata?" : {
- "description" : "Should we skip adding `results_metadata` to query results after running the query? Used by\n `metabase.query-processor.middleware.results-metadata`; default `false`. (Note: we may change the name of this\n column in the near future, to `result_metadata`, to fix inconsistencies in how we name things.)",
- "type" : "boolean"
- },
- "userland-query?" : {
- "description" : "Userland queries are ones ran as a result of an API call, Pulse, or the like. Special handling is done in\n certain userland-only middleware for such queries -- results are returned in a slightly different format, and\n QueryExecution entries are normally saved, unless you pass `:no-save` as the option.",
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }
- },
- "metabase.lib.schema.order-by.order-by" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/mbql.clause.asc"
- }, {
- "$ref" : "#/components/schemas/mbql.clause.desc"
- } ]
- },
- "metabase.lib.schema.order-by.order-bys" : {
- "allOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.order-by.order-by"
- },
- "minItems" : 1
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.util.distinct-mbql-clauses"
- } ]
- },
- "metabase.lib.schema.page" : {
- "description" : "`page` = page num, starting with 1. `items` = number of items per page.\n e.g.\n\n {:page 1, :items 10} = items 1-10\n {:page 2, :items 10} = items 11-20",
- "type" : "object",
- "properties" : {
- "items" : {
- "type" : "integer",
- "minimum" : 1
- },
- "page" : {
- "type" : "integer",
- "minimum" : 1
- }
- },
- "required" : [ "page", "items" ]
- },
- "metabase.lib.schema.parameter..dimension.options" : {
- "type" : "object",
- "properties" : {
- "stage-number" : {
- "type" : "integer"
- }
- }
- },
- "metabase.lib.schema.parameter..dimension.target" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-expression-ref"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.template-tag"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-field-ref"
- } ]
- },
- "metabase.lib.schema.parameter..parameter.value" : { },
- "metabase.lib.schema.parameter..target.legacy-expression-ref" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.expression"
- },
- "metabase.lib.schema.parameter..target.legacy-field-ref" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field"
- },
- "metabase.lib.schema.parameter..template-tag.tag-name" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }
- },
- "required" : [ "id" ]
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- } ]
- },
- "metabase.lib.schema.parameter..variable.target" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-field-ref"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.template-tag"
- } ]
- },
- "metabase.lib.schema.parameter.dimension" : { },
- "metabase.lib.schema.parameter.id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "metabase.lib.schema.parameter.parameter" : {
- "description" : "Schema for the *value* of a parameter (e.g. a Dashboard parameter or a native query template tag) as passed in as\n part of the `:parameters` list in a query.\n\n Note that this is different from the parameter declarations that are saved as part of Dashboards and Cards; for THAT\n schema refer to `:metabase.parameters.schema/parameter`.",
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "default" : { },
- "id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id"
- },
- "name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "required" : { },
- "slug" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "target" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.target"
- },
- "type" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.type"
- },
- "value" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter..parameter.value"
- }
- },
- "required" : [ "type" ]
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.kebab-cased-map"
- } ]
- },
- "metabase.lib.schema.parameter.parameters" : {
- "description" : "Schema for a list of `:parameters` as passed in to a query.",
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameter"
- }
- },
- "metabase.lib.schema.parameter.target" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.dimension"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.variable"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.text-tag"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-field-ref"
- } ]
- },
- "metabase.lib.schema.parameter.template-tag" : {
- "description" : "This is the reference like [:template-tag <whatever>], not the schema for native query template tags -- that lives\n in [[metabase.lib.schema.template-tag]].",
- "type" : "array",
- "prefixItems" : [ {
- "const" : "template-tag"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter..template-tag.tag-name"
- } ]
- },
- "metabase.lib.schema.parameter.text-tag" : {
- "description" : "A :text-tag parameter :target applies to parameterized text cards in viz settings",
- "type" : "array",
- "prefixItems" : [ {
- "const" : "text-tag"
- }, {
- "type" : "string"
- } ]
- },
- "metabase.lib.schema.parameter.type" : {
- "description" : "Valid parameter :type",
- "default" : "text",
- "type" : "string",
- "enum" : [ "number", "text", "date", "boolean", "date/single", "id", "category", "location/city", "location/state", "location/zip_code", "location/country", "date/range", "date/month-year", "date/quarter-year", "date/relative", "date/all-options", "temporal-unit", "number/!=", "number/<=", "number/=", "number/>=", "number/between", "string/!=", "string/=", "string/contains", "string/does-not-contain", "string/ends-with", "string/starts-with", "boolean/=" ]
- },
- "metabase.lib.schema.parameter.variable" : {
- "type" : "array",
- "prefixItems" : [ {
- "const" : "variable"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter..variable.target"
- } ]
- },
- "metabase.lib.schema.parameter.widget-type" : {
- "description" : "The type of widget to display in the FE UI for the user to use to pick values for this parameter.",
- "type" : "string",
- "enum" : [ "none", "number", "text", "date", "boolean", "date/single", "id", "category", "location/city", "location/state", "location/zip_code", "location/country", "date/range", "date/month-year", "date/quarter-year", "date/relative", "date/all-options", "temporal-unit", "number/!=", "number/<=", "number/=", "number/>=", "number/between", "string/!=", "string/=", "string/contains", "string/does-not-contain", "string/ends-with", "string/starts-with", "boolean/=" ]
- },
- "metabase.lib.schema.query" : {
- "allOf" : [ {
- "description" : "Valid MBQL 5 query.",
- "type" : "object",
- "properties" : {
- "lib/metadata" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata.metadata-provider"
- },
- "update-row" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.actions.row"
- },
- "lib/type" : {
- "default" : "mbql/query",
- "const" : "mbql/query"
- },
- "settings" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.settings.settings"
- },
- "constraints" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.constraints.constraints"
- },
- "info" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.info.info"
- },
- "middleware" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.middleware-options.middleware-options"
- },
- "database" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.saved-questions-virtual-database"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
- } ]
- },
- "stages" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.stages"
- },
- "parameters" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters"
- },
- "create-row" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.actions.row"
- }
- },
- "required" : [ "lib/type", "stages" ]
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.util.unique-uuids"
- }, {
- "allOf" : [ ]
- } ]
- },
- "metabase.lib.schema.ref..expression.options" : {
- "default" : { },
- "type" : "object",
- "properties" : {
- "base-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "database-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "display-name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "effective-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "lib/uuid" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
- },
- "name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "semantic-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
- }, {
- "type" : "null"
- } ]
- },
- "temporal-unit" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- }
- },
- "required" : [ "lib/uuid" ]
- },
- "metabase.lib.schema.ref..field.id" : {
- "type" : "array",
- "prefixItems" : [ {
- "const" : "field"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.ref..field.options"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- } ]
- },
- "metabase.lib.schema.ref..field.literal" : {
- "type" : "array",
- "prefixItems" : [ {
- "const" : "field"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.ref..field.literal.options"
- }, {
- "type" : "string"
- } ]
- },
- "metabase.lib.schema.ref..field.literal.options" : {
- "allOf" : [ {
- "default" : { },
- "type" : "object",
- "properties" : {
- "binning" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
- },
- "inherited-temporal-unit" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- },
- "database-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "display-name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "source-field-name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "effective-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "base-type" : {
- "type" : "string"
- },
- "lib/uuid" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
- },
- "name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-effective-type" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- },
- "source-field" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- },
- "join-alias" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
- },
- "lib/original-binning" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
- },
- "temporal-unit" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- },
- "source-field-join-alias" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "semantic-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
- }, {
- "type" : "null"
- } ]
- },
- "original-temporal-unit" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- }
- },
- "required" : [ "lib/uuid", "base-type" ]
- }, {
- "allOf" : [ ]
- } ]
- },
- "metabase.lib.schema.ref..field.options" : {
- "allOf" : [ {
- "default" : { },
- "type" : "object",
- "properties" : {
- "binning" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
- },
- "inherited-temporal-unit" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- },
- "database-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "display-name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "source-field-name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "effective-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "base-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "lib/uuid" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
- },
- "name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "lib/original-effective-type" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- },
- "source-field" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- },
- "join-alias" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
- },
- "lib/original-binning" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
- },
- "temporal-unit" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- },
- "source-field-join-alias" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "semantic-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
- }, {
- "type" : "null"
- } ]
- },
- "original-temporal-unit" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- }
- },
- "required" : [ "lib/uuid" ]
- }, {
- "allOf" : [ ]
- } ]
- },
- "metabase.lib.schema.ref.aggregation-options" : {
- "default" : { },
- "type" : "object",
- "properties" : {
- "base-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "database-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- }, {
- "type" : "null"
- } ]
- },
- "display-name" : {
- "type" : "string",
- "minLength" : 1
- },
- "effective-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
- }, {
- "type" : "null"
- } ]
- },
- "lib/source-name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "lib/uuid" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "semantic-type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "lib/uuid" ]
- },
- "metabase.lib.schema.ref.ref" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause"
- },
- "metabase.lib.schema.settings.settings" : {
- "description" : "Options that tweak the behavior of the query processor.",
- "type" : "object",
- "properties" : {
- "include-sensitive-fields" : {
- "description" : "Whether to include fields with visibility_type :sensitive when fetching query metadata.",
- "type" : "boolean"
- },
- "report-timezone" : {
- "description" : "The timezone the query should be ran in, overriding the default report timezone for the instance.",
- "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.timezone-id"
- }
- }
- },
- "metabase.lib.schema.stage" : {
- "default" : {
- "lib/type" : "mbql.stage/mbql"
- },
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "lib/type" : {
- "$ref" : "#/components/schemas/metabase.lib.schema..stage.type"
- }
- },
- "required" : [ "lib/type" ]
- }, {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema..stage.native"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema..stage.mbql"
- } ]
- }, {
- "allOf" : [ ]
- } ]
- },
- "metabase.lib.schema.stages" : {
- "allOf" : [ {
- "default" : [ ],
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.stage"
- },
- "minItems" : 1
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema..stages.valid-refs"
- } ]
- },
- "metabase.lib.schema.template-tag..field-filter.options" : {
- "type" : "object",
- "properties" : { }
- },
- "metabase.lib.schema.template-tag..raw-value.type" : {
- "type" : "string",
- "enum" : [ "date", "number", "boolean", "text" ]
- },
- "metabase.lib.schema.template-tag..template-tag-map.validate-names" : { },
- "metabase.lib.schema.template-tag..value.common" : {
- "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.template-tag.name"
- },
- "required" : {
- "type" : "boolean"
- }
- },
- "required" : [ "name", "display-name" ]
- },
- "metabase.lib.schema.template-tag.common" : {
- "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.template-tag.name"
- }
- },
- "required" : [ "name", "display-name" ]
- },
- "metabase.lib.schema.template-tag.disallow-dimension" : { },
- "metabase.lib.schema.template-tag.field-filter" : {
- "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.template-tag.name"
- },
- "required" : {
- "type" : "boolean"
- },
- "type" : {
- "const" : "dimension"
- },
- "alias" : {
- "type" : "string"
- },
- "options" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag..field-filter.options"
- }, {
- "type" : "null"
- } ]
- },
- "dimension" : {
- "$ref" : "#/components/schemas/mbql.clause.field"
- },
- "default" : { },
- "widget-type" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.widget-type"
- }
- },
- "required" : [ "name", "display-name", "type", "widget-type" ]
- },
- "metabase.lib.schema.template-tag.id" : {
- "oneOf" : [ {
- "type" : "string",
- "format" : "uuid"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- } ]
- },
- "metabase.lib.schema.template-tag.name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "metabase.lib.schema.template-tag.raw-value" : {
- "allOf" : [ {
- "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.template-tag.name"
- },
- "required" : {
- "type" : "boolean"
- },
- "type" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag..raw-value.type"
- }
- },
- "required" : [ "name", "display-name", "type" ]
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.disallow-dimension"
- } ]
- },
- "metabase.lib.schema.template-tag.snippet" : {
- "allOf" : [ {
- "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.template-tag.name"
- },
- "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" : [ "name", "display-name", "type", "snippet-name" ]
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.disallow-dimension"
- } ]
- },
- "metabase.lib.schema.template-tag.source-filter" : {
- "description" : "Schema for a single source-filter applied to a table template tag.",
- "type" : "object",
- "properties" : {
- "field-id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- },
- "op" : {
- "type" : "string",
- "enum" : [ "<=", ">", ">=", "!=", "=", "<" ]
- },
- "value" : { }
- },
- "required" : [ "field-id", "op", "value" ]
- },
- "metabase.lib.schema.template-tag.source-query" : {
- "allOf" : [ {
- "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.template-tag.name"
- },
- "type" : {
- "const" : "card"
- }
- },
- "required" : [ "name", "display-name", "type", "card-id" ]
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.disallow-dimension"
- } ]
- },
- "metabase.lib.schema.template-tag.source-table" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "display-name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "emit-alias" : {
- "type" : "boolean"
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id"
- },
- "name" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.name"
- },
- "source-filters" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.source-filter"
- }
- },
- "table-id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.table"
- },
- "type" : {
- "const" : "table"
- }
- },
- "required" : [ "name", "display-name", "type", "table-id" ]
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.disallow-dimension"
- } ]
- },
- "metabase.lib.schema.template-tag.template-tag" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "type" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.type"
- }
- },
- "required" : [ "type" ]
- }, {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.temporal-unit"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.field-filter"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.snippet"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.source-query"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.source-table"
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.raw-value"
- } ]
- } ]
- },
- "metabase.lib.schema.template-tag.template-tag-map" : {
- "allOf" : [ {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.template-tag"
- }
- }, {
- "$ref" : "#/components/schemas/metabase.lib.schema.template-tag..template-tag-map.validate-names"
- } ]
- },
- "metabase.lib.schema.template-tag.temporal-unit" : {
- "type" : "object",
- "properties" : {
- "alias" : {
- "type" : "string"
- },
- "dimension" : {
- "$ref" : "#/components/schemas/mbql.clause.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.template-tag.name"
- },
- "type" : {
- "const" : "temporal-unit"
- }
- },
- "required" : [ "name", "display-name", "type" ]
- },
- "metabase.lib.schema.template-tag.type" : {
- "description" : "Schema for valid values of template tag `:type`.",
- "type" : "string",
- "enum" : [ "snippet", "card", "dimension", "number", "text", "date", "boolean", "temporal-unit", "table" ]
- },
- "metabase.lib.schema.template-tag.widget-type" : {
- "description" : "Schema for valid values of `:widget-type` for a `:metabase.lib.schema.template-tag/field-filter` template tag.",
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.widget-type"
- },
- "metabase.lib.schema.temporal-bucketing..unit.date" : {
- "type" : "string",
- "enum" : [ "day", "day-of-month", "day-of-week", "day-of-year", "month", "month-of-year", "quarter", "quarter-of-year", "week", "week-of-year", "year", "year-of-era" ]
- },
- "metabase.lib.schema.temporal-bucketing..unit.date-time" : {
- "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.lib.schema.temporal-bucketing..unit.date-time.interval" : {
- "type" : "string",
- "enum" : [ "day", "hour", "millisecond", "minute", "month", "quarter", "second", "week", "year" ]
- },
- "metabase.lib.schema.temporal-bucketing..unit.time.interval" : {
- "type" : "string",
- "enum" : [ "hour", "millisecond", "minute", "second" ]
- },
- "metabase.lib.schema.temporal-bucketing.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.schema.util.distinct-mbql-clauses" : { },
- "metabase.lib.schema.util.unique-uuids" : { },
- "metabase.lib.schema.validate.source-entity-type" : {
- "description" : "The type of the source entity causing an error.",
- "type" : "string",
- "enum" : [ "table", "card" ]
- },
- "metabase.lib.schema.validate.validate-error-type" : {
- "type" : "string",
- "enum" : [ "missing-column", "missing-table-alias", "duplicate-column", "syntax-error", "validation-exception-error" ]
- },
- "metabase.logger.api.log-level" : {
- "type" : "string",
- "enum" : [ "off", "fatal", "error", "warn", "info", "debug", "trace" ]
- },
- "metabase.logger.api.time-unit" : {
- "type" : "string",
- "enum" : [ "days", "hours", "minutes", "seconds", "milliseconds", "microseconds", "nanoseconds" ]
- },
- "metabase.measures.api.RemappedValueResponse" : {
- "description" : "Response schema for dimension remapping endpoint.\n Returns [value] if no remapping, or [value, display-name] if remapped.",
- "anyOf" : [ {
- "type" : "array",
- "prefixItems" : [ { } ]
- }, {
- "type" : "array",
- "prefixItems" : [ { }, {
- "type" : "string"
- } ]
- } ]
- },
- "metabase.measures.api.measure" : {
- "description" : "Schema for a Measure entity as returned from the API.",
- "type" : "object",
- "properties" : {
- "dimension_mappings" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : { }
- }
- }, {
- "type" : "null"
- } ]
- },
- "entity_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "result_column_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "archived" : {
- "type" : "boolean"
- },
- "dimensions" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : { }
- }
- }, {
- "type" : "null"
- } ]
- },
- "updated_at" : { },
- "table_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "definition" : {
- "type" : "object",
- "properties" : { }
- },
- "created_at" : { },
- "creator_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "id", "name", "table_id", "definition", "archived", "creator_id", "created_at", "updated_at" ]
- },
- "metabase.metabot.client.schema.message" : {
- "type" : "object",
- "properties" : {
- "content" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "role" : {
- "$ref" : "#/components/schemas/metabase.metabot.client.schema.role"
- },
- "tool_call_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "tool_calls" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "arguments" : {
- "type" : "string"
- },
- "id" : {
- "type" : "string"
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name", "arguments" ]
- }
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "role" ]
- },
- "metabase.metabot.client.schema.messages" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.client.schema.message"
- }
- },
- "metabase.metabot.client.schema.role" : {
- "type" : "string",
- "enum" : [ "system", "user", "assistant", "tool" ]
- },
- "metabase.metabot.context.context" : {
- "type" : "object",
- "additionalProperties" : { }
- },
- "metabase.metabot.tools.api.aggregation" : {
- "description" : "Aggregation — count (field optional), field-based (field required), or measure-based.",
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.count-aggregation"
- }, {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.field-aggregation"
- }, {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.measure-aggregation"
- } ]
- },
- "metabase.metabot.tools.api.answer-sources-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "with_metric_default_temporal_breakout" : {
- "default" : true,
- "type" : "boolean"
- },
- "with_metric_queryable_dimensions" : {
- "default" : true,
- "type" : "boolean"
- },
- "with_model_fields" : {
- "default" : true,
- "type" : "boolean"
- },
- "with_model_metrics" : {
- "default" : true,
- "type" : "boolean"
- }
- }
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.answer-sources-result" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.full-metric"
- }
- },
- "models" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.table-result"
- }
- }
- },
- "required" : [ "metrics", "models" ]
- }
- },
- "required" : [ "structured_output" ]
- }, {
- "type" : "object",
- "properties" : {
- "output" : {
- "type" : "string"
- }
- },
- "required" : [ "output" ]
- } ]
- },
- "metabase.metabot.tools.api.basic-metric" : {
- "type" : "object",
- "properties" : {
- "default_time_dimension_field_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- },
- "type" : {
- "const" : "metric"
- }
- },
- "required" : [ "id", "type", "name" ]
- },
- "metabase.metabot.tools.api.basic-snippet" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name" ]
- },
- "metabase.metabot.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.metabot.tools.api.column" : {
- "type" : "object",
- "properties" : {
- "database_type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "field_id" : {
- "type" : "string"
- },
- "field_values" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.field-values"
- },
- "name" : {
- "type" : "string"
- },
- "semantic_type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.field-type"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "field_id", "name", "type" ]
- },
- "metabase.metabot.tools.api.columns" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.column"
- }
- },
- "metabase.metabot.tools.api.count" : {
- "type" : "integer"
- },
- "metabase.metabot.tools.api.count-aggregation" : {
- "description" : "Count aggregation — counts rows, no field_id needed.\n Use sort_order to order results by this aggregation ('asc' or 'desc').",
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "bucket" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.bucket"
- },
- "function" : {
- "const" : "count"
- },
- "sort_order" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "asc", "desc" ]
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "function" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.create-alert-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "card_id" : {
- "type" : "integer"
- },
- "schedule" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.subscription-schedule"
- },
- "send_condition" : {
- "type" : "string",
- "enum" : [ "has_result", "goal_above", "goal_below" ]
- },
- "send_once" : {
- "default" : false,
- "type" : "boolean"
- },
- "slack_channel" : {
- "type" : "string"
- }
- },
- "required" : [ "card_id", "send_condition", "schedule", "slack_channel" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.create-dashboard-subscription-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "dashboard_id" : {
- "type" : "integer"
- },
- "schedule" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.subscription-schedule"
- },
- "slack_channel" : {
- "type" : "string"
- }
- },
- "required" : [ "dashboard_id", "slack_channel", "schedule" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.disjunctive-numeric-filter" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "field_id" : {
- "type" : "string"
- },
- "operation" : {
- "type" : "string",
- "enum" : [ "equals", "not-equals" ]
- },
- "values" : {
- "type" : "array",
- "items" : {
- "anyOf" : [ {
- "type" : "integer"
- }, {
- "type" : "number"
- } ]
- }
- }
- },
- "required" : [ "field_id", "operation", "values" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.disjunctive-string-date-filter" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "field_id" : {
- "type" : "string"
- },
- "operation" : {
- "type" : "string",
- "enum" : [ "equals", "not-equals", "string-contains", "string-not-contains", "string-starts-with", "string-ends-with" ]
- },
- "values" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }
- },
- "required" : [ "field_id", "operation", "values" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.disjunctive-temporal-extraction-filter" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "field_id" : {
- "type" : "string"
- },
- "operation" : {
- "type" : "string",
- "enum" : [ "year-equals", "year-not-equals", "quarter-equals", "quarter-not-equals", "month-equals", "month-not-equals", "day-of-week-equals", "day-of-week-not-equals", "hour-equals", "hour-not-equals", "minute-equals", "minute-not-equals", "second-equals", "second-not-equals" ]
- },
- "values" : {
- "type" : "array",
- "items" : {
- "type" : "integer"
- }
- }
- },
- "required" : [ "field_id", "operation", "values" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.disjunctive-temporal-filter" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "bucket" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.bucket"
- },
- "field_id" : {
- "type" : "string"
- },
- "operation" : {
- "type" : "string",
- "enum" : [ "equals", "not-equals", "greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal" ]
- },
- "values" : {
- "type" : "array",
- "items" : {
- "anyOf" : [ {
- "type" : "string"
- }, {
- "type" : "integer"
- } ]
- }
- }
- },
- "required" : [ "field_id", "operation", "values" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.existence-filter" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "field_id" : {
- "type" : "string"
- },
- "operation" : {
- "type" : "string",
- "enum" : [ "is-null", "is-not-null", "string-is-empty", "string-is-not-empty", "is-true", "is-false" ]
- }
- },
- "required" : [ "field_id", "operation" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.field" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "bucket" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.bucket"
- },
- "field_id" : {
- "type" : "string"
- }
- },
- "required" : [ "field_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.field-aggregation" : {
- "description" : "Aggregation using a field and function. field_id is required.\n Use sort_order to order results by this aggregation ('asc' or 'desc').",
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "bucket" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.bucket"
- },
- "field_id" : {
- "type" : "string"
- },
- "function" : {
- "type" : "string",
- "enum" : [ "avg", "count-distinct", "max", "min", "sum" ]
- },
- "sort_order" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "asc", "desc" ]
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "field_id", "function" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.field-type" : {
- "type" : "string",
- "enum" : [ "boolean", "date", "datetime", "time", "number", "string" ]
- },
- "metabase.metabot.tools.api.field-values" : {
- "anyOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "boolean"
- }
- }, {
- "type" : "array",
- "items" : {
- "type" : "number"
- }
- }, {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- } ]
- },
- "metabase.metabot.tools.api.field-values-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "entity_id" : {
- "type" : "integer"
- },
- "entity_type" : {
- "type" : "string",
- "enum" : [ "table", "model", "metric" ]
- },
- "field_id" : {
- "type" : "string"
- },
- "limit" : {
- "oneOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "entity_type", "entity_id", "field_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.field-values-result" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "type" : "object",
- "properties" : {
- "field_id" : {
- "type" : "string"
- },
- "value_metadata" : {
- "type" : "object",
- "properties" : {
- "field_values" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : { }
- }, {
- "type" : "null"
- } ]
- },
- "statistics" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.statistics"
- }, {
- "type" : "null"
- } ]
- }
- }
- }
- },
- "required" : [ "field_id", "value_metadata" ]
- }
- },
- "required" : [ "structured_output" ]
- }, {
- "type" : "object",
- "properties" : {
- "output" : {
- "type" : "string"
- }
- },
- "required" : [ "output" ]
- } ]
- },
- "metabase.metabot.tools.api.filter" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.segment-filter"
- }, {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.existence-filter"
- }, {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.temporal-extraction-filter"
- }, {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.disjunctive-temporal-extraction-filter"
- }, {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.temporal-filter"
- }, {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.disjunctive-temporal-filter"
- }, {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.string-filter"
- }, {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.disjunctive-string-date-filter"
- }, {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.numeric-filter"
- }, {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.disjunctive-numeric-filter"
- } ]
- },
- "metabase.metabot.tools.api.filter-records-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "data_source" : {
- "allOf" : [ {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "query" : {
- "type" : "object",
- "properties" : {
- "database" : {
- "type" : "integer"
- }
- },
- "required" : [ "database" ]
- },
- "query_id" : {
- "type" : "string"
- }
- },
- "required" : [ "query" ]
- }, {
- "type" : "object",
- "properties" : {
- "report_id" : {
- "type" : "integer"
- }
- },
- "required" : [ "report_id" ]
- }, {
- "type" : "object",
- "properties" : {
- "table_id" : {
- "type" : "string"
- }
- },
- "required" : [ "table_id" ]
- } ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "filters" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.filter"
- }
- }
- },
- "required" : [ "data_source", "filters" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.filtering-result" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "type" : "object",
- "properties" : {
- "query" : {
- "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Query"
- },
- "query_id" : {
- "type" : "string"
- },
- "result_columns" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.column"
- }
- },
- "type" : {
- "const" : "query"
- }
- },
- "required" : [ "type", "query_id", "query", "result_columns" ]
- }
- },
- "required" : [ "structured_output" ]
- }, {
- "type" : "object",
- "properties" : {
- "output" : {
- "type" : "string"
- }
- },
- "required" : [ "output" ]
- } ]
- },
- "metabase.metabot.tools.api.full-metric" : {
- "type" : "object",
- "properties" : {
- "default_time_dimension_field_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- },
- "queryable_dimensions" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.columns"
- },
- "segments" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.segment"
- }
- },
- "type" : {
- "const" : "metric"
- },
- "verified" : {
- "type" : "boolean"
- }
- },
- "required" : [ "id", "type", "name" ]
- },
- "metabase.metabot.tools.api.full-snippet" : {
- "type" : "object",
- "properties" : {
- "content" : {
- "type" : "string"
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name", "content" ]
- },
- "metabase.metabot.tools.api.generate-insights-arguments" : {
- "type" : "object",
- "properties" : {
- "for" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "metric_id" : {
- "type" : "integer"
- }
- },
- "required" : [ "metric_id" ]
- }, {
- "type" : "object",
- "properties" : {
- "table_id" : {
- "type" : "string"
- }
- },
- "required" : [ "table_id" ]
- }, {
- "type" : "object",
- "properties" : {
- "report_id" : {
- "type" : "integer"
- }
- },
- "required" : [ "report_id" ]
- }, {
- "type" : "object",
- "properties" : {
- "query" : {
- "type" : "object",
- "properties" : { }
- }
- },
- "required" : [ "query" ]
- } ]
- }
- },
- "required" : [ "for" ]
- },
- "metabase.metabot.tools.api.get-current-user-result" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "type" : "object",
- "properties" : {
- "email_address" : {
- "type" : "string"
- },
- "glossary" : {
- "oneOf" : [ {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string"
- }
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- },
- "type" : {
- "const" : "user"
- }
- },
- "required" : [ "id", "type", "name", "email_address", "glossary" ]
- }
- },
- "required" : [ "structured_output" ]
- }, {
- "type" : "object",
- "properties" : {
- "output" : {
- "type" : "string"
- }
- },
- "required" : [ "output" ]
- } ]
- },
- "metabase.metabot.tools.api.get-dashboard-details-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "dashboard_id" : {
- "type" : "integer"
- }
- },
- "required" : [ "dashboard_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.get-dashboard-details-result" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "type" : "string"
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- },
- "type" : {
- "const" : "dashboard"
- },
- "verified" : {
- "type" : "boolean"
- }
- },
- "required" : [ "id", "type", "name" ]
- }
- },
- "required" : [ "structured_output" ]
- }, {
- "type" : "object",
- "properties" : {
- "output" : {
- "type" : "string"
- }
- },
- "required" : [ "output" ]
- } ]
- },
- "metabase.metabot.tools.api.get-document-details-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "document_id" : {
- "type" : "integer"
- }
- },
- "required" : [ "document_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.get-document-details-result" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "type" : "object",
- "properties" : {
- "document" : {
- "type" : "string"
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name", "document" ]
- }
- },
- "required" : [ "structured_output" ]
- }, {
- "type" : "object",
- "properties" : {
- "output" : {
- "type" : "string"
- }
- },
- "required" : [ "output" ]
- } ]
- },
- "metabase.metabot.tools.api.get-metric-details-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "metric_id" : {
- "type" : "integer"
- },
- "with_default_temporal_breakout" : {
- "default" : true,
- "type" : "boolean"
- },
- "with_field_values" : {
- "default" : true,
- "type" : "boolean"
- },
- "with_queryable_dimensions" : {
- "default" : true,
- "type" : "boolean"
- },
- "with_segments" : {
- "default" : false,
- "type" : "boolean"
- }
- },
- "required" : [ "metric_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.get-metric-details-result" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.full-metric"
- }
- },
- "required" : [ "structured_output" ]
- }, {
- "type" : "object",
- "properties" : {
- "output" : {
- "type" : "string"
- }
- },
- "required" : [ "output" ]
- } ]
- },
- "metabase.metabot.tools.api.get-query-details-arguments" : {
- "type" : "object",
- "properties" : {
- "query" : {
- "type" : "object",
- "properties" : { }
- }
- },
- "required" : [ "query" ]
- },
- "metabase.metabot.tools.api.get-query-details-result" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "type" : "object",
- "properties" : {
- "query" : {
- "type" : "object",
- "properties" : { }
- },
- "query_id" : {
- "type" : "string"
- },
- "result_columns" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.columns"
- },
- "type" : {
- "const" : "query"
- }
- },
- "required" : [ "type", "query_id", "query", "result_columns" ]
- }
- },
- "required" : [ "structured_output" ]
- }, {
- "type" : "object",
- "properties" : {
- "output" : {
- "type" : "string"
- }
- },
- "required" : [ "output" ]
- } ]
- },
- "metabase.metabot.tools.api.get-report-details-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "report_id" : {
- "type" : "integer"
- },
- "with_field_values" : {
- "default" : true,
- "type" : "boolean"
- },
- "with_fields" : {
- "default" : true,
- "type" : "boolean"
- }
- },
- "required" : [ "report_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.get-report-details-result" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- },
- "result_columns" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.columns"
- },
- "type" : {
- "const" : "question"
- },
- "verified" : {
- "type" : "boolean"
- }
- },
- "required" : [ "id", "type", "name", "result_columns" ]
- }
- },
- "required" : [ "structured_output" ]
- }, {
- "type" : "object",
- "properties" : {
- "output" : {
- "type" : "string"
- }
- },
- "required" : [ "output" ]
- } ]
- },
- "metabase.metabot.tools.api.get-snippet-details-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "snippet_id" : {
- "type" : "integer"
- }
- },
- "required" : [ "snippet_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.get-snippet-details-result" : {
- "description" : "Schema for SQL snippet detail results",
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.full-snippet"
- }
- },
- "required" : [ "structured_output" ]
- },
- "metabase.metabot.tools.api.get-snippets-result" : {
- "description" : "Schema for SQL snippet list results",
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.basic-snippet"
- }
- }
- },
- "required" : [ "structured_output" ]
- },
- "metabase.metabot.tools.api.get-table-details-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "with_metric_default_temporal_breakout" : {
- "default" : true,
- "type" : "boolean"
- },
- "with_fields" : {
- "default" : true,
- "type" : "boolean"
- },
- "with_field_values" : {
- "default" : true,
- "type" : "boolean"
- },
- "with_related_tables" : {
- "default" : true,
- "type" : "boolean"
- },
- "with_segments" : {
- "default" : false,
- "type" : "boolean"
- },
- "with_metrics" : {
- "default" : true,
- "type" : "boolean"
- },
- "table_id" : {
- "anyOf" : [ {
- "type" : "integer"
- }, {
- "type" : "string"
- } ]
- },
- "with_measures" : {
- "default" : false,
- "type" : "boolean"
- },
- "model_id" : {
- "type" : "integer"
- }
- }
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.get-table-details-result" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.table-result"
- }
- },
- "required" : [ "structured_output" ]
- }, {
- "type" : "object",
- "properties" : {
- "output" : {
- "type" : "string"
- }
- },
- "required" : [ "output" ]
- } ]
- },
- "metabase.metabot.tools.api.get-tables-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "database_id" : {
- "type" : "integer"
- }
- },
- "required" : [ "database_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.get-tables-result" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "type" : "object",
- "properties" : {
- "database" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "type" : "string"
- },
- "engine" : {
- "type" : "string"
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "engine", "name", "description" ]
- },
- "tables" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "columns" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "type" : "string"
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- },
- "type" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name", "description", "type" ]
- }
- },
- "description" : {
- "type" : "string"
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name", "description", "columns" ]
- }
- }
- },
- "required" : [ "database", "tables" ]
- }
- },
- "required" : [ "structured_output" ]
- }, {
- "type" : "object",
- "properties" : {
- "output" : {
- "type" : "string"
- }
- },
- "required" : [ "output" ]
- } ]
- },
- "metabase.metabot.tools.api.group-by" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "field_granularity" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "minute", "hour", "day", "week", "month", "quarter", "year", "day-of-week" ]
- }, {
- "type" : "null"
- } ]
- },
- "field_id" : {
- "type" : "string"
- }
- },
- "required" : [ "field_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.measure" : {
- "type" : "object",
- "properties" : {
- "definition" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "display_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name" ]
- },
- "metabase.metabot.tools.api.measure-aggregation" : {
- "description" : "Aggregation using a pre-defined measure.",
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "measure_id" : {
- "type" : "integer"
- },
- "sort_order" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "asc", "desc" ]
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "measure_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.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" ]
- },
- "value" : {
- "anyOf" : [ {
- "type" : "integer"
- }, {
- "type" : "number"
- } ]
- }
- },
- "required" : [ "field_id", "operation", "value" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.order-by" : {
- "description" : "Order by item specifying a field and sort direction.",
- "type" : "object",
- "properties" : {
- "direction" : {
- "type" : "string",
- "enum" : [ "asc", "desc" ]
- },
- "field" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.field"
- }
- },
- "required" : [ "field", "direction" ]
- },
- "metabase.metabot.tools.api.proportion" : {
- "type" : "number"
- },
- "metabase.metabot.tools.api.query-datasource-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "aggregations" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.aggregation"
- }
- }, {
- "type" : "null"
- } ]
- },
- "fields" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.field"
- }
- }, {
- "type" : "null"
- } ]
- },
- "filters" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.filter"
- }
- }, {
- "type" : "null"
- } ]
- },
- "group_by" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.group-by"
- }
- }, {
- "type" : "null"
- } ]
- },
- "limit" : {
- "oneOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
- },
- "model_id" : {
- "type" : "integer"
- },
- "order_by" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.order-by"
- }
- }, {
- "type" : "null"
- } ]
- },
- "table_id" : {
- "type" : "integer"
- }
- }
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.query-metric-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "filters" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.filter"
- }
- }, {
- "type" : "null"
- } ]
- },
- "group_by" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.group-by"
- }
- }, {
- "type" : "null"
- } ]
- },
- "metric_id" : {
- "type" : "integer"
- }
- },
- "required" : [ "metric_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.query-model-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "aggregations" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.aggregation"
- }
- }, {
- "type" : "null"
- } ]
- },
- "fields" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.field"
- }
- }, {
- "type" : "null"
- } ]
- },
- "filters" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.filter"
- }
- }, {
- "type" : "null"
- } ]
- },
- "group_by" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.group-by"
- }
- }, {
- "type" : "null"
- } ]
- },
- "limit" : {
- "oneOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
- },
- "model_id" : {
- "type" : "integer"
- },
- "order_by" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.order-by"
- }
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "model_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.search-arguments" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "weights" : {
- "type" : "object",
- "additionalProperties" : {
- "type" : "number"
- }
- },
- "semantic_queries" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }, {
- "type" : "null"
- } ]
- },
- "limit" : {
- "default" : 50,
- "type" : "integer"
- },
- "database_id" : {
- "oneOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
- },
- "term_queries" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }, {
- "type" : "null"
- } ]
- },
- "entity_types" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string",
- "enum" : [ "table", "model", "question", "dashboard", "metric", "database", "transform" ]
- }
- }, {
- "type" : "null"
- } ]
- },
- "created_at" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "last_edited_at" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "search_native_query" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.search-result" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "structured_output" : {
- "type" : "object",
- "properties" : {
- "data" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.search-result-item"
- }
- },
- "total_count" : {
- "type" : "integer"
- }
- },
- "required" : [ "data", "total_count" ]
- }
- },
- "required" : [ "structured_output" ]
- }, {
- "type" : "object",
- "properties" : {
- "output" : {
- "type" : "string"
- }
- },
- "required" : [ "output" ]
- } ]
- },
- "metabase.metabot.tools.api.search-result-item" : {
- "description" : "Unified schema for search result items.",
- "type" : "object",
- "properties" : {
- "collection" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "authority_level" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- }
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- },
- "verified" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "database_id" : {
- "oneOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
- },
- "updated_at" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "display_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "type" : {
- "type" : "string",
- "enum" : [ "table", "model", "dashboard", "question", "metric", "database", "transform" ]
- },
- "database_schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "created_at" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "id", "type", "name" ]
- },
- "metabase.metabot.tools.api.segment" : {
- "type" : "object",
- "properties" : {
- "definition" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "display_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name" ]
- },
- "metabase.metabot.tools.api.segment-filter" : {
- "description" : "Filter using a pre-defined segment.",
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "segment_id" : {
- "type" : "integer"
- }
- },
- "required" : [ "segment_id" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.statistics" : {
- "type" : "object",
- "properties" : {
- "values" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.field-values"
- }, {
- "type" : "null"
- } ]
- },
- "min" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "percent_url" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.proportion"
- }, {
- "type" : "null"
- } ]
- },
- "average_length" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "earliest" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "q1" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "max" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "distinct_count" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.count"
- }, {
- "type" : "null"
- } ]
- },
- "percent_state" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.proportion"
- }, {
- "type" : "null"
- } ]
- },
- "percent_null" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.proportion"
- }, {
- "type" : "null"
- } ]
- },
- "avg" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "sd" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "percent_email" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.proportion"
- }, {
- "type" : "null"
- } ]
- },
- "latest" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "q3" : {
- "oneOf" : [ {
- "type" : "number"
- }, {
- "type" : "null"
- } ]
- },
- "percent_json" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.proportion"
- }, {
- "type" : "null"
- } ]
- }
- }
- },
- "metabase.metabot.tools.api.string-filter" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "field_id" : {
- "type" : "string"
- },
- "operation" : {
- "type" : "string",
- "enum" : [ "equals", "not-equals", "string-contains", "string-not-contains", "string-starts-with", "string-ends-with" ]
- },
- "value" : {
- "type" : "string"
- }
- },
- "required" : [ "field_id", "operation", "value" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.subscription-schedule" : {
- "allOf" : [ {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "frequency" : {
- "const" : "hourly"
- }
- },
- "required" : [ "frequency" ]
- }, {
- "type" : "object",
- "properties" : {
- "frequency" : {
- "const" : "daily"
- },
- "hour" : {
- "type" : "integer"
- }
- },
- "required" : [ "frequency", "hour" ]
- }, {
- "type" : "object",
- "properties" : {
- "day_of_week" : {
- "type" : "string",
- "enum" : [ "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" ]
- },
- "frequency" : {
- "const" : "weekly"
- },
- "hour" : {
- "type" : "integer"
- }
- },
- "required" : [ "frequency", "hour", "day_of_week" ]
- }, {
- "type" : "object",
- "properties" : {
- "day_of_month" : {
- "type" : "string",
- "enum" : [ "first-calendar-day", "middle-of-month", "last-calendar-day", "first-sunday", "first-monday", "first-tuesday", "first-wednesday", "first-thursday", "first-friday", "first-saturday", "last-sunday", "last-monday", "last-tuesday", "last-wednesday", "last-thursday", "last-friday", "last-saturday" ]
- },
- "frequency" : {
- "const" : "monthly"
- },
- "hour" : {
- "type" : "integer"
- }
- },
- "required" : [ "frequency", "hour", "day_of_month" ]
- } ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.table-result" : {
- "type" : "object",
- "properties" : {
- "database_engine" : {
- "type" : "string"
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "type" : "string"
- },
- "database_id" : {
- "type" : "integer"
- },
- "related_tables" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.table-result"
- }
- },
- "related_by" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "display_name" : {
- "type" : "string"
- },
- "segments" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.segment"
- }
- },
- "type" : {
- "type" : "string",
- "enum" : [ "model", "table" ]
- },
- "fields" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.columns"
- },
- "database_schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "metrics" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.basic-metric"
- }
- },
- "measures" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.measure"
- }
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "id", "type", "name", "display_name", "database_id", "database_engine", "fields" ]
- },
- "metabase.metabot.tools.api.temporal-extraction-filter" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "field_id" : {
- "type" : "string"
- },
- "operation" : {
- "type" : "string",
- "enum" : [ "year-equals", "year-not-equals", "quarter-equals", "quarter-not-equals", "month-equals", "month-not-equals", "day-of-week-equals", "day-of-week-not-equals", "hour-equals", "hour-not-equals", "minute-equals", "minute-not-equals", "second-equals", "second-not-equals" ]
- },
- "value" : {
- "type" : "integer"
- }
- },
- "required" : [ "field_id", "operation", "value" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.api.temporal-filter" : {
- "allOf" : [ {
- "type" : "object",
- "properties" : {
- "bucket" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.bucket"
- },
- "field_id" : {
- "type" : "string"
- },
- "operation" : {
- "type" : "string",
- "enum" : [ "equals", "not-equals", "greater-than", "greater-than-or-equal", "less-than", "less-than-or-equal" ]
- },
- "value" : {
- "anyOf" : [ {
- "type" : "string"
- }, {
- "type" : "integer"
- } ]
- }
- },
- "required" : [ "field_id", "operation", "value" ]
- }, {
- "type" : "object",
- "properties" : { }
- } ]
- },
- "metabase.metabot.tools.deftool.tool-request" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
- },
- "metabase.metrics.api.BreakoutValuesResponse" : {
- "type" : "object",
- "properties" : {
- "col" : {
- "type" : "object",
- "properties" : { }
- },
- "values" : {
- "type" : "array",
- "items" : { }
- }
- },
- "required" : [ "values", "col" ]
- },
- "metabase.metrics.api.DatasetRequest" : {
- "description" : "Schema for POST /dataset request body.",
- "type" : "object",
- "properties" : {
- "definition" : {
- "$ref" : "#/components/schemas/metabase.metrics.api.Definition"
- }
- },
- "required" : [ "definition" ]
- },
- "metabase.metrics.api.DatasetResponse" : {
- "description" : "Schema for POST /dataset response.",
- "type" : "object",
- "properties" : {
- "data" : {
- "type" : "object",
- "properties" : {
- "cols" : {
- "type" : "array",
- "items" : { }
- },
- "rows" : {
- "type" : "array",
- "items" : { }
- }
- },
- "required" : [ "cols", "rows" ]
- },
- "row_count" : {
- "description" : "value must be an integer greater or equal to than zero.",
- "type" : "integer",
- "minimum" : 0
- },
- "status" : {
- "enum" : [ "completed", "completed" ]
- }
- },
- "required" : [ "status", "data", "row_count" ]
- },
- "metabase.metrics.api.Definition" : {
- "description" : "Schema for the definition object within a dataset request.\n Uses expression-based contract for metric math support.",
- "type" : "object",
- "properties" : {
- "expression" : {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.metric-math-expression"
- },
- "filters" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.instance-filters"
- }, {
- "type" : "null"
- } ]
- },
- "projections" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib-metric.schema.typed-projections"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "expression" ]
- },
- "metabase.metrics.api.Metric" : {
- "description" : "Schema for a Metric in list responses (without hydrated dimensions).",
- "type" : "object",
- "properties" : {
- "collection" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name" ]
- }, {
- "type" : "null"
- } ]
- },
- "collection_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name", "description", "collection_id" ]
- },
- "metabase.metrics.api.MetricWithDimensions" : {
- "description" : "Schema for a Metric in list responses (without hydrated dimensions).",
- "type" : "object",
- "properties" : {
- "dimension_mappings" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : { }
- }
- }, {
- "type" : "null"
- } ]
- },
- "collection" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name" ]
- }, {
- "type" : "null"
- } ]
- },
- "dataset_query" : {
- "type" : "object",
- "properties" : { }
- },
- "result_column_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "name" : {
- "type" : "string"
- },
- "dimensions" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : { }
- }
- }, {
- "type" : "null"
- } ]
- },
- "database_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "collection_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "id", "name", "description", "collection_id" ]
- },
- "metabase.metrics.api.RemappedValueResponse" : {
- "description" : "Response schema for dimension remapping endpoint.\n Returns [value] if no remapping, or [value, display-name] if remapped.",
- "anyOf" : [ {
- "type" : "array",
- "prefixItems" : [ { } ]
- }, {
- "type" : "array",
- "prefixItems" : [ { }, {
- "type" : "string"
- } ]
- } ]
- },
- "metabase.notification.api.notification.NotificationApiInput" : {
- "description" : "Notification schema for API input. Like FullyHydratedNotification but restricts templates\n to user-provided types only (no handlebars-resource).",
- "oneOf" : [ {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "handlers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "channel" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
- }, {
- "type" : "null"
- } ]
- },
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "recipients" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
- }
- },
- "template" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateUserProvided"
- }, {
- "type" : "null"
- } ]
- },
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "channel_type" ]
- }
- },
- "payload" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationCard"
- },
- "payload_id" : {
- "type" : "null"
- },
- "payload_type" : {
- "type" : "string",
- "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
- },
- "subscriptions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
- }
- }
- },
- "required" : [ "payload_type", "payload" ]
- }, {
- "type" : "object",
- "properties" : {
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "handlers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "channel" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
- }, {
- "type" : "null"
- } ]
- },
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "recipients" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
- }
- },
- "template" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateUserProvided"
- }, {
- "type" : "null"
- } ]
- },
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "channel_type" ]
- }
- },
- "payload_id" : {
- "type" : "null"
- },
- "payload_type" : {
- "type" : "string",
- "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
- },
- "subscriptions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
- }
- }
- },
- "required" : [ "payload_type" ]
- } ]
- }, {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "creator_id" : {
- "type" : "integer"
- },
- "handlers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "channel" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
- }, {
- "type" : "null"
- } ]
- },
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "recipients" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
- }
- },
- "template" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateUserProvided"
- }, {
- "type" : "null"
- } ]
- },
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "channel_type" ]
- }
- },
- "payload" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationCard"
- },
- "payload_id" : {
- "type" : "integer"
- },
- "payload_type" : {
- "type" : "string",
- "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
- },
- "subscriptions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
- }
- }
- },
- "required" : [ "payload_type", "payload" ]
- }, {
- "type" : "object",
- "properties" : {
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "creator_id" : {
- "type" : "integer"
- },
- "handlers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "channel" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
- }, {
- "type" : "null"
- } ]
- },
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "recipients" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
- }
- },
- "template" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateUserProvided"
- }, {
- "type" : "null"
- } ]
- },
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "channel_type" ]
- }
- },
- "payload_id" : {
- "type" : "integer"
- },
- "payload_type" : {
- "type" : "string",
- "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
- },
- "subscriptions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
- }
- }
- },
- "required" : [ "payload_type" ]
- } ]
- }, {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "handlers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "channel" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
- }, {
- "type" : "null"
- } ]
- },
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "recipients" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
- }
- },
- "template" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateUserProvided"
- }, {
- "type" : "null"
- } ]
- },
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "channel_type" ]
- }
- },
- "payload" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationCard"
- },
- "subscriptions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
- }
- }
- },
- "required" : [ "payload" ]
- }, {
- "type" : "object",
- "properties" : {
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "handlers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "channel" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
- }, {
- "type" : "null"
- } ]
- },
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "recipients" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
- }
- },
- "template" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateUserProvided"
- }, {
- "type" : "null"
- } ]
- },
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "channel_type" ]
- }
- },
- "subscriptions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
- }
- }
- }
- } ]
- } ]
- },
- "metabase.notification.models.FullyHydratedNotification" : {
- "description" : "Fully hydrated notification.",
- "oneOf" : [ {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "handlers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "channel" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
- }, {
- "type" : "null"
- } ]
- },
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "recipients" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
- }
- },
- "template" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate"
- }, {
- "type" : "null"
- } ]
- },
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "channel_type" ]
- }
- },
- "payload" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationCard"
- },
- "payload_id" : {
- "type" : "null"
- },
- "payload_type" : {
- "type" : "string",
- "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
- },
- "subscriptions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
- }
- }
- },
- "required" : [ "payload_type", "payload" ]
- }, {
- "type" : "object",
- "properties" : {
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "handlers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "channel" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
- }, {
- "type" : "null"
- } ]
- },
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "recipients" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
- }
- },
- "template" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate"
- }, {
- "type" : "null"
- } ]
- },
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "channel_type" ]
- }
- },
- "payload_id" : {
- "type" : "null"
- },
- "payload_type" : {
- "type" : "string",
- "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
- },
- "subscriptions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
- }
- }
- },
- "required" : [ "payload_type" ]
- } ]
- }, {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "creator_id" : {
- "type" : "integer"
- },
- "handlers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "channel" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
- }, {
- "type" : "null"
- } ]
- },
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "recipients" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
- }
- },
- "template" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate"
- }, {
- "type" : "null"
- } ]
- },
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "channel_type" ]
- }
- },
- "payload" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationCard"
- },
- "payload_id" : {
- "type" : "integer"
- },
- "payload_type" : {
- "type" : "string",
- "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
- },
- "subscriptions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
- }
- }
- },
- "required" : [ "payload_type", "payload" ]
- }, {
- "type" : "object",
- "properties" : {
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "creator_id" : {
- "type" : "integer"
- },
- "handlers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "channel" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
- }, {
- "type" : "null"
- } ]
- },
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "recipients" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
- }
- },
- "template" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate"
- }, {
- "type" : "null"
- } ]
- },
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "channel_type" ]
- }
- },
- "payload_id" : {
- "type" : "integer"
- },
- "payload_type" : {
- "type" : "string",
- "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
- },
- "subscriptions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
- }
- }
- },
- "required" : [ "payload_type" ]
- } ]
- }, {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "handlers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "channel" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
- }, {
- "type" : "null"
- } ]
- },
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "recipients" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
- }
- },
- "template" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate"
- }, {
- "type" : "null"
- } ]
- },
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "channel_type" ]
- }
- },
- "payload" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationCard"
- },
- "subscriptions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
- }
- }
- },
- "required" : [ "payload" ]
- }, {
- "type" : "object",
- "properties" : {
- "creator" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "handlers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "channel" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
- }, {
- "type" : "null"
- } ]
- },
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "recipients" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
- }
- },
- "template" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate"
- }, {
- "type" : "null"
- } ]
- },
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "channel_type" ]
- }
- },
- "subscriptions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
- }
- }
- }
- } ]
+ "$ref" : "#/components/schemas/mbql.clause.time"
+ }, {
+ "$ref" : "#/components/schemas/mbql.clause.time-interval"
+ }, {
+ "$ref" : "#/components/schemas/mbql.clause.today"
+ }, {
+ "$ref" : "#/components/schemas/mbql.clause.trim"
+ }, {
+ "$ref" : "#/components/schemas/mbql.clause.upper"
+ }, {
+ "$ref" : "#/components/schemas/mbql.clause.value"
+ }, {
+ "$ref" : "#/components/schemas/mbql.clause.var"
} ]
},
- "metabase.notification.models.Notification" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "payload_id" : {
- "type" : "null"
- },
- "payload_type" : {
- "type" : "string",
- "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
- }
- },
- "required" : [ "payload_type" ]
- }, {
- "type" : "object",
- "properties" : {
- "creator_id" : {
- "type" : "integer"
- },
- "payload_id" : {
- "type" : "integer"
- },
- "payload_type" : {
- "type" : "string",
- "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
- }
- },
- "required" : [ "payload_type" ]
- }, { } ]
+ "metabase.lib.schema.metadata..card.type" : {
+ "description" : "All acceptable card types.\n\n Previously (< 49), we only had 2 card types: question and model, which were differentiated using the boolean\n `dataset` column. Soon we'll have more card types (e.g: metric) and we will longer be able to use a boolean column\n to differentiate between all types. So we've added a new `type` column for this purpose.\n\n Migrating all the code to use `report_card.type` will be quite an effort, we decided that we'll migrate it\n gradually.",
+ "type" : "string",
+ "enum" : [ "question", "metric", "model" ]
},
- "metabase.notification.models.NotificationCard" : {
- "description" : "Schema for :model/NotificationCard.",
+ "metabase.lib.schema.metadata..column.has-field-values" : {
+ "type" : "string",
+ "enum" : [ "auto-list", "list", "none", "search" ]
+ },
+ "metabase.lib.schema.metadata..column.legacy-source" : {
+ "description" : "Possible values for `column.source` -- this is added by [[metabase.lib.metadata.result-metadata]] for historical\n reasons (it is used in a few places in the FE). DO NOT use this in the backend for any purpose, use `:lib/source`\n instead.",
+ "type" : "string",
+ "enum" : [ "aggregation", "fields", "breakout", "native" ]
+ },
+ "metabase.lib.schema.metadata..column.remapping.external" : {
+ "description" : "External remapping (Dimension) for a column. From the [[metabase.warehouse-schema.models.dimension]] with `type =\n external` associated with a `Field` in the application database.\n See [[metabase.query-processor.middleware.add-remaps]] for what this means.",
"type" : "object",
"properties" : {
- "card" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
+ "field-id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
},
- "card_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.dimension"
},
- "send_condition" : {
- "type" : "string",
- "enum" : [ "goal_below", "has_result", "goal_above" ]
+ "lib/type" : {
+ "const" : "metadata.column.remapping/external"
},
- "send_once" : {
- "type" : "boolean"
+ "name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
}
},
- "required" : [ "card_id" ]
- },
- "metabase.notification.models.NotificationHandler" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "required" : [ "lib/type", "id", "name", "field-id" ]
+ },
+ "metabase.lib.schema.metadata..column.remapping.internal" : {
+ "description" : "Internal remapping (FieldValues) for a column. From [[metabase.warehouse-schema.models.dimension]] with `type =\n internal` and the [[metabase.warehouse-schema.models.field-values]] associated with a `Field` in the application\n database. See [[metabase.query-processor.middleware.add-remaps]] for what this means.",
+ "type" : "object",
+ "properties" : {
+ "human-readable-values" : {
+ "type" : "array",
+ "items" : { }
},
- "channel_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
+ "id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.dimension"
},
- "channel_type" : { },
- "notification_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "lib/type" : {
+ "const" : "metadata.column.remapping/internal"
},
- "template_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
+ "name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ },
+ "values" : {
+ "type" : "array",
+ "items" : { }
}
},
- "required" : [ "channel_type" ]
+ "required" : [ "lib/type", "id", "name", "values", "human-readable-values" ]
},
- "metabase.notification.models.NotificationRecipient" : {
- "description" : "Schema for :model/NotificationRecipient.",
+ "metabase.lib.schema.metadata..column.source" : {
+ "description" : "`:lib/source` -- where a column came from with respect to the current stage.\n\n Traditionally, `:lib/source` meant something slightly different -- it denoted what part of the current stage a\n column came from, and thus included two additional options -- `:source/fields`, for columns used by `:fields`, and\n `:source/breakouts`, for columns used in `:breakout`. This was not really useful information and made `:lib/source`\n itself useless for determining if a column was 'inherited' or not (i.e., whether it came from a previous stage,\n source card, or a join, and should get field name refs instead of field ID refs --\n see [[metabase.lib.field.util/inherited-column?]]).",
+ "type" : "string",
+ "enum" : [ "source/card", "source/native", "source/previous-stage", "source/table-defaults", "source/aggregations", "source/joins", "source/expressions", "source/implicitly-joinable" ]
+ },
+ "metabase.lib.schema.metadata..column.validate-for-source" : {
+ "description" : "Do additional validation for column metadata based on `:lib/source`.",
"oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-card"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-native"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-previous-stage"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-table-defaults"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-aggregations"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-joins"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-expressions"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-implicitly-joinable"
+ }, { } ]
+ },
+ "metabase.lib.schema.metadata..column.validate-for-source-aggregations" : {
+ "allOf" : [ ]
+ },
+ "metabase.lib.schema.metadata..column.validate-for-source-card" : {
+ "allOf" : [ ]
+ },
+ "metabase.lib.schema.metadata..column.validate-for-source-expressions" : {
+ "allOf" : [ ]
+ },
+ "metabase.lib.schema.metadata..column.validate-for-source-implicitly-joinable" : {
+ "allOf" : [ ]
+ },
+ "metabase.lib.schema.metadata..column.validate-for-source-joins" : {
+ "allOf" : [ ]
+ },
+ "metabase.lib.schema.metadata..column.validate-for-source-native" : {
+ "allOf" : [ ]
+ },
+ "metabase.lib.schema.metadata..column.validate-for-source-previous-stage" : {
+ "allOf" : [ ]
+ },
+ "metabase.lib.schema.metadata..column.validate-for-source-table-defaults" : {
+ "allOf" : [ ]
+ },
+ "metabase.lib.schema.metadata..column.visibility-type" : {
+ "type" : "string",
+ "enum" : [ "retired", "sensitive", "normal", "hidden", "details-only" ]
+ },
+ "metabase.lib.schema.metadata.column" : {
+ "description" : "Malli schema for a valid map of column metadata, which can mean one of two things:\n\n 1. Metadata about a particular Field in the application database. This will always have an `:id`\n\n 2. Results metadata from a column in `data.cols` and/or `data.results_metadata.columns` in a Query Processor\n response, or saved in something like `Card.result_metadata`. These *may* have an `:id`, or may not -- columns\n coming back from native queries or things like `SELECT count(*)` aren't associated with any particular `Field`\n and thus will not have an `:id`.\n\n Now maybe these should be two different schemas, but `:id` being there or not is the only real difference; besides\n that they are largely compatible. So they're the same for now. We can revisit this in the future if we actually want\n to differentiate between the two versions.",
+ "allOf" : [ {
"type" : "object",
"properties" : {
- "details" : { },
- "notification_handler_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "visibility-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type"
+ }, {
+ "type" : "null"
+ } ]
},
- "permissions_group_id" : { },
- "type" : {
- "type" : "string",
- "enum" : [ "notification-recipient/raw-value", "notification-recipient/user", "notification-recipient/template", "notification-recipient/group" ]
+ "fk-join-alias" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "metabase.lib.metadata.result-metadata/field-ref" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/external-remap" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "inherited-temporal-unit" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/source-column-alias" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.source-column-alias"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "database-type" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/temporal-unit" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/type" : {
+ "default" : "metadata/column",
+ "const" : "metadata/column"
+ },
+ "settings" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "additionalProperties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "fingerprint" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display-name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/source-uuid" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "qp/implicit-field?" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/ref-name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "effective-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/deduplicated-name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.deduplicated-name"
+ },
+ "base-type" : {
+ "default" : "type/*",
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ },
+ "lib/transformation-added-base-type" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-expression-name" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "fk-field-name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/from-model?" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
},
- "user_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }
- },
- "required" : [ "type", "user_id" ]
- }, {
- "type" : "object",
- "properties" : {
- "details" : { },
- "notification_handler_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "name" : {
+ "type" : "string"
},
- "permissions_group_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "lib/card-id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
+ }, {
+ "type" : "null"
+ } ]
},
- "type" : {
- "type" : "string",
- "enum" : [ "notification-recipient/raw-value", "notification-recipient/user", "notification-recipient/template", "notification-recipient/group" ]
+ "lib/expression-name" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
},
- "user_id" : { }
- },
- "required" : [ "type", "permissions_group_id" ]
- }, {
- "type" : "object",
- "properties" : {
- "details" : {
- "type" : "object",
- "properties" : {
- "value" : { }
- },
- "required" : [ "value" ],
- "additionalProperties" : false
+ "lib/breakout?" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
},
- "notification_handler_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "lib/original-effective-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ }, {
+ "type" : "null"
+ } ]
},
- "permissions_group_id" : { },
- "type" : {
- "type" : "string",
- "enum" : [ "notification-recipient/raw-value", "notification-recipient/user", "notification-recipient/template", "notification-recipient/group" ]
+ "lib/join-alias" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
+ }, {
+ "type" : "null"
+ } ]
},
- "user_id" : { }
- },
- "required" : [ "type", "details" ]
- }, {
- "type" : "object",
- "properties" : {
- "details" : {
- "type" : "object",
- "properties" : {
- "is_optional" : {
- "type" : "boolean"
- },
- "pattern" : {
+ "nfc-path" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
"type" : "string"
}
- },
- "required" : [ "pattern" ],
- "additionalProperties" : false
+ }, {
+ "type" : "null"
+ } ]
},
- "notification_handler_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "qp/native-sandbox-column.propagate-coercion?" : {
+ "type" : "boolean"
},
- "permissions_group_id" : { },
- "type" : {
- "type" : "string",
- "enum" : [ "notification-recipient/raw-value", "notification-recipient/user", "notification-recipient/template", "notification-recipient/group" ]
+ "has-field-values" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.has-field-values"
+ }, {
+ "type" : "null"
+ } ]
},
- "user_id" : { }
- },
- "required" : [ "type", "details" ]
- } ]
- },
- "metabase.notification.models.NotificationSubscription" : {
- "description" : "Schema for :model/NotificationSubscription.",
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "cron_schedule" : {
- "type" : "null"
+ "lib/internal-remap" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal"
+ }, {
+ "type" : "null"
+ } ]
},
- "event_name" : {
- "anyOf" : [ {
- "type" : "string"
+ "selected?" : {
+ "type" : "boolean"
+ },
+ "fk-field-id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-binning" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-join-alias" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
}, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-display-name" : {
+ "oneOf" : [ {
"type" : "string"
+ }, {
+ "type" : "null"
} ]
},
- "type" : {
- "type" : "string",
- "enum" : [ "notification-subscription/cron", "notification-subscription/system-event" ]
- }
- },
- "required" : [ "type", "event_name" ]
- }, {
- "type" : "object",
- "properties" : {
- "cron_schedule" : {
+ "qp/native-sandbox-column.force-coercion-strategy" : {
"type" : "string"
},
- "event_name" : {
- "type" : "null"
+ "lib/binning" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
+ }, {
+ "type" : "null"
+ } ]
},
- "type" : {
- "type" : "string",
- "enum" : [ "notification-subscription/cron", "notification-subscription/system-event" ]
+ "metabase.lib.metadata.result-metadata/source" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source"
+ }, {
+ "type" : "null"
+ } ]
},
- "ui_display_type" : {
+ "lib/source" : {
"oneOf" : [ {
- "type" : "string",
- "enum" : [ "cron/raw", "cron/builder" ]
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "active" : {
+ "type" : "boolean"
+ },
+ "lib/ref-display-name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.original-name"
+ },
+ "semantic-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "fk-target-field-id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/simple-display-name" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/desired-column-alias" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.desired-column-alias"
}, {
"type" : "null"
} ]
}
},
- "required" : [ "type", "cron_schedule" ]
+ "required" : [ "lib/type", "name", "base-type" ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.kebab-cased-map"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source"
+ }, {
+ "allOf" : [ ]
} ]
},
- "metabase.parameters.schema.legacy-ref" : {
+ "metabase.lib.schema.metadata.deduplicated-name" : {
+ "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.",
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-expression-ref"
+ "type" : "string"
}, {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-field-ref"
+ "type" : "null"
} ]
},
- "metabase.parameters.schema.parameter" : {
- "description" : "parameter must be a map with :id and :type keys",
+ "metabase.lib.schema.metadata.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"
+ },
+ "metabase.lib.schema.metadata.fingerprint..fingerprint.global" : {
+ "description" : "Fingerprint values that Fields of all types should have.",
"type" : "object",
"properties" : {
- "filteringParameters" : {
+ "distinct-count" : {
+ "type" : "integer"
+ },
+ "nil%" : {
"oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id"
- }
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
}, {
"type" : "null"
} ]
- },
- "mappings" : {
+ }
+ }
+ },
+ "metabase.lib.schema.metadata.fingerprint..fingerprint.number" : {
+ "description" : "Schema for fingerprint information for Fields deriving from `:type/Number`.",
+ "type" : "object",
+ "properties" : {
+ "avg" : {
"oneOf" : [ {
- "anyOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping"
- }
- }, {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping"
- },
- "uniqueItems" : true
- } ]
+ "type" : "number"
}, {
"type" : "null"
} ]
},
- "sectionId" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
- },
- "values_source_config" : {
+ "max" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.values-source-config"
+ "type" : "number"
}, {
"type" : "null"
} ]
},
- "id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id"
- },
- "name" : {
- "type" : "string"
- },
- "slug" : {
- "type" : "string"
- },
- "values_query_type" : {
+ "min" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.values-query-type"
+ "type" : "number"
}, {
"type" : "null"
} ]
},
- "type" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.type"
- },
- "temporal_units" : {
+ "q1" : {
"oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
- }
+ "type" : "number"
}, {
"type" : "null"
} ]
},
- "target" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.target"
- },
- "values_source_type" : {
+ "q3" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.values-source-type"
+ "type" : "number"
}, {
"type" : "null"
} ]
},
- "default" : { }
- },
- "required" : [ "id", "type" ]
- },
- "metabase.parameters.schema.parameter-mapping" : {
- "description" : "parameter_mapping must be a map with :parameter_id and :target keys",
- "type" : "object",
- "properties" : {
- "card_id" : {
+ "sd" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
+ "type" : "number"
}, {
"type" : "null"
} ]
- },
- "dashcard" : {
- "type" : "object",
- "properties" : { }
- },
- "parameter_id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id"
- },
- "target" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.target"
}
- },
- "required" : [ "parameter_id", "target" ]
- },
- "metabase.parameters.schema.parameter-mappings" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping"
- }
- },
- "metabase.parameters.schema.parameters" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter"
- }
- },
- "metabase.parameters.schema.values-query-type" : {
- "type" : "string",
- "enum" : [ "none", "list", "search" ]
- },
- "metabase.parameters.schema.values-source-config" : {
- "description" : "Schema for valid source_options within a Parameter",
- "type" : "object",
- "properties" : {
- "card_id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
- },
- "label_field" : {
- "$ref" : "#/components/schemas/metabase.parameters.schema.legacy-ref"
- },
- "value_field" : {
- "$ref" : "#/components/schemas/metabase.parameters.schema.legacy-ref"
- },
- "values" : { }
- }
- },
- "metabase.parameters.schema.values-source-type" : {
- "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).",
+ "metabase.lib.schema.metadata.fingerprint..fingerprint.temporal" : {
+ "description" : "Schema for fingerprint information for Fields deriving from `:type/Temporal`.",
"type" : "object",
"properties" : {
- "dataset_query" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.queries.schema.query"
- }, {
- "type" : "null"
- } ]
- },
- "parameter_mappings" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
+ "earliest" : {
"oneOf" : [ {
"type" : "string"
}, {
"type" : "null"
} ]
},
- "database_id" : {
+ "latest" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ "type" : "string"
}, {
"type" : "null"
} ]
- },
- "document_id" : {
+ }
+ }
+ },
+ "metabase.lib.schema.metadata.fingerprint..fingerprint.text" : {
+ "description" : "Schema for fingerprint information for Fields deriving from `:type/Text`.",
+ "type" : "object",
+ "properties" : {
+ "average-length" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.documents.schema..document.id"
+ "type" : "number"
}, {
"type" : "null"
} ]
},
- "result_metadata" : {
+ "percent-email" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.queries.schema..card.result-metadata"
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
}, {
"type" : "null"
} ]
},
- "collection_id" : {
+ "percent-json" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.collection"
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
}, {
"type" : "null"
} ]
},
- "type" : {
+ "percent-state" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..card.type"
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
}, {
"type" : "null"
} ]
},
- "parameters" : {
+ "percent-url" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameters"
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent"
}, {
"type" : "null"
} ]
+ }
+ }
+ },
+ "metabase.lib.schema.metadata.fingerprint..fingerprint.type-specific" : {
+ "description" : "Schema for type-specific fingerprint information.",
+ "allOf" : [ {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : { }
+ }
+ }, {
+ "type" : "object",
+ "properties" : {
+ "type/DateTime" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.temporal"
+ },
+ "type/Number" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.number"
+ },
+ "type/Text" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.text"
+ }
+ }
+ } ]
+ },
+ "metabase.lib.schema.metadata.fingerprint.fingerprint" : {
+ "description" : "Schema for a Field 'fingerprint' generated as part of the analysis stage. Used to power the 'classification'\n sub-stage of analysis. Stored as the `fingerprint` column of Field.",
+ "type" : "object",
+ "properties" : {
+ "experimental" : {
+ "type" : "object",
+ "additionalProperties" : { }
},
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "global" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.global"
},
- "dashboard_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.dashboard"
- }, {
- "type" : "null"
- } ]
+ "type" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.type-specific"
}
}
},
- "metabase.queries.schema.card-type" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..card.type"
- },
- "metabase.queries.schema.empty-map" : {
- "description" : "An empty map, allowed for Card.dataset_query for historic purposes.",
- "const" : { }
+ "metabase.lib.schema.metadata.fingerprint.percent" : {
+ "description" : "Schema for something represting a percentage. A floating-point value between (inclusive) 0 and 1.",
+ "type" : "number"
},
- "metabase.queries.schema.query" : {
- "description" : "Schema for Card.dataset_query. Cards are for some wacko reason allowed to be saved with empty queries (`{}`), but not\n `NULL` ones, because the column is non-null. This sorta seems like an oversight but fixing all the tests that save\n Cards with empty queries is too much to attempt at this point. So a Card either has an empty query or a valid MBQL 5\n query.",
+ "metabase.lib.schema.metadata.lib-or-legacy-column" : {
+ "description" : "Schema for the maps in card `:result-metadata` and similar. These can be either\n `:metabase.lib.schema.metadata/result-metadata` (i.e., kebab-cased) maps, or map snake_cased as returned by QP\n metadata, but they should NOT be a mixture of both -- if we mixed them somehow there is a bug in our code.",
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.queries.schema.empty-map"
- }, {
+ "description" : "Malli schema for a valid map of column metadata, which can mean one of two things:\n\n 1. Metadata about a particular Field in the application database. This will always have an `:id`\n\n 2. Results metadata from a column in `data.cols` and/or `data.results_metadata.columns` in a Query Processor\n response, or saved in something like `Card.result_metadata`. These *may* have an `:id`, or may not -- columns\n coming back from native queries or things like `SELECT count(*)` aren't associated with any particular `Field`\n and thus will not have an `:id`.\n\n Now maybe these should be two different schemas, but `:id` being there or not is the only real difference; besides\n that they are largely compatible. So they're the same for now. We can revisit this in the future if we actually want\n to differentiate between the two versions.",
"allOf" : [ {
- "description" : "Valid MBQL 5 query.",
"type" : "object",
"properties" : {
- "lib/metadata" : {
- "description" : "Schema for something that satisfies the [[metabase.lib.metadata.protocols/MetadataProvider]] protocol."
+ "visibility-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type"
+ }, {
+ "type" : "null"
+ } ]
},
- "update-row" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.actions.row"
+ "fk-join-alias" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "metabase.lib.metadata.result-metadata/field-ref" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/external-remap" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "inherited-temporal-unit" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/source-column-alias" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.source-column-alias"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "database-type" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/temporal-unit" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/type" : {
+ "default" : "metadata/column",
+ "const" : "metadata/column"
+ },
+ "settings" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "additionalProperties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "fingerprint" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display-name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/source-uuid" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "qp/implicit-field?" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/ref-name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "effective-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/deduplicated-name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.deduplicated-name"
+ },
+ "base-type" : {
+ "default" : "type/*",
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ },
+ "lib/transformation-added-base-type" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-expression-name" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "fk-field-name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/from-model?" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "lib/card-id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/expression-name" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/breakout?" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-effective-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/join-alias" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "nfc-path" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "qp/native-sandbox-column.propagate-coercion?" : {
+ "type" : "boolean"
+ },
+ "has-field-values" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.has-field-values"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/internal-remap" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "selected?" : {
+ "type" : "boolean"
+ },
+ "fk-field-id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-binning" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-join-alias" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-display-name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "lib/type" : {
- "default" : "mbql/query",
- "const" : "mbql/query"
+ "qp/native-sandbox-column.force-coercion-strategy" : {
+ "type" : "string"
},
- "settings" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.settings.settings"
+ "lib/binning" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
+ }, {
+ "type" : "null"
+ } ]
},
- "constraints" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.constraints.constraints"
+ "metabase.lib.metadata.result-metadata/source" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source"
+ }, {
+ "type" : "null"
+ } ]
},
- "info" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.info.info"
+ "lib/source" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source"
+ }, {
+ "type" : "null"
+ } ]
},
- "middleware" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.middleware-options.middleware-options"
+ "active" : {
+ "type" : "boolean"
},
- "database" : {
+ "lib/ref-display-name" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.saved-questions-virtual-database"
+ "type" : "string"
}, {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ "type" : "null"
} ]
},
- "stages" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.stages"
+ "lib/original-name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.original-name"
},
- "parameters" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters"
+ "semantic-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
+ }, {
+ "type" : "null"
+ } ]
},
- "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..query-result.data" : {
- "description" : "Schema for the :data key of query results.",
- "type" : "object",
- "properties" : {
- "insights" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : { }
- }
- },
- "results_metadata" : {
- "type" : "object",
- "properties" : {
- "columns" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.query-processor.schema..result-metadata.column"
- }
- }
- },
- "required" : [ "columns" ]
- },
- "download_perms" : {
- "type" : "string"
- },
- "format-rows?" : {
- "type" : "boolean"
- },
- "is_sandboxed" : {
- "type" : "boolean"
- },
- "cols" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.query-processor.schema..result-metadata.column"
- }
- },
- "results_timezone" : {
- "type" : "string"
- },
- "rows" : {
- "type" : "array",
- "items" : {
- "type" : "array",
- "items" : { }
- }
- },
- "native_form" : {
- "type" : "object",
- "properties" : { }
- }
- },
- "required" : [ "cols", "rows" ]
- },
- "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.query-processor.schema.query-result" : {
- "description" : "Schema for query execution results returned by the Query Processor.",
- "type" : "object",
- "properties" : {
- "row_count" : {
- "type" : "integer"
- },
- "error" : {
- "type" : "string"
- },
- "started_at" : {
- "type" : "string"
- },
- "database_id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
- },
- "context" : { },
- "status" : {
- "type" : "string",
- "enum" : [ "completed", "failed" ]
- },
- "error_type" : {
- "type" : "string"
- },
- "running_time" : {
- "type" : "integer"
- },
- "json_query" : {
- "type" : "object",
- "properties" : { }
- },
- "average_execution_time" : {
- "oneOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
- },
- "cached" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "data" : {
- "$ref" : "#/components/schemas/metabase.query-processor.schema..query-result.data"
- }
- },
- "required" : [ "status", "row_count" ]
- },
- "metabase.source-swap.schema.column-error" : {
- "type" : "string",
- "enum" : [ "column-type-mismatch", "missing-primary-key", "missing-foreign-key", "foreign-key-mismatch" ]
- },
- "metabase.sync.schedules.ExpandedSchedulesMap" : {
- "description" : "value must be a valid map of schedule maps for a DB.",
- "type" : "object",
- "properties" : {
- "cache_field_values" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap"
- }, {
- "type" : "null"
- } ]
- },
- "metadata_sync" : {
- "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap"
- }
- }
- },
- "metabase.task-history.api.RunEntity" : {
- "type" : "object",
- "properties" : {
- "entity_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "entity_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "entity_type" : {
- "type" : "string",
- "enum" : [ "dashboard", "card", "database" ]
- }
- },
- "required" : [ "entity_type", "entity_id" ]
- },
- "metabase.task-history.api.RunFilterParams" : {
- "type" : "object",
- "properties" : {
- "entity-id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "entity-type" : {
- "type" : "string",
- "enum" : [ "dashboard", "card", "database" ]
- },
- "run-type" : {
- "type" : "string",
- "enum" : [ "alert", "sync", "fingerprint", "subscription" ]
- },
- "started-at" : {
- "type" : "string",
- "minLength" : 1
- },
- "status" : {
- "type" : "string",
- "enum" : [ "started", "success", "failed", "abandoned" ]
- }
- }
+ "fk-target-field-id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/simple-display-name" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/desired-column-alias" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.desired-column-alias"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "lib/type", "name", "base-type" ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.kebab-cased-map"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source"
+ }, {
+ "allOf" : [ ]
+ } ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.legacy-column-metadata"
+ } ]
},
- "metabase.task-history.api.TaskHistory" : {
- "type" : "object",
- "properties" : {
- "task_details" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "started_at" : { },
- "ended_at" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- },
- "status" : {
- "type" : "string",
- "enum" : [ "started", "success", "failed", "unknown" ]
- },
- "logs" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- },
- "task" : {
- "type" : "string"
- },
- "duration" : {
- "oneOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
- },
- "run_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "id", "task", "started_at", "ended_at", "duration", "status" ]
+ "metabase.lib.schema.metadata.metadata-provider" : {
+ "description" : "Schema for something that satisfies the [[metabase.lib.metadata.protocols/MetadataProvider]] protocol.",
+ "$ref" : "#/components/schemas/metabase.lib.metadata.protocols.metadata-provider"
},
- "metabase.task-history.api.TaskRun" : {
- "type" : "object",
- "properties" : {
- "run_type" : {
- "type" : "string",
- "enum" : [ "alert", "sync", "fingerprint", "subscription" ]
- },
- "entity_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "started_at" : { },
- "failed_count" : {
- "type" : "integer"
- },
- "ended_at" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- },
- "entity_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "status" : {
- "type" : "string",
- "enum" : [ "started", "success", "failed", "abandoned" ]
- },
- "task_count" : {
- "type" : "integer"
- },
- "success_count" : {
- "type" : "integer"
- },
- "entity_type" : {
- "type" : "string",
- "enum" : [ "dashboard", "card", "database" ]
- }
- },
- "required" : [ "id", "run_type", "entity_type", "entity_id", "started_at", "ended_at", "status" ]
+ "metabase.lib.schema.metadata.original-name" : {
+ "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.",
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "metabase.task-history.api.TaskRunWithTasks" : {
- "type" : "object",
- "properties" : {
- "run_type" : {
- "type" : "string",
- "enum" : [ "alert", "sync", "fingerprint", "subscription" ]
- },
- "tasks" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.task-history.api.TaskHistory"
- }
- },
- "entity_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "started_at" : { },
- "failed_count" : {
- "type" : "integer"
- },
- "ended_at" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- },
- "entity_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "status" : {
- "type" : "string",
- "enum" : [ "started", "success", "failed", "abandoned" ]
- },
- "task_count" : {
- "type" : "integer"
- },
- "success_count" : {
- "type" : "integer"
- },
- "entity_type" : {
- "type" : "string",
- "enum" : [ "dashboard", "card", "database" ]
- }
- },
- "required" : [ "id", "run_type", "entity_type", "entity_id", "started_at", "ended_at", "status", "tasks" ]
+ "metabase.lib.schema.metadata.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"
},
- "metabase.task-history.api.TaskRunsResponse" : {
+ "metabase.lib.schema.metadata.stage" : {
+ "description" : "Metadata about the columns returned by a particular stage of a pMBQL query. For example a single-stage native query\n like\n\n {:database 1\n :lib/type :mbql/query\n :stages [{:lib/type :mbql.stage/mbql\n :native \"SELECT id, name FROM VENUES;\"}]}\n\n might have stage metadata like\n\n {:columns [{:name \"id\", :base-type :type/Integer}\n {:name \"name\", :base-type :type/Text}]}\n\n associated with the query's lone stage.\n\n At some point in the near future we will hopefully attach this metadata directly to each stage in a query, so a\n multi-stage query will have `:lib/stage-metadata` for each stage. The main goal is to facilitate things like\n returning lists of visible or filterable columns for a given stage of a query. This is TBD, see #28717 for a WIP\n implementation of this idea.\n\n This is the same format as the results metadata returned with QP results in `data.results_metadata`. The `:columns`\n portion of this (`data.results_metadata.columns`) is also saved as `Card.result_metadata` for Saved Questions.\n\n Note that queries currently actually come back with both `data.results_metadata` AND `data.cols`; it looks like the\n Frontend actually *merges* these together -- see `applyMetadataDiff` in\n `frontend/src/metabase/query_builder/selectors.js` -- but this is ridiculous. Let's try to merge anything missing in\n `results_metadata` into `cols` going forward so things don't need to be manually merged in the future.",
"type" : "object",
"properties" : {
- "data" : {
+ "columns" : {
"type" : "array",
"items" : {
- "$ref" : "#/components/schemas/metabase.task-history.api.TaskRun"
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.column"
}
},
- "limit" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "offset" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater or equal to than zero.",
- "type" : "integer",
- "minimum" : 0
- }, {
- "type" : "null"
- } ]
- },
- "total" : {
- "description" : "value must be an integer greater or equal to than zero.",
- "type" : "integer",
- "minimum" : 0
- }
- },
- "required" : [ "total", "limit", "offset", "data" ]
- },
- "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
+ "lib/type" : {
+ "default" : "metadata/results",
+ "const" : "metadata/results"
}
},
- "required" : [ "id" ]
- },
- "metabase.timeline.api.timeline.include" : {
- "type" : "string",
- "enum" : [ "events" ]
- },
- "metabase.transforms-base.util.source-table-entry" : {
- "description" : "A source table entry in the array format. Combines alias with table reference.",
+ "required" : [ "lib/type", "columns" ]
+ },
+ "metabase.lib.schema.middleware-options.middleware-options" : {
+ "description" : "Additional options that can be used to toggle middleware on or off.",
"type" : "object",
"properties" : {
- "alias" : {
- "type" : "string"
+ "add-default-userland-constraints?" : {
+ "description" : "Whether to add some default `max-results` and `max-results-bare-rows` constraints. By default, none are added,\n although the functions that ultimately power most API endpoints tend to set this to `true`. See\n `add-constraints` middleware for more details.",
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
},
- "database_id" : {
- "type" : "integer"
+ "disable-max-results?" : {
+ "description" : "Disable applying a default limit on the query results. Handled in the `add-default-limit` middleware. If true,\n this will override the `:max-results` and `:max-results-bare-rows` values in `Constraints`.",
+ "type" : "boolean"
},
- "schema" : {
+ "disable-mbql->native?" : {
+ "description" : "Disable the MBQL->native middleware. If you do this, the query will not work at all, so there are no cases where\n you should set this yourself. This is only used by the `metabase.query-processor.preprocess/preprocess` function to\n get the fully pre-processed query without attempting to convert it to native.",
+ "type" : "boolean"
+ },
+ "format-rows?" : {
+ "description" : "Should we skip converting datetime types to ISO-8601 strings with appropriate timezone when post-processing\n results? Used by `metabase.query-processor.middleware.format-rows`default `false`.",
+ "type" : "boolean"
+ },
+ "process-viz-settings?" : {
+ "description" : "Whether to process a question's visualization settings and include them in the result metadata so that they can\n incorporated into an export. Used by `metabase.query-processor.middleware.visualization-settings`; default\n `false`.",
"oneOf" : [ {
- "type" : "string"
+ "type" : "boolean"
}, {
"type" : "null"
} ]
},
- "table" : {
- "type" : "string"
+ "skip-results-metadata?" : {
+ "description" : "Should we skip adding `results_metadata` to query results after running the query? Used by\n `metabase.query-processor.middleware.results-metadata`; default `false`. (Note: we may change the name of this\n column in the near future, to `result_metadata`, to fix inconsistencies in how we name things.)",
+ "type" : "boolean"
},
- "table_id" : {
+ "userland-query?" : {
+ "description" : "Userland queries are ones ran as a result of an API call, Pulse, or the like. Special handling is done in\n certain userland-only middleware for such queries -- results are returned in a slightly different format, and\n QueryExecution entries are normally saved, unless you pass `:no-save` as the option.",
"oneOf" : [ {
- "type" : "integer"
+ "type" : "boolean"
}, {
"type" : "null"
} ]
}
- },
- "required" : [ "alias", "database_id", "schema" ]
+ }
},
- "metabase.transforms-rest.api.transform.run-trigger" : {
- "type" : "string",
- "enum" : [ "none", "global-schedule" ]
+ "metabase.lib.schema.order-by.order-by" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/mbql.clause.asc"
+ }, {
+ "$ref" : "#/components/schemas/mbql.clause.desc"
+ } ]
},
- "metabase.transforms.schema.append-config" : {
+ "metabase.lib.schema.order-by.order-bys" : {
+ "allOf" : [ {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.order-by.order-by"
+ },
+ "minItems" : 1
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.util.distinct-mbql-clauses"
+ } ]
+ },
+ "metabase.lib.schema.page" : {
+ "description" : "`page` = page num, starting with 1. `items` = number of items per page.\n e.g.\n\n {:page 1, :items 10} = items 1-10\n {:page 2, :items 10} = items 11-20",
"type" : "object",
"properties" : {
- "type" : {
- "const" : "append"
+ "items" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "page" : {
+ "type" : "integer",
+ "minimum" : 1
}
},
- "required" : [ "type" ]
+ "required" : [ "page", "items" ]
},
- "metabase.transforms.schema.checkpoint-strategy" : {
+ "metabase.lib.schema.parameter..dimension.options" : {
"type" : "object",
"properties" : {
- "checkpoint-filter-field-id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- },
- "type" : {
- "const" : "checkpoint"
+ "stage-number" : {
+ "type" : "integer"
}
- },
- "required" : [ "type" ]
+ }
},
- "metabase.transforms.schema.id" : {
- "type" : "integer",
- "minimum" : 1
+ "metabase.lib.schema.parameter..dimension.target" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-expression-ref"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.template-tag"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-field-ref"
+ } ]
},
- "metabase.transforms.schema.source-incremental-strategy" : {
+ "metabase.lib.schema.parameter..parameter.value" : { },
+ "metabase.lib.schema.parameter..target.legacy-expression-ref" : {
+ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.expression"
+ },
+ "metabase.lib.schema.parameter..target.legacy-field-ref" : {
+ "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field"
+ },
+ "metabase.lib.schema.parameter..template-tag.tag-name" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.transforms.schema.checkpoint-strategy"
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }
+ },
+ "required" : [ "id" ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ } ]
+ },
+ "metabase.lib.schema.parameter..variable.target" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-field-ref"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.template-tag"
+ } ]
+ },
+ "metabase.lib.schema.parameter.dimension" : { },
+ "metabase.lib.schema.parameter.id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ },
+ "metabase.lib.schema.parameter.parameter" : {
+ "description" : "Schema for the *value* of a parameter (e.g. a Dashboard parameter or a native query template tag) as passed in as\n part of the `:parameters` list in a query.\n\n Note that this is different from the parameter declarations that are saved as part of Dashboards and Cards; for THAT\n schema refer to `:metabase.parameters.schema/parameter`.",
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "default" : { },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id"
+ },
+ "name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ },
+ "required" : { },
+ "slug" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ },
+ "target" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.target"
+ },
+ "type" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.type"
+ },
+ "value" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter..parameter.value"
+ }
+ },
+ "required" : [ "type" ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.kebab-cased-map"
+ } ]
+ },
+ "metabase.lib.schema.parameter.parameters" : {
+ "description" : "Schema for a list of `:parameters` as passed in to a query.",
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameter"
+ }
+ },
+ "metabase.lib.schema.parameter.target" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.dimension"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.variable"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.text-tag"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-field-ref"
+ } ]
+ },
+ "metabase.lib.schema.parameter.template-tag" : {
+ "description" : "This is the reference like [:template-tag <whatever>], not the schema for native query template tags -- that lives\n in [[metabase.lib.schema.template-tag]].",
+ "type" : "array",
+ "prefixItems" : [ {
+ "const" : "template-tag"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter..template-tag.tag-name"
+ } ]
+ },
+ "metabase.lib.schema.parameter.text-tag" : {
+ "description" : "A :text-tag parameter :target applies to parameterized text cards in viz settings",
+ "type" : "array",
+ "prefixItems" : [ {
+ "const" : "text-tag"
+ }, {
+ "type" : "string"
+ } ]
+ },
+ "metabase.lib.schema.parameter.type" : {
+ "description" : "Valid parameter :type",
+ "default" : "text",
+ "type" : "string",
+ "enum" : [ "number", "text", "date", "boolean", "date/single", "id", "category", "location/city", "location/state", "location/zip_code", "location/country", "date/range", "date/month-year", "date/quarter-year", "date/relative", "date/all-options", "temporal-unit", "number/!=", "number/<=", "number/=", "number/>=", "number/between", "string/!=", "string/=", "string/contains", "string/does-not-contain", "string/ends-with", "string/starts-with", "boolean/=" ]
+ },
+ "metabase.lib.schema.parameter.variable" : {
+ "type" : "array",
+ "prefixItems" : [ {
+ "const" : "variable"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter..variable.target"
+ } ]
+ },
+ "metabase.lib.schema.parameter.widget-type" : {
+ "description" : "The type of widget to display in the FE UI for the user to use to pick values for this parameter.",
+ "type" : "string",
+ "enum" : [ "none", "number", "text", "date", "boolean", "date/single", "id", "category", "location/city", "location/state", "location/zip_code", "location/country", "date/range", "date/month-year", "date/quarter-year", "date/relative", "date/all-options", "temporal-unit", "number/!=", "number/<=", "number/=", "number/>=", "number/between", "string/!=", "string/=", "string/contains", "string/does-not-contain", "string/ends-with", "string/starts-with", "boolean/=" ]
+ },
+ "metabase.lib.schema.query" : {
+ "allOf" : [ {
+ "description" : "Valid MBQL 5 query.",
+ "type" : "object",
+ "properties" : {
+ "lib/metadata" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata.metadata-provider"
+ },
+ "update-row" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.actions.row"
+ },
+ "lib/type" : {
+ "default" : "mbql/query",
+ "const" : "mbql/query"
+ },
+ "settings" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.settings.settings"
+ },
+ "constraints" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.constraints.constraints"
+ },
+ "info" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.info.info"
+ },
+ "middleware" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.middleware-options.middleware-options"
+ },
+ "database" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.saved-questions-virtual-database"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ } ]
+ },
+ "stages" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.stages"
+ },
+ "parameters" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters"
+ },
+ "create-row" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.actions.row"
+ }
+ },
+ "required" : [ "lib/type", "stages" ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.util.unique-uuids"
+ }, {
+ "allOf" : [ ]
} ]
},
- "metabase.transforms.schema.table-incremental-target" : {
+ "metabase.lib.schema.ref..expression.options" : {
+ "default" : { },
"type" : "object",
"properties" : {
- "database" : {
- "type" : "integer"
+ "base-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ }, {
+ "type" : "null"
+ } ]
},
- "name" : {
- "type" : "string"
+ "database-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
},
- "schema" : {
+ "display-name" : {
"oneOf" : [ {
- "type" : "string",
- "minLength" : 1
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
}, {
"type" : "null"
} ]
},
- "target-incremental-strategy" : {
- "$ref" : "#/components/schemas/metabase.transforms.schema.target-incremental-strategy"
+ "effective-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ }, {
+ "type" : "null"
+ } ]
},
- "type" : {
- "const" : "table-incremental"
- }
- },
- "required" : [ "type", "name", "target-incremental-strategy" ]
- },
- "metabase.transforms.schema.table-target" : {
- "type" : "object",
- "properties" : {
- "database" : {
- "type" : "integer"
+ "lib/uuid" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
},
"name" : {
- "type" : "string"
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
},
- "schema" : {
+ "semantic-type" : {
"oneOf" : [ {
- "type" : "string",
- "minLength" : 1
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
}, {
"type" : "null"
} ]
},
- "type" : {
- "const" : "table"
+ "temporal-unit" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
}
},
- "required" : [ "type", "name" ]
+ "required" : [ "lib/uuid" ]
},
- "metabase.transforms.schema.target-incremental-strategy" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.transforms.schema.append-config"
+ "metabase.lib.schema.ref..field.id" : {
+ "type" : "array",
+ "prefixItems" : [ {
+ "const" : "field"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.ref..field.options"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
} ]
},
- "metabase.transforms.schema.transform" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "oneOf" : [ {
+ "metabase.lib.schema.ref..field.literal" : {
+ "type" : "array",
+ "prefixItems" : [ {
+ "const" : "field"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.ref..field.literal.options"
+ }, {
+ "type" : "string"
+ } ]
+ },
+ "metabase.lib.schema.ref..field.literal.options" : {
+ "allOf" : [ {
+ "default" : { },
+ "type" : "object",
+ "properties" : {
+ "binning" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
+ },
+ "inherited-temporal-unit" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
+ },
+ "database-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display-name" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "source-field-name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ },
+ "effective-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "base-type" : {
"type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase.transforms.schema.id"
- },
- "name" : {
- "type" : "string"
- },
- "source" : {
- "$ref" : "#/components/schemas/metabase.transforms.schema.transform-source"
+ },
+ "lib/uuid" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
+ },
+ "name" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-effective-type" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ },
+ "source-field" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ },
+ "join-alias" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
+ },
+ "lib/original-binning" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
+ },
+ "temporal-unit" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
+ },
+ "source-field-join-alias" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ },
+ "semantic-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "original-temporal-unit" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
+ }
},
- "target" : {
- "$ref" : "#/components/schemas/metabase.transforms.schema.transform-target"
- }
- },
- "required" : [ "id", "name", "source", "target" ]
+ "required" : [ "lib/uuid", "base-type" ]
+ }, {
+ "allOf" : [ ]
+ } ]
},
- "metabase.transforms.schema.transform-source" : {
- "oneOf" : [ {
+ "metabase.lib.schema.ref..field.options" : {
+ "allOf" : [ {
+ "default" : { },
"type" : "object",
"properties" : {
- "query" : {
- "$ref" : "#/components/schemas/metabase.queries.schema.query"
+ "binning" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
},
- "source-incremental-strategy" : {
- "$ref" : "#/components/schemas/metabase.transforms.schema.source-incremental-strategy"
+ "inherited-temporal-unit" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
+ },
+ "database-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display-name" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "source-field-name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ },
+ "effective-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "base-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/uuid" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
+ },
+ "name" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "lib/original-effective-type" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
+ },
+ "source-field" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ },
+ "join-alias" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.join.alias"
},
- "type" : {
- "const" : "query"
- }
- },
- "required" : [ "type", "query" ]
- }, {
- "type" : "object",
- "properties" : {
- "body" : {
- "type" : "string"
+ "lib/original-binning" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning"
},
- "source-database" : {
- "type" : "integer"
+ "temporal-unit" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
},
- "source-incremental-strategy" : {
- "$ref" : "#/components/schemas/metabase.transforms.schema.source-incremental-strategy"
+ "source-field-join-alias" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
},
- "source-tables" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.transforms-base.util.source-table-entry"
- }
+ "semantic-type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
+ }, {
+ "type" : "null"
+ } ]
},
- "type" : {
- "const" : "python"
+ "original-temporal-unit" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
}
},
- "required" : [ "source-tables", "type", "body" ]
- } ]
- },
- "metabase.transforms.schema.transform-target" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.transforms.schema.table-target"
+ "required" : [ "lib/uuid" ]
}, {
- "$ref" : "#/components/schemas/metabase.transforms.schema.table-incremental-target"
+ "allOf" : [ ]
} ]
},
- "metabase.users.schema.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.",
+ "metabase.lib.schema.ref.aggregation-options" : {
+ "default" : { },
"type" : "object",
"properties" : {
- "schedule_day" : {
+ "base-type" : {
"oneOf" : [ {
- "type" : "string",
- "enum" : [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ]
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
}, {
"type" : "null"
} ]
},
- "schedule_frame" : {
+ "database-type" : {
"oneOf" : [ {
- "type" : "string",
- "enum" : [ "first", "mid", "last" ]
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
}, {
"type" : "null"
} ]
},
- "schedule_hour" : {
+ "display-name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "effective-type" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.util.cron.CronHour"
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type"
}, {
"type" : "null"
} ]
},
- "schedule_minute" : {
+ "lib/source-name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ },
+ "lib/uuid" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid"
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "semantic-type" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.util.cron.CronMinute"
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type"
}, {
"type" : "null"
} ]
- },
- "schedule_type" : {
- "type" : "string",
- "enum" : [ "hourly", "daily", "weekly", "monthly" ]
}
},
- "required" : [ "schedule_type" ]
- },
- "metabase.warehouse-schema-rest.api.table.data-authority-write" : {
- "description" : "Schema for writing a valid table data authority.",
- "type" : "string",
- "enum" : [ "computed", "authoritative", "unconfigured", "ingested" ]
- },
- "metabase.warehouse-schema-rest.api.table.data-layers" : {
- "type" : "string",
- "enum" : [ "final", "internal", "hidden" ]
+ "required" : [ "lib/uuid" ]
},
- "metabase.warehouse-schema-rest.api.table.data-sources" : {
- "type" : "string",
- "enum" : [ "source-data", "transform", "unknown", "ingested", "metabase-transform", "upload" ]
+ "metabase.lib.schema.ref.ref" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause"
},
- "metabase.warehouses-rest.api.available-settings" : {
+ "metabase.lib.schema.settings.settings" : {
+ "description" : "Options that tweak the behavior of the query processor.",
"type" : "object",
- "additionalProperties" : {
+ "properties" : {
+ "include-sensitive-fields" : {
+ "description" : "Whether to include fields with visibility_type :sensitive when fetching query metadata.",
+ "type" : "boolean"
+ },
+ "report-timezone" : {
+ "description" : "The timezone the query should be ran in, overriding the default report timezone for the instance.",
+ "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.timezone-id"
+ }
+ }
+ },
+ "metabase.lib.schema.stage" : {
+ "default" : {
+ "lib/type" : "mbql.stage/mbql"
+ },
+ "allOf" : [ {
"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" ]
- }
+ "lib/type" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema..stage.type"
}
},
- "required" : [ "enabled" ]
- }
+ "required" : [ "lib/type" ]
+ }, {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema..stage.native"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema..stage.mbql"
+ } ]
+ }, {
+ "allOf" : [ ]
+ } ]
},
- "metabase.xrays.api.automagic-dashboards.base-64-encoded-json" : {
- "description" : "form-encoded base-64-encoded JSON"
+ "metabase.lib.schema.stages" : {
+ "allOf" : [ {
+ "default" : [ ],
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.stage"
+ },
+ "minItems" : 1
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema..stages.valid-refs"
+ } ]
},
- "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__<id>`-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.)",
+ "metabase.lib.schema.template-tag..field-filter.options" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "metabase.lib.schema.template-tag..raw-value.type" : {
"type" : "string",
- "minLength" : 1
+ "enum" : [ "date", "number", "boolean", "text" ]
+ },
+ "metabase.lib.schema.template-tag..template-tag-map.validate-names" : { },
+ "metabase.lib.schema.template-tag..value.common" : {
+ "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.template-tag.name"
+ },
+ "required" : {
+ "type" : "boolean"
+ }
+ },
+ "required" : [ "name", "display-name" ]
+ },
+ "metabase.lib.schema.template-tag.common" : {
+ "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.template-tag.name"
+ }
+ },
+ "required" : [ "name", "display-name" ]
},
- "metabot.reaction.redirect" : {
+ "metabase.lib.schema.template-tag.disallow-dimension" : { },
+ "metabase.lib.schema.template-tag.field-filter" : {
"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.template-tag.name"
+ },
+ "required" : {
+ "type" : "boolean"
+ },
"type" : {
- "const" : "metabot.reaction/redirect"
+ "const" : "dimension"
},
- "url" : {
+ "alias" : {
"type" : "string"
- }
- },
- "required" : [ "type", "url" ]
- }
- },
- "securitySchemes" : {
- "ApiKeyAuth" : {
- "type" : "apiKey",
- "in" : "header",
- "name" : "X-API-Key",
- "description" : "API key for authentication"
- }
- }
- },
- "info" : {
- "title" : "Metabase API documentation",
- "description" : "- **The API is subject to change.** We rarely change API endpoints, and almost never remove them, but if you write code that relies on the API, there's a chance you might have to update your code in the future.\n- **The API isn't versioned.** So don’t expect to stay on a particular version of Metabase in order to use a “stable” API.\n\n## API tutorial\n\nCheck out an introduction to the [Metabase API](https://www.metabase.com/learn/administration/metabase-api.html).\n\n## API keys\n\nCreate keys to authenticate programmatic requests to your Metabase. See [API keys](./people-and-groups/api-keys).\n\n## API changelog\n\nFor breaking changes, see the API [changelog](./developers-guide/api-changelog).\n\n## View the API docs for your Metabase\n\nYou can view the API docs for your Metabase by visiting `https://[your-metabase-url]/api/docs`.\n\n## Generating API docs\n\nYou can generate these docs by running:\n\n```\nclojure -M:ee:doc api-documentation\n```\n"
- },
- "openapi" : "3.1.0",
- "paths" : {
- "/api/action" : {
- "get" : {
- "operationId" : "get-api-action",
- "summary" : "GET /api/action",
- "description" : "Returns actions that can be used for QueryActions. By default lists all viewable actions. Pass optional\n `?model-id=<model-id>` to limit to actions on a particular model.",
- "parameters" : [ {
- "in" : "query",
- "name" : "model-id",
- "required" : false,
- "schema" : {
+ },
+ "options" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag..field-filter.options"
}, {
"type" : "null"
} ]
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.actions.schema.action"
- }
- }
- }
- }
},
- "4XX" : {
- "description" : "Client error response"
+ "dimension" : {
+ "$ref" : "#/components/schemas/mbql.clause.field"
},
- "5XX" : {
- "description" : "Server error response"
+ "default" : { },
+ "widget-type" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.widget-type"
}
},
- "tags" : [ "/api/action" ]
+ "required" : [ "name", "display-name", "type", "widget-type" ]
},
- "post" : {
- "operationId" : "post-api-action",
- "summary" : "POST /api/action",
- "description" : "Create a new action.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.actions.schema.action"
- }
- }
+ "metabase.lib.schema.template-tag.id" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "format" : "uuid"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ } ]
+ },
+ "metabase.lib.schema.template-tag.name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ },
+ "metabase.lib.schema.template-tag.raw-value" : {
+ "allOf" : [ {
+ "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.template-tag.name"
+ },
+ "required" : {
+ "type" : "boolean"
+ },
+ "type" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag..raw-value.type"
}
},
- "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" : {
- "operationId" : "get-api-action-public",
- "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" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.actions.schema.action"
- }
- }
- }
+ "required" : [ "name", "display-name", "type" ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.disallow-dimension"
+ } ]
+ },
+ "metabase.lib.schema.template-tag.snippet" : {
+ "allOf" : [ {
+ "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.template-tag.name"
+ },
+ "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"
}
},
- "4XX" : {
- "description" : "Client error response"
+ "required" : [ "name", "display-name", "type", "snippet-name" ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.disallow-dimension"
+ } ]
+ },
+ "metabase.lib.schema.template-tag.source-filter" : {
+ "description" : "Schema for a single source-filter applied to a table template tag.",
+ "type" : "object",
+ "properties" : {
+ "field-id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
},
- "5XX" : {
- "description" : "Server error response"
- }
+ "op" : {
+ "type" : "string",
+ "enum" : [ "<=", ">", ">=", "!=", "=", "<" ]
+ },
+ "value" : { }
},
- "tags" : [ "/api/action" ]
- }
- },
- "/api/action/{action-id}" : {
- "get" : {
- "operationId" : "get-api-action-action-id",
- "summary" : "GET /api/action/{action-id}",
- "description" : "Fetch an Action.",
- "parameters" : [ {
- "in" : "path",
- "name" : "action-id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
+ "required" : [ "field-id", "op", "value" ]
+ },
+ "metabase.lib.schema.template-tag.source-query" : {
+ "allOf" : [ {
+ "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.template-tag.name"
+ },
+ "type" : {
+ "const" : "card"
+ }
},
- "description" : "value must be an integer greater than zero."
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.actions.schema.action"
- }
+ "required" : [ "name", "display-name", "type", "card-id" ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.disallow-dimension"
+ } ]
+ },
+ "metabase.lib.schema.template-tag.source-table" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "display-name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ },
+ "emit-alias" : {
+ "type" : "boolean"
+ },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id"
+ },
+ "name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.name"
+ },
+ "source-filters" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.source-filter"
}
+ },
+ "table-id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.table"
+ },
+ "type" : {
+ "const" : "table"
}
},
- "4XX" : {
- "description" : "Client error response"
+ "required" : [ "name", "display-name", "type", "table-id" ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.disallow-dimension"
+ } ]
+ },
+ "metabase.lib.schema.template-tag.template-tag" : {
+ "allOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "type" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.type"
+ }
},
- "5XX" : {
- "description" : "Server error response"
+ "required" : [ "type" ]
+ }, {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.temporal-unit"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.field-filter"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.snippet"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.source-query"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.source-table"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.raw-value"
+ } ]
+ } ]
+ },
+ "metabase.lib.schema.template-tag.template-tag-map" : {
+ "allOf" : [ {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.template-tag"
}
- },
- "tags" : [ "/api/action" ]
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag..template-tag-map.validate-names"
+ } ]
},
- "delete" : {
- "operationId" : "delete-api-action-action-id",
- "summary" : "DELETE /api/action/{action-id}",
- "description" : "Delete an Action.",
- "parameters" : [ {
- "in" : "path",
- "name" : "action-id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
+ "metabase.lib.schema.template-tag.temporal-unit" : {
+ "type" : "object",
+ "properties" : {
+ "alias" : {
+ "type" : "string"
},
- "description" : "value must be an integer greater than zero."
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
+ "dimension" : {
+ "$ref" : "#/components/schemas/mbql.clause.field"
},
- "4XX" : {
- "description" : "Client error response"
+ "display-name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
},
- "5XX" : {
- "description" : "Server error response"
+ "id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id"
+ },
+ "name" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.name"
+ },
+ "type" : {
+ "const" : "temporal-unit"
}
},
- "tags" : [ "/api/action" ]
- }
- },
- "/api/action/{action-id}/execute" : {
- "get" : {
- "operationId" : "get-api-action-action-id-execute",
- "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."
+ "required" : [ "name", "display-name", "type" ]
+ },
+ "metabase.lib.schema.template-tag.type" : {
+ "description" : "Schema for valid values of template tag `:type`.",
+ "type" : "string",
+ "enum" : [ "snippet", "card", "dimension", "number", "text", "date", "boolean", "temporal-unit", "table" ]
+ },
+ "metabase.lib.schema.template-tag.widget-type" : {
+ "description" : "Schema for valid values of `:widget-type` for a `:metabase.lib.schema.template-tag/field-filter` template tag.",
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.widget-type"
+ },
+ "metabase.lib.schema.temporal-bucketing..unit.date" : {
+ "type" : "string",
+ "enum" : [ "day", "day-of-month", "day-of-week", "day-of-year", "month", "month-of-year", "quarter", "quarter-of-year", "week", "week-of-year", "year", "year-of-era" ]
+ },
+ "metabase.lib.schema.temporal-bucketing..unit.date-time" : {
+ "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.lib.schema.temporal-bucketing..unit.date-time.interval" : {
+ "type" : "string",
+ "enum" : [ "day", "hour", "millisecond", "minute", "month", "quarter", "second", "week", "year" ]
+ },
+ "metabase.lib.schema.temporal-bucketing..unit.time.interval" : {
+ "type" : "string",
+ "enum" : [ "hour", "millisecond", "minute", "second" ]
+ },
+ "metabase.lib.schema.temporal-bucketing.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.schema.util.distinct-mbql-clauses" : { },
+ "metabase.lib.schema.util.unique-uuids" : { },
+ "metabase.lib.schema.validate.source-entity-type" : {
+ "description" : "The type of the source entity causing an error.",
+ "type" : "string",
+ "enum" : [ "table", "card" ]
+ },
+ "metabase.lib.schema.validate.validate-error-type" : {
+ "type" : "string",
+ "enum" : [ "missing-column", "missing-table-alias", "duplicate-column", "syntax-error", "validation-exception-error" ]
+ },
+ "metabase.logger.api.log-level" : {
+ "type" : "string",
+ "enum" : [ "off", "fatal", "error", "warn", "info", "debug", "trace" ]
+ },
+ "metabase.logger.api.time-unit" : {
+ "type" : "string",
+ "enum" : [ "days", "hours", "minutes", "seconds", "milliseconds", "microseconds", "nanoseconds" ]
+ },
+ "metabase.measures.api.RemappedValueResponse" : {
+ "description" : "Response schema for dimension remapping endpoint.\n Returns [value] if no remapping, or [value, display-name] if remapped.",
+ "anyOf" : [ {
+ "type" : "array",
+ "prefixItems" : [ { } ]
}, {
- "in" : "query",
- "name" : "parameters",
- "required" : true,
- "schema" : {
+ "type" : "array",
+ "prefixItems" : [ { }, {
"type" : "string"
+ } ]
+ } ]
+ },
+ "metabase.measures.api.measure" : {
+ "description" : "Schema for a Measure entity as returned from the API.",
+ "type" : "object",
+ "properties" : {
+ "dimension_mappings" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : { }
+ }
+ }, {
+ "type" : "null"
+ } ]
},
- "description" : "value must be a valid JSON string."
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
+ "entity_id" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "4XX" : {
- "description" : "Client error response"
+ "result_column_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/action" ]
- }
- },
- "/api/action/{id}" : {
- "put" : {
- "operationId" : "put-api-action-id",
- "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"
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "4XX" : {
- "description" : "Client error response"
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "archived" : {
+ "type" : "boolean"
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.actions.schema..action.for-update"
+ "dimensions" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : { }
}
- }
- }
- },
- "tags" : [ "/api/action" ]
- }
- },
- "/api/action/{id}/execute" : {
- "post" : {
- "operationId" : "post-api-action-id-execute",
- "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"
+ }, {
+ "type" : "null"
+ } ]
},
- "4XX" : {
- "description" : "Client error response"
+ "updated_at" : { },
+ "table_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "parameters" : {
- "oneOf" : [ {
- "type" : "object",
- "additionalProperties" : { }
- }, {
- "type" : "null"
- } ]
- }
- }
- }, {
- "type" : "null"
- } ]
- }
- }
- }
- },
- "tags" : [ "/api/action" ]
- }
- },
- "/api/action/{id}/public_link" : {
- "post" : {
- "operationId" : "post-api-action-id-public_link",
- "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"
+ "definition" : {
+ "type" : "object",
+ "properties" : { }
},
- "4XX" : {
- "description" : "Client error response"
+ "created_at" : { },
+ "creator_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "5XX" : {
- "description" : "Server error response"
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
}
},
- "tags" : [ "/api/action" ]
+ "required" : [ "id", "name", "table_id", "definition", "archived", "creator_id", "created_at", "updated_at" ]
},
- "delete" : {
- "operationId" : "delete-api-action-id-public_link",
- "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"
+ "metabase.metabot.context.context" : {
+ "type" : "object",
+ "additionalProperties" : { }
+ },
+ "metabase.metabot.schema.message" : {
+ "type" : "object",
+ "properties" : {
+ "content" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "4XX" : {
- "description" : "Client error response"
+ "role" : {
+ "$ref" : "#/components/schemas/metabase.metabot.schema.role"
},
- "5XX" : {
- "description" : "Server error response"
+ "tool_call_id" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "tool_calls" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "arguments" : {
+ "type" : "string"
+ },
+ "id" : {
+ "type" : "string"
+ },
+ "name" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "id", "name", "arguments" ]
+ }
+ }, {
+ "type" : "null"
+ } ]
}
},
- "tags" : [ "/api/action" ]
- }
- },
- "/api/activity/most_recently_viewed_dashboard" : {
- "get" : {
- "operationId" : "get-api-activity-most_recently_viewed_dashboard",
- "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"
+ "required" : [ "role" ]
+ },
+ "metabase.metabot.schema.messages" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.metabot.schema.message"
+ }
+ },
+ "metabase.metabot.schema.role" : {
+ "type" : "string",
+ "enum" : [ "system", "user", "assistant", "tool" ]
+ },
+ "metabase.metrics.api.BreakoutValuesResponse" : {
+ "type" : "object",
+ "properties" : {
+ "col" : {
+ "type" : "object",
+ "properties" : { }
},
- "5XX" : {
- "description" : "Server error response"
+ "values" : {
+ "type" : "array",
+ "items" : { }
}
},
- "tags" : [ "/api/activity" ]
- }
- },
- "/api/activity/popular_items" : {
- "get" : {
- "operationId" : "get-api-activity-popular_items",
- "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"
+ "required" : [ "values", "col" ]
+ },
+ "metabase.metrics.api.DatasetRequest" : {
+ "description" : "Schema for POST /dataset request body.",
+ "type" : "object",
+ "properties" : {
+ "definition" : {
+ "$ref" : "#/components/schemas/metabase.metrics.api.Definition"
}
},
- "tags" : [ "/api/activity" ]
- }
- },
- "/api/activity/recent_views" : {
- "get" : {
- "operationId" : "get-api-activity-recent_views",
- "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"
+ "required" : [ "definition" ]
+ },
+ "metabase.metrics.api.DatasetResponse" : {
+ "description" : "Schema for POST /dataset response.",
+ "type" : "object",
+ "properties" : {
+ "data" : {
+ "type" : "object",
+ "properties" : {
+ "cols" : {
+ "type" : "array",
+ "items" : { }
+ },
+ "rows" : {
+ "type" : "array",
+ "items" : { }
+ }
+ },
+ "required" : [ "cols", "rows" ]
},
- "4XX" : {
- "description" : "Client error response"
+ "row_count" : {
+ "description" : "value must be an integer greater or equal to than zero.",
+ "type" : "integer",
+ "minimum" : 0
},
- "5XX" : {
- "description" : "Server error response"
+ "status" : {
+ "enum" : [ "completed", "completed" ]
}
},
- "deprecated" : true,
- "tags" : [ "/api/activity" ]
- }
- },
- "/api/activity/recents" : {
- "get" : {
- "operationId" : "get-api-activity-recents",
- "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" : true,
- "schema" : {
- "default" : false,
+ "required" : [ "status", "data", "row_count" ]
+ },
+ "metabase.metrics.api.Definition" : {
+ "description" : "Schema for the definition object within a dataset request.\n Uses expression-based contract for metric math support.",
+ "type" : "object",
+ "properties" : {
+ "expression" : {
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.metric-math-expression"
+ },
+ "filters" : {
"oneOf" : [ {
- "type" : "boolean"
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.instance-filters"
}, {
"type" : "null"
} ]
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
},
- "5XX" : {
- "description" : "Server error response"
+ "projections" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib-metric.schema.typed-projections"
+ }, {
+ "type" : "null"
+ } ]
}
},
- "tags" : [ "/api/activity" ]
+ "required" : [ "expression" ]
},
- "post" : {
- "operationId" : "post-api-activity-recents",
- "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" : {
+ "metabase.metrics.api.Metric" : {
+ "description" : "Schema for a Metric in list responses (without hydrated dimensions).",
+ "type" : "object",
+ "properties" : {
+ "collection" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "oneOf" : [ {
"description" : "value must be an integer greater than zero.",
"type" : "integer",
"minimum" : 1
- }
+ }, {
+ "type" : "null"
+ } ]
},
- "required" : [ "model", "model_id", "context" ]
- }
- }
- }
- },
- "tags" : [ "/api/activity" ]
- }
- },
- "/api/agent/v1/construct-query" : {
- "post" : {
- "operationId" : "post-api-agent-v1-construct-query",
- "summary" : "POST /api/agent/v1/construct-query",
- "description" : "Construct an MBQL query from a table or metric.\n\n Returns a base64-encoded MBQL query that can be used with the query API.\n\n For tables, supports: filters, fields, aggregations, group_by, order_by, limit.\n For metrics, supports: filters, group_by (aggregation is defined by the metric).",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.agent-api.api.construct-query-response"
+ "name" : {
+ "type" : "string"
}
- }
- }
+ },
+ "required" : [ "id", "name" ]
+ }, {
+ "type" : "null"
+ } ]
},
- "4XX" : {
- "description" : "Client error response"
+ "collection_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.agent-api.api.construct-query-request"
- }
- }
- }
- },
- "tags" : [ "/api/agent" ]
- }
- },
- "/api/agent/v1/execute" : {
- "post" : {
- "operationId" : "post-api-agent-v1-execute",
- "summary" : "POST /api/agent/v1/execute",
- "description" : "Execute an MBQL query and return results.\n\n Accepts a base64-encoded MBQL query (as returned by /v1/construct-query) and executes it,\n returning results with column metadata.\n\n Response format:\n - On success: {:data {:cols [...] :rows [...]} :row_count N :status :completed :running_time M}\n - On failure: {:status :failed :error \"message\" ...}\n\n Standard userspace query limits are enforced (2000 rows for simple queries, 10000 for aggregated).",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.agent-api.api.execute-query-response"
- }
- }
- }
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "4XX" : {
- "description" : "Client error response"
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "5XX" : {
- "description" : "Server error response"
+ "name" : {
+ "type" : "string"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.agent-api.api.execute-query-request"
+ "required" : [ "id", "name", "description", "collection_id" ]
+ },
+ "metabase.metrics.api.MetricWithDimensions" : {
+ "description" : "Schema for a Metric in list responses (without hydrated dimensions).",
+ "type" : "object",
+ "properties" : {
+ "dimension_mappings" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : { }
}
- }
- }
- },
- "tags" : [ "/api/agent" ]
- }
- },
- "/api/agent/v1/metric/{id}" : {
- "get" : {
- "operationId" : "get-api-agent-v1-metric-id",
- "summary" : "GET /api/agent/v1/metric/{id}",
- "description" : "Get details for a metric by ID.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "id", "name" ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "dataset_query" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "result_column_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
"type" : "integer",
"minimum" : 1
},
- "description" : "value must be an integer greater than zero."
- }, {
- "in" : "query",
- "name" : "with-default-temporal-breakout",
- "required" : false,
- "schema" : {
+ "name" : {
+ "type" : "string"
+ },
+ "dimensions" : {
"oneOf" : [ {
- "type" : "boolean"
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : { }
+ }
}, {
"type" : "null"
} ]
- }
- }, {
- "in" : "query",
- "name" : "with-field-values",
- "required" : false,
- "schema" : {
+ },
+ "database_id" : {
"oneOf" : [ {
- "type" : "boolean"
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}, {
"type" : "null"
} ]
- }
- }, {
- "in" : "query",
- "name" : "with-queryable-dimensions",
- "required" : false,
- "schema" : {
+ },
+ "collection_id" : {
"oneOf" : [ {
- "type" : "boolean"
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}, {
"type" : "null"
} ]
- }
- }, {
- "in" : "query",
- "name" : "with-segments",
- "required" : false,
- "schema" : {
+ },
+ "description" : {
"oneOf" : [ {
- "type" : "boolean"
+ "type" : "string"
}, {
"type" : "null"
} ]
}
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.agent-api.api.metric"
+ },
+ "required" : [ "id", "name", "description", "collection_id" ]
+ },
+ "metabase.metrics.api.RemappedValueResponse" : {
+ "description" : "Response schema for dimension remapping endpoint.\n Returns [value] if no remapping, or [value, display-name] if remapped.",
+ "anyOf" : [ {
+ "type" : "array",
+ "prefixItems" : [ { } ]
+ }, {
+ "type" : "array",
+ "prefixItems" : [ { }, {
+ "type" : "string"
+ } ]
+ } ]
+ },
+ "metabase.notification.api.notification.NotificationApiInput" : {
+ "description" : "Notification schema for API input. Like FullyHydratedNotification but restricts templates\n to user-provided types only (no handlebars-resource).",
+ "oneOf" : [ {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "handlers" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_type" : { },
+ "notification_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "recipients" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
+ }
+ },
+ "template" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateUserProvided"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "channel_type" ]
+ }
+ },
+ "payload" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationCard"
+ },
+ "payload_id" : {
+ "type" : "null"
+ },
+ "payload_type" : {
+ "type" : "string",
+ "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
+ },
+ "subscriptions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
+ }
+ }
+ },
+ "required" : [ "payload_type", "payload" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "handlers" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_type" : { },
+ "notification_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "recipients" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
+ }
+ },
+ "template" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateUserProvided"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "channel_type" ]
}
- }
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent" ]
- }
- },
- "/api/agent/v1/metric/{id}/field/{field-id}/values" : {
- "get" : {
- "operationId" : "get-api-agent-v1-metric-id-field-field-id-values",
- "summary" : "GET /api/agent/v1/metric/{id}/field/{field-id}/values",
- "description" : "Get statistics and sample values for a metric field.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- }, {
- "in" : "path",
- "name" : "field-id",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.agent-api.api.field-values"
+ },
+ "payload_id" : {
+ "type" : "null"
+ },
+ "payload_type" : {
+ "type" : "string",
+ "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
+ },
+ "subscriptions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
}
}
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent" ]
- }
- },
- "/api/agent/v1/ping" : {
- "get" : {
- "operationId" : "get-api-agent-v1-ping",
- "summary" : "GET /api/agent/v1/ping",
- "description" : "Health check endpoint for the Agent API.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
+ },
+ "required" : [ "payload_type" ]
+ } ]
+ }, {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "creator_id" : {
+ "type" : "integer"
+ },
+ "handlers" : {
+ "type" : "array",
+ "items" : {
"type" : "object",
"properties" : {
- "message" : {
- "type" : "string"
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_type" : { },
+ "notification_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "recipients" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
+ }
+ },
+ "template" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateUserProvided"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "message" ]
+ "required" : [ "channel_type" ]
}
- }
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent" ]
- }
- },
- "/api/agent/v1/search" : {
- "post" : {
- "operationId" : "post-api-agent-v1-search",
- "summary" : "POST /api/agent/v1/search",
- "description" : "Search for tables and metrics.\n\n Supports both term-based and semantic search queries. Results are ranked using\n Reciprocal Rank Fusion when both query types are provided.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.agent-api.api.search-response"
+ },
+ "payload" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationCard"
+ },
+ "payload_id" : {
+ "type" : "integer"
+ },
+ "payload_type" : {
+ "type" : "string",
+ "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
+ },
+ "subscriptions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
}
}
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "semantic_queries" : {
- "oneOf" : [ {
+ },
+ "required" : [ "payload_type", "payload" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "creator_id" : {
+ "type" : "integer"
+ },
+ "handlers" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_type" : { },
+ "notification_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "recipients" : {
"type" : "array",
"items" : {
- "type" : "string",
- "minLength" : 1
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
}
- }, {
- "type" : "null"
- } ]
+ },
+ "template" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateUserProvided"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
},
- "term_queries" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string",
- "minLength" : 1
- }
- }, {
- "type" : "null"
- } ]
- }
+ "required" : [ "channel_type" ]
}
- }
- }
- }
- },
- "tags" : [ "/api/agent" ]
- }
- },
- "/api/agent/v1/table/{id}" : {
- "get" : {
- "operationId" : "get-api-agent-v1-table-id",
- "summary" : "GET /api/agent/v1/table/{id}",
- "description" : "Get details for a table by ID.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- }, {
- "in" : "query",
- "name" : "with-field-values",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "with-fields",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "with-related-tables",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "with-metrics",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "with-measures",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "with-segments",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.agent-api.api.table"
+ },
+ "payload_id" : {
+ "type" : "integer"
+ },
+ "payload_type" : {
+ "type" : "string",
+ "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
+ },
+ "subscriptions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
}
}
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent" ]
- }
- },
- "/api/agent/v1/table/{id}/field/{field-id}/values" : {
- "get" : {
- "operationId" : "get-api-agent-v1-table-id-field-field-id-values",
- "summary" : "GET /api/agent/v1/table/{id}/field/{field-id}/values",
- "description" : "Get statistics and sample values for a table field.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ },
+ "required" : [ "payload_type" ]
+ } ]
}, {
- "in" : "path",
- "name" : "field-id",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.agent-api.api.field-values"
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "handlers" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_type" : { },
+ "notification_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "recipients" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
+ }
+ },
+ "template" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateUserProvided"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "channel_type" ]
+ }
+ },
+ "payload" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationCard"
+ },
+ "subscriptions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
}
}
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}" : {
- "get" : {
- "operationId" : "get-api-agent-v1-workspace-ws-id",
- "summary" : "GET /api/agent/v1/workspace/{ws-id}",
- "description" : "Get a single workspace by ID.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
+ },
+ "required" : [ "payload" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "handlers" : {
+ "type" : "array",
+ "items" : {
"type" : "object",
"properties" : {
- "collection_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
},
- "created_at" : {
- "type" : "string",
- "format" : "date-time"
+ "channel" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
+ }, {
+ "type" : "null"
+ } ]
},
- "database_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
},
- "id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "channel_type" : { },
+ "notification_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "name" : {
- "type" : "string"
+ "recipients" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
+ }
},
- "status" : {
- "type" : "string",
- "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ "template" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplateUserProvided"
+ }, {
+ "type" : "null"
+ } ]
},
- "updated_at" : {
- "type" : "string",
- "format" : "date-time"
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "id", "name", "collection_id", "database_id", "status", "created_at", "updated_at" ]
+ "required" : [ "channel_type" ]
+ }
+ },
+ "subscriptions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
}
}
}
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/archive" : {
- "post" : {
- "operationId" : "post-api-agent-v1-workspace-ws-id-archive",
- "summary" : "POST /api/agent/v1/workspace/{ws-id}/archive",
- "description" : "Archive a workspace.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
+ } ]
+ } ]
+ },
+ "metabase.notification.models.FullyHydratedNotification" : {
+ "description" : "Fully hydrated notification.",
+ "oneOf" : [ {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "handlers" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_type" : { },
+ "notification_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "recipients" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
+ }
+ },
+ "template" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "channel_type" ]
+ }
+ },
+ "payload" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationCard"
+ },
+ "payload_id" : {
+ "type" : "null"
+ },
+ "payload_type" : {
+ "type" : "string",
+ "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
+ },
+ "subscriptions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
+ }
+ }
+ },
+ "required" : [ "payload_type", "payload" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "handlers" : {
+ "type" : "array",
+ "items" : {
"type" : "object",
"properties" : {
- "collection_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
},
- "created_at" : {
- "type" : "string",
- "format" : "date-time"
+ "channel" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
+ }, {
+ "type" : "null"
+ } ]
},
- "database_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
},
- "id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "channel_type" : { },
+ "notification_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "name" : {
- "type" : "string"
+ "recipients" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
+ }
},
- "status" : {
- "type" : "string",
- "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ "template" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate"
+ }, {
+ "type" : "null"
+ } ]
},
- "updated_at" : {
- "type" : "string",
- "format" : "date-time"
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "id", "name", "collection_id", "database_id", "status", "created_at", "updated_at" ]
+ "required" : [ "channel_type" ]
+ }
+ },
+ "payload_id" : {
+ "type" : "null"
+ },
+ "payload_type" : {
+ "type" : "string",
+ "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
+ },
+ "subscriptions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
}
}
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/external/transform" : {
- "get" : {
- "operationId" : "get-api-agent-v1-workspace-ws-id-external-transform",
- "summary" : "GET /api/agent/v1/workspace/{ws-id}/external/transform",
- "description" : "List external transforms not checked out into this workspace.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
+ },
+ "required" : [ "payload_type" ]
+ } ]
}, {
- "in" : "query",
- "name" : "database-id",
- "required" : false,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "creator_id" : {
+ "type" : "integer"
+ },
+ "handlers" : {
+ "type" : "array",
+ "items" : {
"type" : "object",
"properties" : {
- "transforms" : {
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_type" : { },
+ "notification_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "recipients" : {
"type" : "array",
"items" : {
- "type" : "object",
- "properties" : {
- "checkout_disabled" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string"
- },
- "source_type" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name", "source_type", "checkout_disabled" ]
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
}
+ },
+ "template" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "transforms" ]
- }
- }
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/graph" : {
- "get" : {
- "operationId" : "get-api-agent-v1-workspace-ws-id-graph",
- "summary" : "GET /api/agent/v1/workspace/{ws-id}/graph",
- "description" : "Get the dependency graph for a workspace.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
+ "required" : [ "channel_type" ]
+ }
+ },
+ "payload" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationCard"
+ },
+ "payload_id" : {
+ "type" : "integer"
+ },
+ "payload_type" : {
+ "type" : "string",
+ "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
+ },
+ "subscriptions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
+ }
+ }
+ },
+ "required" : [ "payload_type", "payload" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "creator_id" : {
+ "type" : "integer"
+ },
+ "handlers" : {
+ "type" : "array",
+ "items" : {
"type" : "object",
"properties" : {
- "edges" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "from_entity_id" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- } ]
- },
- "from_entity_type" : {
- "type" : "string"
- },
- "to_entity_id" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- } ]
- },
- "to_entity_type" : {
- "type" : "string"
- }
- },
- "required" : [ "from_entity_id", "from_entity_type", "to_entity_id", "to_entity_type" ]
- }
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
},
- "nodes" : {
+ "channel" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_type" : { },
+ "notification_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "recipients" : {
"type" : "array",
"items" : {
- "type" : "object",
- "properties" : {
- "data" : {
- "type" : "object",
- "properties" : { }
- },
- "dependents_count" : {
- "type" : "object",
- "additionalProperties" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }
- },
- "id" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- } ]
- },
- "type" : {
- "type" : "string",
- "enum" : [ "input-table", "external-transform", "workspace-transform" ]
- }
- },
- "required" : [ "id", "type", "dependents_count", "data" ]
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
}
+ },
+ "template" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "nodes", "edges" ]
+ "required" : [ "channel_type" ]
+ }
+ },
+ "payload_id" : {
+ "type" : "integer"
+ },
+ "payload_type" : {
+ "type" : "string",
+ "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
+ },
+ "subscriptions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
}
}
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/input/pending" : {
- "get" : {
- "operationId" : "get-api-agent-v1-workspace-ws-id-input-pending",
- "summary" : "GET /api/agent/v1/workspace/{ws-id}/input/pending",
- "description" : "List pending input grants.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
+ },
+ "required" : [ "payload_type" ]
+ } ]
+ }, {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "handlers" : {
+ "type" : "array",
+ "items" : {
"type" : "object",
"properties" : {
- "inputs" : {
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_type" : { },
+ "notification_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "recipients" : {
"type" : "array",
"items" : {
- "type" : "object",
- "properties" : {
- "db_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "table" : {
- "type" : "string"
- }
- },
- "required" : [ "db_id", "schema", "table" ]
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
}
+ },
+ "template" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "inputs" ]
+ "required" : [ "channel_type" ]
+ }
+ },
+ "payload" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationCard"
+ },
+ "subscriptions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
}
}
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/log" : {
- "get" : {
- "operationId" : "get-api-agent-v1-workspace-ws-id-log",
- "summary" : "GET /api/agent/v1/workspace/{ws-id}/log",
- "description" : "Get workspace creation status and recent log entries.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
+ },
+ "required" : [ "payload" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "creator" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "handlers" : {
+ "type" : "array",
+ "items" : {
"type" : "object",
"properties" : {
- "last_completed_at" : {
- "oneOf" : [ { }, {
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
"type" : "null"
} ]
},
- "logs" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "completed_at" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- },
- "description" : { },
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "message" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "started_at" : { },
- "status" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "task" : {
- "type" : "string"
- },
- "updated_at" : { }
- },
- "required" : [ "id", "task", "description", "started_at", "updated_at", "completed_at", "status", "message" ]
- }
+ "channel" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.Channel"
+ }, {
+ "type" : "null"
+ } ]
},
- "status" : {
- "type" : "string",
- "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
},
- "updated_at" : { },
- "workspace_id" : {
+ "channel_type" : { },
+ "notification_id" : {
"description" : "value must be an integer greater than zero.",
"type" : "integer",
"minimum" : 1
+ },
+ "recipients" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationRecipient"
+ }
+ },
+ "template" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.channel.models.channel.ChannelTemplate"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "workspace_id", "status", "updated_at", "last_completed_at", "logs" ]
+ "required" : [ "channel_type" ]
+ }
+ },
+ "subscriptions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.notification.models.NotificationSubscription"
}
}
}
+ } ]
+ } ]
+ },
+ "metabase.notification.models.Notification" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "payload_id" : {
+ "type" : "null"
+ },
+ "payload_type" : {
+ "type" : "string",
+ "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
+ }
},
- "4XX" : {
- "description" : "Client error response"
+ "required" : [ "payload_type" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "creator_id" : {
+ "type" : "integer"
+ },
+ "payload_id" : {
+ "type" : "integer"
+ },
+ "payload_type" : {
+ "type" : "string",
+ "enum" : [ "notification/dashboard", "notification/system-event", "notification/testing", "notification/card" ]
+ }
},
- "5XX" : {
- "description" : "Server error response"
+ "required" : [ "payload_type" ]
+ }, { } ]
+ },
+ "metabase.notification.models.NotificationCard" : {
+ "description" : "Schema for :model/NotificationCard.",
+ "type" : "object",
+ "properties" : {
+ "card" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "card_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "send_condition" : {
+ "type" : "string",
+ "enum" : [ "goal_below", "has_result", "goal_above" ]
+ },
+ "send_once" : {
+ "type" : "boolean"
}
},
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/problem" : {
- "get" : {
- "operationId" : "get-api-agent-v1-workspace-ws-id-problem",
- "summary" : "GET /api/agent/v1/workspace/{ws-id}/problem",
- "description" : "Detect problems in the workspace.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
+ "required" : [ "card_id" ]
+ },
+ "metabase.notification.models.NotificationHandler" : {
+ "type" : "object",
+ "properties" : {
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "channel_type" : { },
+ "notification_id" : {
+ "description" : "value must be an integer greater than zero.",
"type" : "integer",
"minimum" : 1
},
- "description" : "value must be an integer greater than zero."
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.problem"
- }
- }
- }
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ "template_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
},
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/query" : {
- "post" : {
- "operationId" : "post-api-agent-v1-workspace-ws-id-query",
- "summary" : "POST /api/agent/v1/workspace/{ws-id}/query",
- "description" : "Execute a SQL query in the workspace's isolated database context.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.query-result"
- }
- }
+ "required" : [ "channel_type" ]
+ },
+ "metabase.notification.models.NotificationRecipient" : {
+ "description" : "Schema for :model/NotificationRecipient.",
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "details" : { },
+ "notification_handler_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "permissions_group_id" : { },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "notification-recipient/raw-value", "notification-recipient/user", "notification-recipient/template", "notification-recipient/group" ]
+ },
+ "user_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}
},
- "4XX" : {
- "description" : "Client error response"
+ "required" : [ "type", "user_id" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "details" : { },
+ "notification_handler_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "permissions_group_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "notification-recipient/raw-value", "notification-recipient/user", "notification-recipient/template", "notification-recipient/group" ]
+ },
+ "user_id" : { }
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "sql" : {
- "type" : "string",
- "minLength" : 1
- }
+ "required" : [ "type", "permissions_group_id" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "details" : {
+ "type" : "object",
+ "properties" : {
+ "value" : { }
+ },
+ "required" : [ "value" ],
+ "additionalProperties" : false
+ },
+ "notification_handler_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "permissions_group_id" : { },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "notification-recipient/raw-value", "notification-recipient/user", "notification-recipient/template", "notification-recipient/group" ]
+ },
+ "user_id" : { }
+ },
+ "required" : [ "type", "details" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "details" : {
+ "type" : "object",
+ "properties" : {
+ "is_optional" : {
+ "type" : "boolean"
},
- "required" : [ "sql" ]
- }
- }
- }
- },
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/run" : {
- "post" : {
- "operationId" : "post-api-agent-v1-workspace-ws-id-run",
- "summary" : "POST /api/agent/v1/workspace/{ws-id}/run",
- "description" : "Execute all transforms in the workspace in dependency order.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "failed" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- },
- "not_run" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- },
- "succeeded" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- }
- },
- "required" : [ "succeeded", "failed", "not_run" ]
+ "pattern" : {
+ "type" : "string"
}
- }
+ },
+ "required" : [ "pattern" ],
+ "additionalProperties" : false
+ },
+ "notification_handler_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "permissions_group_id" : { },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "notification-recipient/raw-value", "notification-recipient/user", "notification-recipient/template", "notification-recipient/group" ]
+ },
+ "user_id" : { }
+ },
+ "required" : [ "type", "details" ]
+ } ]
+ },
+ "metabase.notification.models.NotificationSubscription" : {
+ "description" : "Schema for :model/NotificationSubscription.",
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "cron_schedule" : {
+ "type" : "null"
+ },
+ "event_name" : {
+ "anyOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "string"
+ } ]
+ },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "notification-subscription/cron", "notification-subscription/system-event" ]
+ }
+ },
+ "required" : [ "type", "event_name" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "cron_schedule" : {
+ "type" : "string"
+ },
+ "event_name" : {
+ "type" : "null"
+ },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "notification-subscription/cron", "notification-subscription/system-event" ]
+ },
+ "ui_display_type" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "cron/raw", "cron/builder" ]
+ }, {
+ "type" : "null"
+ } ]
}
},
- "4XX" : {
- "description" : "Client error response"
+ "required" : [ "type", "cron_schedule" ]
+ } ]
+ },
+ "metabase.parameters.schema.legacy-ref" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-expression-ref"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-field-ref"
+ } ]
+ },
+ "metabase.parameters.schema.parameter" : {
+ "description" : "parameter must be a map with :id and :type keys",
+ "type" : "object",
+ "properties" : {
+ "filteringParameters" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id"
+ }
+ }, {
+ "type" : "null"
+ } ]
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "stale_only" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.flag"
- }
+ "mappings" : {
+ "oneOf" : [ {
+ "anyOf" : [ {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping"
}
+ }, {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping"
+ },
+ "uniqueItems" : true
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "sectionId" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string"
+ },
+ "values_source_config" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.values-source-config"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "slug" : {
+ "type" : "string"
+ },
+ "values_query_type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.values-query-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "type" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.type"
+ },
+ "temporal_units" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit"
}
- }
- }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "target" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.target"
+ },
+ "values_source_type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.values-source-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "default" : { }
},
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/table" : {
- "get" : {
- "operationId" : "get-api-agent-v1-workspace-ws-id-table",
- "summary" : "GET /api/agent/v1/workspace/{ws-id}/table",
- "description" : "Get workspace input and output tables.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
+ "required" : [ "id", "type" ]
+ },
+ "metabase.parameters.schema.parameter-mapping" : {
+ "description" : "parameter_mapping must be a map with :parameter_id and :target keys",
+ "type" : "object",
+ "properties" : {
+ "card_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
+ }, {
+ "type" : "null"
+ } ]
},
- "description" : "value must be an integer greater than zero."
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "inputs" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "db_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "table" : {
- "type" : "string"
- },
- "table_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "db_id", "schema", "table", "table_id" ]
- }
- },
- "outputs" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "db_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "global" : {
- "type" : "object",
- "properties" : {
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "table" : {
- "type" : "string"
- },
- "table_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "transform_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "transform_id", "schema", "table", "table_id" ]
- },
- "isolated" : {
- "type" : "object",
- "properties" : {
- "schema" : {
- "type" : "string"
- },
- "table" : {
- "type" : "string"
- },
- "table_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "transform_id" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }, {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- } ]
- }
- },
- "required" : [ "transform_id", "schema", "table", "table_id" ]
- }
- },
- "required" : [ "db_id", "global", "isolated" ]
- }
- }
- },
- "required" : [ "inputs", "outputs" ],
- "additionalProperties" : false
- }
- }
- }
+ "dashcard" : {
+ "type" : "object",
+ "properties" : { }
},
- "4XX" : {
- "description" : "Client error response"
+ "parameter_id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id"
},
- "5XX" : {
- "description" : "Server error response"
+ "target" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.target"
}
},
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/transform" : {
- "get" : {
- "operationId" : "get-api-agent-v1-workspace-ws-id-transform",
- "summary" : "GET /api/agent/v1/workspace/{ws-id}/transform",
- "description" : "List all transforms in a workspace.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "transforms" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "creator_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "global_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "ref_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- },
- "source_type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "ref_id", "global_id", "name", "source_type", "creator_id" ],
- "additionalProperties" : false
- }
- }
- },
- "required" : [ "transforms" ]
- }
- }
- }
+ "required" : [ "parameter_id", "target" ]
+ },
+ "metabase.parameters.schema.parameter-mappings" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping"
+ }
+ },
+ "metabase.parameters.schema.parameters" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter"
+ }
+ },
+ "metabase.parameters.schema.values-query-type" : {
+ "type" : "string",
+ "enum" : [ "none", "list", "search" ]
+ },
+ "metabase.parameters.schema.values-source-config" : {
+ "description" : "Schema for valid source_options within a Parameter",
+ "type" : "object",
+ "properties" : {
+ "card_id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
},
- "4XX" : {
- "description" : "Client error response"
+ "label_field" : {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.legacy-ref"
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent/v1/workspace" ]
+ "value_field" : {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.legacy-ref"
+ },
+ "values" : { }
+ }
},
- "post" : {
- "operationId" : "post-api-agent-v1-workspace-ws-id-transform",
- "summary" : "POST /api/agent/v1/workspace/{ws-id}/transform",
- "description" : "Create a new transform in the workspace.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "last_run_at" : { },
- "target_stale" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "last_run_status" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "workspace_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "updated_at" : { },
- "archived_at" : { },
- "source" : {
- "type" : "object",
- "properties" : { }
- },
- "last_run_message" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "target" : {
- "type" : "object",
- "properties" : { }
- },
- "created_at" : { },
- "global_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "creator_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "ref_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "ref_id", "global_id", "name", "description", "source", "target", "target_stale", "workspace_id", "creator_id", "archived_at", "created_at", "updated_at", "last_run_at", "last_run_status", "last_run_message" ]
- }
- }
- }
+ "metabase.parameters.schema.values-source-type" : {
+ "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",
+ "properties" : {
+ "dataset_query" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.queries.schema.query"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "parameter_mappings" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "database_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "document_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.documents.schema..document.id"
+ }, {
+ "type" : "null"
+ } ]
},
- "4XX" : {
- "description" : "Client error response"
+ "result_metadata" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.queries.schema..card.result-metadata"
+ }, {
+ "type" : "null"
+ } ]
},
- "5XX" : {
- "description" : "Server error response"
+ "collection_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.collection"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..card.type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "parameters" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameters"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "dashboard_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.dashboard"
+ }, {
+ "type" : "null"
+ } ]
}
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "source" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "query" : {
- "$ref" : "#/components/schemas/metabase.queries.schema.query"
- },
- "type" : {
- "const" : "query"
- }
- },
- "required" : [ "type", "query" ]
- }, {
- "type" : "object",
- "properties" : {
- "body" : {
- "type" : "string"
- },
- "source-database" : {
- "type" : "integer"
- },
- "source-tables" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.transforms-base.util.source-table-entry"
- }
- },
- "type" : {
- "const" : "python"
- }
- },
- "required" : [ "source-tables", "type", "body" ],
- "additionalProperties" : false
- } ]
- },
- "target" : {
- "type" : "object",
- "properties" : {
- "database" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "type" : {
- "type" : "string",
- "enum" : [ "table" ]
- }
- },
- "required" : [ "type", "name" ],
- "additionalProperties" : false
- }
- },
- "required" : [ "name", "source", "target" ]
+ }
+ },
+ "metabase.queries.schema.card-type" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..card.type"
+ },
+ "metabase.queries.schema.empty-map" : {
+ "description" : "An empty map, allowed for Card.dataset_query for historic purposes.",
+ "const" : { }
+ },
+ "metabase.queries.schema.query" : {
+ "description" : "Schema for Card.dataset_query. Cards are for some wacko reason allowed to be saved with empty queries (`{}`), but not\n `NULL` ones, because the column is non-null. This sorta seems like an oversight but fixing all the tests that save\n Cards with empty queries is too much to attempt at this point. So a Card either has an empty query or a valid MBQL 5\n query.",
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.queries.schema.empty-map"
+ }, {
+ "allOf" : [ {
+ "description" : "Valid MBQL 5 query.",
+ "type" : "object",
+ "properties" : {
+ "lib/metadata" : {
+ "description" : "Schema for something that satisfies the [[metabase.lib.metadata.protocols/MetadataProvider]] protocol."
+ },
+ "update-row" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.actions.row"
+ },
+ "lib/type" : {
+ "default" : "mbql/query",
+ "const" : "mbql/query"
+ },
+ "settings" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.settings.settings"
+ },
+ "constraints" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.constraints.constraints"
+ },
+ "info" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.info.info"
+ },
+ "middleware" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.middleware-options.middleware-options"
+ },
+ "database" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.saved-questions-virtual-database"
+ }, {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ } ]
+ },
+ "stages" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.stages"
+ },
+ "parameters" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters"
+ },
+ "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..query-result.data" : {
+ "description" : "Schema for the :data key of query results.",
+ "type" : "object",
+ "properties" : {
+ "insights" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : { }
}
- }
- },
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/transform/validate/target" : {
- "post" : {
- "operationId" : "post-api-agent-v1-workspace-ws-id-transform-validate-target",
- "summary" : "POST /api/agent/v1/workspace/{ws-id}/transform/validate/target",
- "description" : "Validate the target table for a workspace transform.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "query",
- "name" : "transform-id",
- "required" : false,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "body" : {
- "anyOf" : [ {
- "type" : "string"
- }, {
- "anyOf" : [ { }, { } ]
- } ]
- },
- "status" : {
- "type" : "integer"
- }
- },
- "required" : [ "status", "body" ]
+ },
+ "results_metadata" : {
+ "type" : "object",
+ "properties" : {
+ "columns" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.query-processor.schema..result-metadata.column"
}
}
+ },
+ "required" : [ "columns" ]
+ },
+ "download_perms" : {
+ "type" : "string"
+ },
+ "format-rows?" : {
+ "type" : "boolean"
+ },
+ "is_sandboxed" : {
+ "type" : "boolean"
+ },
+ "cols" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.query-processor.schema..result-metadata.column"
}
},
- "4XX" : {
- "description" : "Client error response"
+ "results_timezone" : {
+ "type" : "string"
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "db_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "target" : {
- "type" : "object",
- "properties" : {
- "database" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string"
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "type" : {
- "type" : "string"
- }
- },
- "required" : [ "type", "schema", "name" ]
- }
- },
- "required" : [ "target" ]
- }
+ "rows" : {
+ "type" : "array",
+ "items" : {
+ "type" : "array",
+ "items" : { }
}
+ },
+ "native_form" : {
+ "type" : "object",
+ "properties" : { }
}
},
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/transform/{tx-id}" : {
- "get" : {
- "operationId" : "get-api-agent-v1-workspace-ws-id-transform-tx-id",
- "summary" : "GET /api/agent/v1/workspace/{ws-id}/transform/{tx-id}",
- "description" : "Get a specific transform in a workspace.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "required" : [ "cols", "rows" ]
+ },
+ "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.query-processor.schema.query-result" : {
+ "description" : "Schema for query execution results returned by the Query Processor.",
+ "type" : "object",
+ "properties" : {
+ "row_count" : {
+ "type" : "integer"
+ },
+ "error" : {
+ "type" : "string"
+ },
+ "started_at" : {
+ "type" : "string"
+ },
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.database"
+ },
+ "context" : { },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "completed", "failed" ]
+ },
+ "error_type" : {
+ "type" : "string"
+ },
+ "running_time" : {
+ "type" : "integer"
+ },
+ "json_query" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "average_execution_time" : {
+ "oneOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "cached" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "data" : {
+ "$ref" : "#/components/schemas/metabase.query-processor.schema..query-result.data"
}
- }, {
- "in" : "path",
- "name" : "tx-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ },
+ "required" : [ "status", "row_count" ]
+ },
+ "metabase.source-swap.schema.column-error" : {
+ "type" : "string",
+ "enum" : [ "column-type-mismatch", "missing-primary-key", "missing-foreign-key", "foreign-key-mismatch" ]
+ },
+ "metabase.sync.schedules.ExpandedSchedulesMap" : {
+ "description" : "value must be a valid map of schedule maps for a DB.",
+ "type" : "object",
+ "properties" : {
+ "cache_field_values" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "metadata_sync" : {
+ "$ref" : "#/components/schemas/metabase.util.cron.ScheduleMap"
}
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "last_run_at" : { },
- "target_stale" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "last_run_status" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "workspace_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "updated_at" : { },
- "archived_at" : { },
- "source" : {
- "type" : "object",
- "properties" : { }
- },
- "last_run_message" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "target" : {
- "type" : "object",
- "properties" : { }
- },
- "created_at" : { },
- "global_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "creator_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "ref_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "ref_id", "global_id", "name", "description", "source", "target", "target_stale", "workspace_id", "creator_id", "archived_at", "created_at", "updated_at", "last_run_at", "last_run_status", "last_run_message" ]
- }
- }
- }
+ }
+ },
+ "metabase.task-history.api.RunEntity" : {
+ "type" : "object",
+ "properties" : {
+ "entity_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "4XX" : {
- "description" : "Client error response"
+ "entity_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "5XX" : {
- "description" : "Server error response"
+ "entity_type" : {
+ "type" : "string",
+ "enum" : [ "dashboard", "card", "database" ]
}
},
- "tags" : [ "/api/agent/v1/workspace" ]
+ "required" : [ "entity_type", "entity_id" ]
},
- "put" : {
- "operationId" : "put-api-agent-v1-workspace-ws-id-transform-tx-id",
- "summary" : "PUT /api/agent/v1/workspace/{ws-id}/transform/{tx-id}",
- "description" : "Update or create a transform in a workspace.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "path",
- "name" : "tx-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "last_run_at" : { },
- "target_stale" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "last_run_status" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "workspace_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "updated_at" : { },
- "archived_at" : { },
- "source" : {
- "type" : "object",
- "properties" : { }
- },
- "last_run_message" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "target" : {
- "type" : "object",
- "properties" : { }
- },
- "created_at" : { },
- "global_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "creator_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "ref_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "ref_id", "global_id", "name", "description", "source", "target", "target_stale", "workspace_id", "creator_id", "archived_at", "created_at", "updated_at", "last_run_at", "last_run_status", "last_run_message" ]
- }
- }
- }
+ "metabase.task-history.api.RunFilterParams" : {
+ "type" : "object",
+ "properties" : {
+ "entity-id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "4XX" : {
- "description" : "Client error response"
+ "entity-type" : {
+ "type" : "string",
+ "enum" : [ "dashboard", "card", "database" ]
},
- "5XX" : {
- "description" : "Server error response"
+ "run-type" : {
+ "type" : "string",
+ "enum" : [ "alert", "sync", "fingerprint", "subscription" ]
+ },
+ "started-at" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "started", "success", "failed", "abandoned" ]
}
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "source" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "query" : {
- "$ref" : "#/components/schemas/metabase.queries.schema.query"
- },
- "type" : {
- "const" : "query"
- }
- },
- "required" : [ "type", "query" ]
- }, {
- "type" : "object",
- "properties" : {
- "body" : {
- "type" : "string"
- },
- "source-database" : {
- "type" : "integer"
- },
- "source-tables" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.transforms-base.util.source-table-entry"
- }
- },
- "type" : {
- "const" : "python"
- }
- },
- "required" : [ "source-tables", "type", "body" ],
- "additionalProperties" : false
- } ]
- },
- "target" : {
- "type" : "object",
- "properties" : {
- "database" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "type" : {
- "type" : "string",
- "enum" : [ "table" ]
- }
- },
- "required" : [ "type", "name" ],
- "additionalProperties" : false
- }
- }
- }
- }
+ }
+ },
+ "metabase.task-history.api.TaskHistory" : {
+ "type" : "object",
+ "properties" : {
+ "task_details" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "started_at" : { },
+ "ended_at" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "started", "success", "failed", "unknown" ]
+ },
+ "logs" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
+ },
+ "task" : {
+ "type" : "string"
+ },
+ "duration" : {
+ "oneOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "run_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
},
- "tags" : [ "/api/agent/v1/workspace" ]
+ "required" : [ "id", "task", "started_at", "ended_at", "duration", "status" ]
},
- "delete" : {
- "operationId" : "delete-api-agent-v1-workspace-ws-id-transform-tx-id",
- "summary" : "DELETE /api/agent/v1/workspace/{ws-id}/transform/{tx-id}",
- "description" : "Delete a transform from the workspace.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "path",
- "name" : "tx-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "null"
- }
- }
- }
+ "metabase.task-history.api.TaskRun" : {
+ "type" : "object",
+ "properties" : {
+ "run_type" : {
+ "type" : "string",
+ "enum" : [ "alert", "sync", "fingerprint", "subscription" ]
},
- "4XX" : {
- "description" : "Client error response"
+ "entity_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/transform/{tx-id}/archive" : {
- "post" : {
- "operationId" : "post-api-agent-v1-workspace-ws-id-transform-tx-id-archive",
- "summary" : "POST /api/agent/v1/workspace/{ws-id}/transform/{tx-id}/archive",
- "description" : "Mark a transform for archival.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "path",
- "name" : "tx-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "null"
- }
- }
- }
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "4XX" : {
- "description" : "Client error response"
+ "started_at" : { },
+ "failed_count" : {
+ "type" : "integer"
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/transform/{tx-id}/dry-run" : {
- "post" : {
- "operationId" : "post-api-agent-v1-workspace-ws-id-transform-tx-id-dry-run",
- "summary" : "POST /api/agent/v1/workspace/{ws-id}/transform/{tx-id}/dry-run",
- "description" : "Dry-run a transform without persisting to the target table.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "path",
- "name" : "tx-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.query-result"
- }
- }
- }
+ "ended_at" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
},
- "4XX" : {
- "description" : "Client error response"
+ "entity_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "run_stale_ancestors" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.flag"
- }
- }
- }
- }
- }
- },
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/transform/{tx-id}/run" : {
- "post" : {
- "operationId" : "post-api-agent-v1-workspace-ws-id-transform-tx-id-run",
- "summary" : "POST /api/agent/v1/workspace/{ws-id}/transform/{tx-id}/run",
- "description" : "Run a single transform in a workspace.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "path",
- "name" : "tx-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.execution-result"
- }
- }
- }
+ "status" : {
+ "type" : "string",
+ "enum" : [ "started", "success", "failed", "abandoned" ]
},
- "4XX" : {
- "description" : "Client error response"
+ "task_count" : {
+ "type" : "integer"
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "run_stale_ancestors" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.flag"
- }
- }
- }
- }
+ "success_count" : {
+ "type" : "integer"
+ },
+ "entity_type" : {
+ "type" : "string",
+ "enum" : [ "dashboard", "card", "database" ]
}
},
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/agent/v1/workspace/{ws-id}/transform/{tx-id}/unarchive" : {
- "post" : {
- "operationId" : "post-api-agent-v1-workspace-ws-id-transform-tx-id-unarchive",
- "summary" : "POST /api/agent/v1/workspace/{ws-id}/transform/{tx-id}/unarchive",
- "description" : "Unmark a transform for archival.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "path",
- "name" : "tx-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "null"
- }
- }
+ "required" : [ "id", "run_type", "entity_type", "entity_id", "started_at", "ended_at", "status" ]
+ },
+ "metabase.task-history.api.TaskRunWithTasks" : {
+ "type" : "object",
+ "properties" : {
+ "run_type" : {
+ "type" : "string",
+ "enum" : [ "alert", "sync", "fingerprint", "subscription" ]
+ },
+ "tasks" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.task-history.api.TaskHistory"
}
},
- "4XX" : {
- "description" : "Client error response"
+ "entity_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/agent/v1/workspace" ]
- }
- },
- "/api/ai-entity-analysis/analyze-chart" : {
- "post" : {
- "operationId" : "post-api-ai-entity-analysis-analyze-chart",
- "summary" : "POST /api/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\n for analysis.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "4XX" : {
- "description" : "Client error response"
+ "started_at" : { },
+ "failed_count" : {
+ "type" : "integer"
},
- "5XX" : {
- "description" : "Server error response"
+ "ended_at" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
+ },
+ "entity_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "started", "success", "failed", "abandoned" ]
+ },
+ "task_count" : {
+ "type" : "integer"
+ },
+ "success_count" : {
+ "type" : "integer"
+ },
+ "entity_type" : {
+ "type" : "string",
+ "enum" : [ "dashboard", "card", "database" ]
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "image_base64" : {
- "type" : "string"
- },
- "name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "timeline_events" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "timestamp" : {
- "type" : "string"
- }
- },
- "required" : [ "name", "timestamp" ]
- }
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "image_base64" ]
- }
+ "required" : [ "id", "run_type", "entity_type", "entity_id", "started_at", "ended_at", "status", "tasks" ]
+ },
+ "metabase.task-history.api.TaskRunsResponse" : {
+ "type" : "object",
+ "properties" : {
+ "data" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.task-history.api.TaskRun"
}
- }
- },
- "tags" : [ "/api/ai-entity-analysis" ]
- }
- },
- "/api/ai-sql-fixer/fix" : {
- "post" : {
- "operationId" : "post-api-ai-sql-fixer-fix",
- "summary" : "POST /api/ai-sql-fixer/fix",
- "description" : "Suggest fixes for a SQL query.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
},
- "4XX" : {
- "description" : "Client error response"
+ "limit" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
},
- "5XX" : {
- "description" : "Server error response"
+ "offset" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater or equal to than zero.",
+ "type" : "integer",
+ "minimum" : 0
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "total" : {
+ "description" : "value must be an integer greater or equal to than zero.",
+ "type" : "integer",
+ "minimum" : 0
}
},
- "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" ]
- }
- }
+ "required" : [ "total", "limit", "offset", "data" ]
+ },
+ "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
}
},
- "tags" : [ "/api/ai-sql-fixer" ]
- }
- },
- "/api/ai-sql-generation/generate" : {
- "post" : {
- "operationId" : "post-api-ai-sql-generation-generate",
- "summary" : "POST /api/ai-sql-generation/generate",
- "description" : "Generate a SQL query.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
+ "required" : [ "id" ]
+ },
+ "metabase.timeline.api.timeline.include" : {
+ "type" : "string",
+ "enum" : [ "events" ]
+ },
+ "metabase.transforms-base.util.source-table-entry" : {
+ "description" : "A source table entry in the array format. Combines alias with table reference.",
+ "type" : "object",
+ "properties" : {
+ "alias" : {
+ "type" : "string"
},
- "4XX" : {
- "description" : "Client error response"
+ "database_id" : {
+ "type" : "integer"
},
- "5XX" : {
- "description" : "Server error response"
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table" : {
+ "type" : "string"
+ },
+ "table_id" : {
+ "oneOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "alias", "database_id", "schema" ]
+ },
+ "metabase.transforms-rest.api.transform.run-trigger" : {
+ "type" : "string",
+ "enum" : [ "none", "global-schedule" ]
+ },
+ "metabase.transforms.schema.append-config" : {
+ "type" : "object",
+ "properties" : {
+ "type" : {
+ "const" : "append"
}
},
- "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" ]
- }
- }
+ "required" : [ "type" ]
+ },
+ "metabase.transforms.schema.checkpoint-strategy" : {
+ "type" : "object",
+ "properties" : {
+ "checkpoint-filter-field-id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ },
+ "type" : {
+ "const" : "checkpoint"
}
},
- "tags" : [ "/api/ai-sql-generation" ]
- }
- },
- "/api/alert" : {
- "get" : {
- "operationId" : "get-api-alert",
- "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" : true,
+ "required" : [ "type" ]
+ },
+ "metabase.transforms.schema.id" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "metabase.transforms.schema.source-incremental-strategy" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.transforms.schema.checkpoint-strategy"
+ } ]
+ },
+ "metabase.transforms.schema.table-incremental-target" : {
+ "type" : "object",
+ "properties" : {
+ "database" : {
+ "type" : "integer"
+ },
+ "name" : {
+ "type" : "string"
+ },
"schema" : {
- "default" : false,
"oneOf" : [ {
- "type" : "boolean"
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
+ },
+ "target-incremental-strategy" : {
+ "$ref" : "#/components/schemas/metabase.transforms.schema.target-incremental-strategy"
+ },
+ "type" : {
+ "const" : "table-incremental"
}
- }, {
- "in" : "query",
- "name" : "user_id",
- "required" : false,
+ },
+ "required" : [ "type", "name", "target-incremental-strategy" ]
+ },
+ "metabase.transforms.schema.table-target" : {
+ "type" : "object",
+ "properties" : {
+ "database" : {
+ "type" : "integer"
+ },
+ "name" : {
+ "type" : "string"
+ },
"schema" : {
"oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
},
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ "type" : {
+ "const" : "table"
}
},
- "tags" : [ "/api/alert" ]
- }
- },
- "/api/alert/{id}" : {
- "get" : {
- "operationId" : "get-api-alert-id",
- "summary" : "GET /api/alert/{id}",
- "description" : "Fetch an alert by ID",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
+ "required" : [ "type", "name" ]
+ },
+ "metabase.transforms.schema.target-incremental-strategy" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.transforms.schema.append-config"
+ } ]
+ },
+ "metabase.transforms.schema.transform" : {
+ "type" : "object",
+ "properties" : {
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "description" : "value must be an integer greater than zero."
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
+ "id" : {
+ "$ref" : "#/components/schemas/metabase.transforms.schema.id"
},
- "4XX" : {
- "description" : "Client error response"
+ "name" : {
+ "type" : "string"
},
- "5XX" : {
- "description" : "Server error response"
+ "source" : {
+ "$ref" : "#/components/schemas/metabase.transforms.schema.transform-source"
+ },
+ "target" : {
+ "$ref" : "#/components/schemas/metabase.transforms.schema.transform-target"
}
},
- "tags" : [ "/api/alert" ]
- }
- },
- "/api/alert/{id}/subscription" : {
- "delete" : {
- "operationId" : "delete-api-alert-id-subscription",
- "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
+ "required" : [ "id", "name", "source", "target" ]
+ },
+ "metabase.transforms.schema.transform-source" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "query" : {
+ "$ref" : "#/components/schemas/metabase.queries.schema.query"
+ },
+ "source-incremental-strategy" : {
+ "$ref" : "#/components/schemas/metabase.transforms.schema.source-incremental-strategy"
+ },
+ "type" : {
+ "const" : "query"
+ }
},
- "description" : "value must be an integer greater than zero."
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
+ "required" : [ "type", "query" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "body" : {
+ "type" : "string"
+ },
+ "source-database" : {
+ "type" : "integer"
+ },
+ "source-incremental-strategy" : {
+ "$ref" : "#/components/schemas/metabase.transforms.schema.source-incremental-strategy"
+ },
+ "source-tables" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.transforms-base.util.source-table-entry"
+ }
+ },
+ "type" : {
+ "const" : "python"
+ }
},
- "4XX" : {
- "description" : "Client error response"
+ "required" : [ "source-tables", "type", "body" ]
+ } ]
+ },
+ "metabase.transforms.schema.transform-target" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.transforms.schema.table-target"
+ }, {
+ "$ref" : "#/components/schemas/metabase.transforms.schema.table-incremental-target"
+ } ]
+ },
+ "metabase.users.schema.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
},
- "5XX" : {
- "description" : "Server error response"
+ "is_group_manager" : {
+ "description" : "Only relevant if `advanced-permissions` is enabled. If it is, you should always include this key.",
+ "type" : "boolean"
}
},
- "tags" : [ "/api/alert" ]
- }
- },
- "/api/analytics/anonymous-stats" : {
- "get" : {
- "operationId" : "get-api-analytics-anonymous-stats",
- "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"
+ "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" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ]
+ }, {
+ "type" : "null"
+ } ]
},
- "4XX" : {
- "description" : "Client error response"
+ "schedule_frame" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "first", "mid", "last" ]
+ }, {
+ "type" : "null"
+ } ]
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/analytics" ]
- }
- },
- "/api/api-key" : {
- "post" : {
- "operationId" : "post-api-api-key",
- "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_hour" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.util.cron.CronHour"
+ }, {
+ "type" : "null"
+ } ]
},
- "4XX" : {
- "description" : "Client error response"
+ "schedule_minute" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.util.cron.CronMinute"
+ }, {
+ "type" : "null"
+ } ]
},
- "5XX" : {
- "description" : "Server error response"
+ "schedule_type" : {
+ "type" : "string",
+ "enum" : [ "hourly", "daily", "weekly", "monthly" ]
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
+ "required" : [ "schedule_type" ]
+ },
+ "metabase.warehouse-schema-rest.api.table.data-authority-write" : {
+ "description" : "Schema for writing a valid table data authority.",
+ "type" : "string",
+ "enum" : [ "computed", "authoritative", "unconfigured", "ingested" ]
+ },
+ "metabase.warehouse-schema-rest.api.table.data-layers" : {
+ "type" : "string",
+ "enum" : [ "final", "internal", "hidden" ]
+ },
+ "metabase.warehouse-schema-rest.api.table.data-sources" : {
+ "type" : "string",
+ "enum" : [ "source-data", "transform", "unknown", "ingested", "metabase-transform", "upload" ]
+ },
+ "metabase.warehouses-rest.api.available-settings" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : {
+ "enabled" : {
+ "type" : "boolean"
+ },
+ "reasons" : {
+ "type" : "array",
+ "items" : {
"type" : "object",
"properties" : {
- "group_id" : {
- "$ref" : "#/components/schemas/metabase.api-keys.schema.id"
+ "key" : {
+ "type" : "string"
},
- "name" : {
+ "message" : {
+ "anyOf" : [ {
+ "type" : "string"
+ }, { } ]
+ },
+ "type" : {
"type" : "string",
- "minLength" : 1
+ "enum" : [ "error", "warning" ]
}
},
- "required" : [ "group_id", "name" ]
+ "required" : [ "key", "type", "message" ]
}
}
- }
- },
- "tags" : [ "/api/api-key" ]
- },
- "get" : {
- "operationId" : "get-api-api-key",
- "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" ]
+ "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__<id>`-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
}
},
- "/api/api-key/count" : {
+ "securitySchemes" : {
+ "ApiKeyAuth" : {
+ "type" : "apiKey",
+ "in" : "header",
+ "name" : "X-API-Key",
+ "description" : "API key for authentication"
+ }
+ }
+ },
+ "info" : {
+ "title" : "Metabase API documentation",
+ "description" : "- **The API is subject to change.** We rarely change API endpoints, and almost never remove them, but if you write code that relies on the API, there's a chance you might have to update your code in the future.\n- **The API isn't versioned.** So don’t expect to stay on a particular version of Metabase in order to use a “stable” API.\n\n## API tutorial\n\nCheck out an introduction to the [Metabase API](https://www.metabase.com/learn/administration/metabase-api.html).\n\n## API keys\n\nCreate keys to authenticate programmatic requests to your Metabase. See [API keys](./people-and-groups/api-keys).\n\n## API changelog\n\nFor breaking changes, see the API [changelog](./developers-guide/api-changelog).\n\n## View the API docs for your Metabase\n\nYou can view the API docs for your Metabase by visiting `https://[your-metabase-url]/api/docs`.\n\n## Generating API docs\n\nYou can generate these docs by running:\n\n```\nclojure -M:ee:doc api-documentation\n```\n"
+ },
+ "openapi" : "3.1.0",
+ "paths" : {
+ "/api/action" : {
"get" : {
- "operationId" : "get-api-api-key-count",
- "summary" : "GET /api/api-key/count",
- "description" : "Get the count of API keys in the DB with the default scope.",
- "parameters" : [ ],
+ "operationId" : "get-api-action",
+ "summary" : "GET /api/action",
+ "description" : "Returns actions that can be used for QueryActions. By default lists all viewable actions. Pass optional\n `?model-id=<model-id>` to limit to actions on a particular model.",
+ "parameters" : [ {
+ "in" : "query",
+ "name" : "model-id",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.card"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.actions.schema.action"
+ }
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -18647,27 +12450,23 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/api-key" ]
- }
- },
- "/api/api-key/{id}" : {
- "put" : {
- "operationId" : "put-api-api-key-id",
- "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."
- } ],
+ "tags" : [ "/api/action" ]
+ },
+ "post" : {
+ "operationId" : "post-api-action",
+ "summary" : "POST /api/action",
+ "description" : "Create a new action.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.actions.schema.action"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -18680,46 +12479,33 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "group_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.api-keys.schema.name"
- }, {
- "type" : "null"
- } ]
- }
- }
+ "$ref" : "#/components/schemas/metabase.actions.schema..action.for-insert"
}
}
}
},
- "tags" : [ "/api/api-key" ]
- },
- "delete" : {
- "operationId" : "delete-api-api-key-id",
- "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"
- }
- } ],
+ "tags" : [ "/api/action" ]
+ }
+ },
+ "/api/action/public" : {
+ "get" : {
+ "operationId" : "get-api-action-public",
+ "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" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.actions.schema.action"
+ }
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -18728,21 +12514,23 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/api-key" ]
+ "tags" : [ "/api/action" ]
}
},
- "/api/api-key/{id}/regenerate" : {
- "put" : {
- "operationId" : "put-api-api-key-id-regenerate",
- "summary" : "PUT /api/api-key/{id}/regenerate",
- "description" : "Regenerate an API Key",
+ "/api/action/{action-id}" : {
+ "get" : {
+ "operationId" : "get-api-action-action-id",
+ "summary" : "GET /api/action/{action-id}",
+ "description" : "Fetch an Action.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "action-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" : {
@@ -18750,22 +12538,7 @@
"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" ]
+ "$ref" : "#/components/schemas/metabase.actions.schema.action"
}
}
}
@@ -18777,17 +12550,15 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/api-key" ]
- }
- },
- "/api/automagic-dashboards/database/{id}/candidates" : {
- "get" : {
- "operationId" : "get-api-automagic-dashboards-database-id-candidates",
- "summary" : "GET /api/automagic-dashboards/database/{id}/candidates",
- "description" : "Return a list of candidates for automagic dashboards ordered by interestingness.",
+ "tags" : [ "/api/action" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-action-action-id",
+ "summary" : "DELETE /api/action/{action-id}",
+ "description" : "Delete an Action.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "action-id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -18806,28 +12577,31 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/automagic-dashboards" ]
+ "tags" : [ "/api/action" ]
}
},
- "/api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}" : {
+ "/api/action/{action-id}/execute" : {
"get" : {
- "operationId" : "get-api-automagic-dashboards-model_index-model-index-id-primary_key-pk-id",
- "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`.",
+ "operationId" : "get-api-action-action-id-execute",
+ "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" : "model-index-id",
+ "name" : "action-id",
"required" : true,
"schema" : {
- "type" : "integer"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
}, {
- "in" : "path",
- "name" : "pk-id",
+ "in" : "query",
+ "name" : "parameters",
"required" : true,
"schema" : {
- "type" : "integer"
- }
+ "type" : "string"
+ },
+ "description" : "value must be a valid JSON string."
} ],
"responses" : {
"2XX" : {
@@ -18840,44 +12614,20 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/automagic-dashboards" ]
+ "tags" : [ "/api/action" ]
}
},
- "/api/automagic-dashboards/{entity}/{entity-id-or-query}" : {
- "get" : {
- "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query",
- "summary" : "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}",
- "description" : "Return an automagic dashboard for entity `entity` with id `id`.",
+ "/api/action/{id}" : {
+ "put" : {
+ "operationId" : "put-api-action-id",
+ "summary" : "PUT /api/action/{id}",
+ "description" : "Update an Action.",
"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",
+ "name" : "id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query"
- }
- }, {
- "in" : "query",
- "name" : "show",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "anyOf" : [ {
- "const" : "all"
- }, {
- "type" : "integer",
- "minimum" : 0
- } ]
- }, {
- "type" : "null"
- } ]
+ "$ref" : "#/components/schemas/metabase.actions.schema.id"
}
} ],
"responses" : {
@@ -18891,54 +12641,30 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/automagic-dashboards" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.actions.schema..action.for-update"
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/action" ]
}
},
- "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}" : {
- "get" : {
- "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-cell-cell-query",
- "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`.",
+ "/api/action/{id}/execute" : {
+ "post" : {
+ "operationId" : "post-api-action-id-execute",
+ "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" : "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",
+ "name" : "id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json"
+ "$ref" : "#/components/schemas/metabase.actions.schema.id"
}
- }, {
- "in" : "query",
- "name" : "show",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "anyOf" : [ {
- "type" : "string",
- "enum" : [ "all" ]
- }, {
- "type" : "integer",
- "minimum" : 0
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "description" : "invalid show value"
} ],
"responses" : {
"2XX" : {
@@ -18951,70 +12677,44 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/automagic-dashboards" ]
- }
- },
- "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : {
- "get" : {
- "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-cell-cell-query-compare-comparison-entity-comparison-entity-id-or-query",
- "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" : "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,
- "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\""
- }, {
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "parameters" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "additionalProperties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/action" ]
+ }
+ },
+ "/api/action/{id}/public_link" : {
+ "post" : {
+ "operationId" : "post-api-action-id-public_link",
+ "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" : "comparison-entity-id-or-query",
+ "name" : "id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query"
+ "$ref" : "#/components/schemas/metabase.actions.schema.id"
}
- }, {
- "in" : "query",
- "name" : "show",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "anyOf" : [ {
- "type" : "string",
- "enum" : [ "all" ]
- }, {
- "type" : "integer",
- "minimum" : 0
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "description" : "invalid show value"
} ],
"responses" : {
"2XX" : {
@@ -19027,65 +12727,19 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/automagic-dashboards" ]
- }
- },
- "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}" : {
- "get" : {
- "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-cell-cell-query-rule-prefix-dashboard-template",
- "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`.",
+ "tags" : [ "/api/action" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-action-id-public_link",
+ "summary" : "DELETE /api/action/{id}/public_link",
+ "description" : "Delete the publicly-accessible link to this Dashboard.",
"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" : "cell-query",
+ "name" : "id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.base-64-encoded-json"
+ "$ref" : "#/components/schemas/metabase.actions.schema.id"
}
- }, {
- "in" : "query",
- "name" : "show",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "anyOf" : [ {
- "type" : "string",
- "enum" : [ "all" ]
- }, {
- "type" : "integer",
- "minimum" : 0
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "description" : "invalid show value"
} ],
"responses" : {
"2XX" : {
@@ -19098,82 +12752,55 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/automagic-dashboards" ]
+ "tags" : [ "/api/action" ]
}
},
- "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : {
+ "/api/activity/most_recently_viewed_dashboard" : {
"get" : {
- "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-cell-cell-query-rule-prefix-dashboard-template-compare-comparison-entity-comparison-entity-id-or-query",
- "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"
- }
- }, {
- "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" ]
+ "operationId" : "get-api-activity-most_recently_viewed_dashboard",
+ "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"
},
- "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"
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
- }, {
- "in" : "query",
- "name" : "show",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "anyOf" : [ {
- "type" : "string",
- "enum" : [ "all" ]
- }, {
- "type" : "integer",
- "minimum" : 0
- } ]
- }, {
- "type" : "null"
- } ]
+ },
+ "tags" : [ "/api/activity" ]
+ }
+ },
+ "/api/activity/popular_items" : {
+ "get" : {
+ "operationId" : "get-api-activity-popular_items",
+ "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"
},
- "description" : "invalid show value"
- } ],
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/activity" ]
+ }
+ },
+ "/api/activity/recent_views" : {
+ "get" : {
+ "operationId" : "get-api-activity-recent_views",
+ "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"
@@ -19185,63 +12812,38 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/automagic-dashboards" ]
+ "deprecated" : true,
+ "tags" : [ "/api/activity" ]
}
},
- "/api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : {
+ "/api/activity/recents" : {
"get" : {
- "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-compare-comparison-entity-comparison-entity-id-or-query",
- "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.`",
+ "operationId" : "get-api-activity-recents",
+ "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" : "path",
- "name" : "entity-id-or-query",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query"
- }
- }, {
- "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" ]
- },
- "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\""
- }, {
- "in" : "path",
- "name" : "comparison-entity-id-or-query",
+ "in" : "query",
+ "name" : "context",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query"
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "enum" : [ "selections", "views" ]
+ }
}
}, {
"in" : "query",
- "name" : "show",
- "required" : false,
+ "name" : "include_metadata",
+ "required" : true,
"schema" : {
+ "default" : false,
"oneOf" : [ {
- "anyOf" : [ {
- "type" : "string",
- "enum" : [ "all" ]
- }, {
- "type" : "integer",
- "minimum" : 0
- } ]
+ "type" : "boolean"
}, {
"type" : "null"
} ]
- },
- "description" : "invalid show value"
+ }
} ],
"responses" : {
"2XX" : {
@@ -19254,30 +12856,13 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/automagic-dashboards" ]
- }
- },
- "/api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata" : {
- "get" : {
- "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-query_metadata",
- "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" : "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/activity" ]
+ },
+ "post" : {
+ "operationId" : "post-api-activity-recents",
+ "summary" : "POST /api/activity/recents",
+ "description" : "Adds a model to the list of recently selected items.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -19289,62 +12874,86 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/automagic-dashboards" ]
+ "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/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}" : {
- "get" : {
- "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-rule-prefix-dashboard-template",
- "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" : "path",
- "name" : "entity",
- "required" : true,
- "schema" : {
- "type" : "string",
- "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ]
+ "/api/agent/v1/construct-query" : {
+ "post" : {
+ "operationId" : "post-api-agent-v1-construct-query",
+ "summary" : "POST /api/agent/v1/construct-query",
+ "description" : "Construct an MBQL query from a table or metric.\n\n Returns a base64-encoded MBQL query that can be used with the query API.\n\n For tables, supports: filters, fields, aggregations, group_by, order_by, limit.\n For metrics, supports: filters, group_by (aggregation is defined by the metric).",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.construct-query-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"
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.construct-query-request"
+ }
+ }
}
- }, {
- "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" : "show",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "anyOf" : [ {
- "type" : "string",
- "enum" : [ "all" ]
- }, {
- "type" : "integer",
- "minimum" : 0
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "description" : "invalid show value"
- } ],
+ },
+ "tags" : [ "/api/agent" ]
+ }
+ },
+ "/api/agent/v1/execute" : {
+ "post" : {
+ "operationId" : "post-api-agent-v1-execute",
+ "summary" : "POST /api/agent/v1/execute",
+ "description" : "Execute an MBQL query and return results.\n\n Accepts a base64-encoded MBQL query (as returned by /v1/construct-query) and executes it,\n returning results with column metadata.\n\n Response format:\n - On success: {:data {:cols [...] :rows [...]} :row_count N :status :completed :running_time M}\n - On failure: {:status :failed :error \"message\" ...}\n\n Agent query row limits are enforced (200 rows per request).",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.execute-query-response"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -19353,78 +12962,131 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/automagic-dashboards" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.execute-query-request"
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/agent" ]
}
},
- "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : {
+ "/api/agent/v1/metric/{id}" : {
"get" : {
- "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-rule-prefix-dashboard-template-compare-comparison-entity-comparison-entity-id-or-query",
- "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.`.",
+ "operationId" : "get-api-agent-v1-metric-id",
+ "summary" : "GET /api/agent/v1/metric/{id}",
+ "description" : "Get details for a metric by ID.",
"parameters" : [ {
"in" : "path",
- "name" : "entity",
+ "name" : "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",
- "required" : true,
+ "in" : "query",
+ "name" : "with-default-temporal-breakout",
+ "required" : false,
"schema" : {
- "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query"
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
}
}, {
- "in" : "path",
- "name" : "prefix",
- "required" : true,
- "schema" : { }
+ "in" : "query",
+ "name" : "with-field-values",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
}, {
- "in" : "path",
- "name" : "dashboard-template",
- "required" : true,
- "schema" : { },
- "description" : "invalid value for dashboard template name"
+ "in" : "query",
+ "name" : "with-queryable-dimensions",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
}, {
+ "in" : "query",
+ "name" : "with-segments",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.metric"
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/agent" ]
+ }
+ },
+ "/api/agent/v1/metric/{id}/field/{field-id}/values" : {
+ "get" : {
+ "operationId" : "get-api-agent-v1-metric-id-field-field-id-values",
+ "summary" : "GET /api/agent/v1/metric/{id}/field/{field-id}/values",
+ "description" : "Get statistics and sample values for a metric field.",
+ "parameters" : [ {
"in" : "path",
- "name" : "comparison-entity",
+ "name" : "id",
"required" : true,
"schema" : {
- "type" : "string",
- "enum" : [ "adhoc", "segment", "table" ]
+ "type" : "integer",
+ "minimum" : 1
},
- "description" : "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\""
+ "description" : "value must be an integer greater than zero."
}, {
"in" : "path",
- "name" : "comparison-entity-id-or-query",
+ "name" : "field-id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query"
+ "type" : "string",
+ "minLength" : 1
}
- }, {
- "in" : "query",
- "name" : "show",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "anyOf" : [ {
- "type" : "string",
- "enum" : [ "all" ]
- }, {
- "type" : "integer",
- "minimum" : 0
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "description" : "invalid show value"
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.field-values"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -19433,18 +13095,31 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/automagic-dashboards" ]
+ "tags" : [ "/api/agent" ]
}
},
- "/api/bookmark" : {
+ "/api/agent/v1/ping" : {
"get" : {
- "operationId" : "get-api-bookmark",
- "summary" : "GET /api/bookmark",
- "description" : "Fetch all bookmarks for the user",
+ "operationId" : "get-api-agent-v1-ping",
+ "summary" : "GET /api/agent/v1/ping",
+ "description" : "Health check endpoint for the Agent API.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "message" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "message" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -19453,18 +13128,61 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/bookmark" ]
+ "tags" : [ "/api/agent" ]
}
},
- "/api/bookmark/ordering" : {
- "put" : {
- "operationId" : "put-api-bookmark-ordering",
- "summary" : "PUT /api/bookmark/ordering",
- "description" : "Sets the order of bookmarks for user.",
+ "/api/agent/v1/query" : {
+ "post" : {
+ "operationId" : "post-api-agent-v1-query",
+ "summary" : "POST /api/agent/v1/query",
+ "description" : "Query a Metabase table or metric, or continue paginating a previous query.\n\n Accepts either construct params (table_id/metric_id + filters, aggregations, etc.)\n or a continuation_token from a previous response. Returns results with column metadata\n and an optional continuation_token for fetching the next page.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.query-response"
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.query-request"
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/agent" ]
+ }
+ },
+ "/api/agent/v1/search" : {
+ "post" : {
+ "operationId" : "post-api-agent-v1-search",
+ "summary" : "POST /api/agent/v1/search",
+ "description" : "Search for tables and metrics.\n\n Supports both term-based and semantic search queries. Results are ranked using\n Reciprocal Rank Fusion when both query types are provided.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.search-response"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -19479,47 +13197,42 @@
"schema" : {
"type" : "object",
"properties" : {
- "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" ]
- }
+ "semantic_queries" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "term_queries" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }, {
+ "type" : "null"
+ } ]
}
- },
- "required" : [ "orderings" ]
+ }
}
}
}
},
- "tags" : [ "/api/bookmark" ]
+ "tags" : [ "/api/agent" ]
}
},
- "/api/bookmark/{model}/{id}" : {
- "post" : {
- "operationId" : "post-api-bookmark-model-id",
- "summary" : "POST /api/bookmark/{model}/{id}",
- "description" : "Create a new bookmark for user.",
+ "/api/agent/v1/table/{id}" : {
+ "get" : {
+ "operationId" : "get-api-agent-v1-table-id",
+ "summary" : "GET /api/agent/v1/table/{id}",
+ "description" : "Get details for a table by ID.",
"parameters" : [ {
- "in" : "path",
- "name" : "model",
- "required" : true,
- "schema" : {
- "type" : "string",
- "enum" : [ "card", "dashboard", "collection", "document" ]
- }
- }, {
"in" : "path",
"name" : "id",
"required" : true,
@@ -19528,10 +13241,83 @@
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "query",
+ "name" : "with-field-values",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "with-fields",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "with-related-tables",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "with-metrics",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "with-measures",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "with-segments",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.table"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -19540,21 +13326,15 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/bookmark" ]
- },
- "delete" : {
- "operationId" : "delete-api-bookmark-model-id",
- "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.",
+ "tags" : [ "/api/agent" ]
+ }
+ },
+ "/api/agent/v1/table/{id}/field/{field-id}/values" : {
+ "get" : {
+ "operationId" : "get-api-agent-v1-table-id-field-field-id-values",
+ "summary" : "GET /api/agent/v1/table/{id}/field/{field-id}/values",
+ "description" : "Get statistics and sample values for a table field.",
"parameters" : [ {
- "in" : "path",
- "name" : "model",
- "required" : true,
- "schema" : {
- "type" : "string",
- "enum" : [ "card", "dashboard", "collection", "document" ]
- }
- }, {
"in" : "path",
"name" : "id",
"required" : true,
@@ -19563,10 +13343,25 @@
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "path",
+ "name" : "field-id",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.agent-api.api.field-values"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -19575,38 +13370,61 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/bookmark" ]
+ "tags" : [ "/api/agent" ]
}
},
- "/api/bug-reporting/connection-pool-details" : {
+ "/api/agent/v1/workspace/{ws-id}" : {
"get" : {
- "operationId" : "get-api-bug-reporting-connection-pool-details",
- "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"
- },
- "4XX" : {
- "description" : "Client error response"
+ "operationId" : "get-api-agent-v1-workspace-ws-id",
+ "summary" : "GET /api/agent/v1/workspace/{ws-id}",
+ "description" : "Get a single workspace by ID.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "ws-id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/bug-reporting" ]
- }
- },
- "/api/bug-reporting/details" : {
- "get" : {
- "operationId" : "get-api-bug-reporting-details",
- "summary" : "GET /api/bug-reporting/details",
- "description" : "Returns version and system information relevant to filing a bug report against Metabase.",
- "parameters" : [ ],
+ "description" : "value must be an integer greater than zero."
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "collection_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "created_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ },
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ },
+ "updated_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ }
+ },
+ "required" : [ "id", "name", "collection_id", "database_id", "status", "created_at", "updated_at" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -19615,73 +13433,23 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/bug-reporting" ]
+ "tags" : [ "/api/agent/v1/workspace" ]
}
},
- "/api/cache" : {
- "get" : {
- "operationId" : "get-api-cache",
- "summary" : "GET /api/cache",
- "description" : "Return cache configuration. Supports pagination via `limit` and `offset` query parameters,\n and sorting via `sort_column` and `sort_direction`.",
+ "/api/agent/v1/workspace/{ws-id}/archive" : {
+ "post" : {
+ "operationId" : "post-api-agent-v1-workspace-ws-id-archive",
+ "summary" : "POST /api/agent/v1/workspace/{ws-id}/archive",
+ "description" : "Archive a workspace.",
"parameters" : [ {
- "in" : "query",
- "name" : "model",
+ "in" : "path",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "default" : [ "root" ],
- "type" : "array",
- "items" : {
- "type" : "string",
- "enum" : [ "root", "database", "dashboard", "question" ]
- }
- },
- "description" : "Type of model"
- }, {
- "in" : "query",
- "name" : "collection",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "description" : "Collection id to filter results. Returns everything if not supplied."
- }, {
- "in" : "query",
- "name" : "id",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
+ "type" : "integer",
+ "minimum" : 1
},
- "description" : "Model id to get configuration for."
- }, {
- "in" : "query",
- "name" : "sort_column",
- "required" : true,
- "schema" : {
- "default" : "name",
- "type" : "string",
- "enum" : [ "name", "policy", "collection" ]
- }
- }, {
- "in" : "query",
- "name" : "sort_direction",
- "required" : true,
- "schema" : {
- "default" : "asc",
- "type" : "string",
- "enum" : [ "asc", "desc" ]
- }
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -19689,7 +13457,34 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase.cache.api.cache-config-list-response"
+ "type" : "object",
+ "properties" : {
+ "collection_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "created_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ },
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ },
+ "updated_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ }
+ },
+ "required" : [ "id", "name", "collection_id", "database_id", "status", "created_at", "updated_at" ]
}
}
}
@@ -19701,20 +13496,64 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/cache" ]
- },
- "put" : {
- "operationId" : "put-api-cache",
- "summary" : "PUT /api/cache",
- "description" : "Store cache configuration.",
- "parameters" : [ ],
+ "tags" : [ "/api/agent/v1/workspace" ]
+ }
+ },
+ "/api/agent/v1/workspace/{ws-id}/external/transform" : {
+ "get" : {
+ "operationId" : "get-api-agent-v1-workspace-ws-id-external-transform",
+ "summary" : "GET /api/agent/v1/workspace/{ws-id}/external/transform",
+ "description" : "List external transforms not checked out into this workspace.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "ws-id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
+ }, {
+ "in" : "query",
+ "name" : "database-id",
+ "required" : false,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase.cache.api.cache-config-store-response"
+ "type" : "object",
+ "properties" : {
+ "transforms" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "checkout_disabled" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "source_type" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "id", "name", "source_type", "checkout_disabled" ]
+ }
+ }
+ },
+ "required" : [ "transforms" ]
}
}
}
@@ -19726,44 +13565,95 @@
"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" ]
- }
- }
- }
- },
- "tags" : [ "/api/cache" ]
- },
- "delete" : {
- "operationId" : "delete-api-cache",
- "summary" : "DELETE /api/cache",
- "description" : "Delete cache configurations.",
- "parameters" : [ ],
+ "tags" : [ "/api/agent/v1/workspace" ]
+ }
+ },
+ "/api/agent/v1/workspace/{ws-id}/graph" : {
+ "get" : {
+ "operationId" : "get-api-agent-v1-workspace-ws-id-graph",
+ "summary" : "GET /api/agent/v1/workspace/{ws-id}/graph",
+ "description" : "Get the dependency graph for a workspace.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "ws-id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "type" : "null"
+ "type" : "object",
+ "properties" : {
+ "edges" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "from_entity_id" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ } ]
+ },
+ "from_entity_type" : {
+ "type" : "string"
+ },
+ "to_entity_id" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ } ]
+ },
+ "to_entity_type" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "from_entity_id", "from_entity_type", "to_entity_id", "to_entity_type" ]
+ }
+ },
+ "nodes" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "data" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "dependents_count" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }
+ },
+ "id" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ } ]
+ },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "input-table", "external-transform", "workspace-transform" ]
+ }
+ },
+ "required" : [ "id", "type", "dependents_count", "data" ]
+ }
+ }
+ },
+ "required" : [ "nodes", "edges" ]
}
}
}
@@ -19775,101 +13665,21 @@
"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/agent/v1/workspace" ]
}
},
- "/api/cache/invalidate" : {
- "post" : {
- "operationId" : "post-api-cache-invalidate",
- "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/agent/v1/workspace/{ws-id}/input/pending" : {
+ "get" : {
+ "operationId" : "get-api-agent-v1-workspace-ws-id-input-pending",
+ "summary" : "GET /api/agent/v1/workspace/{ws-id}/input/pending",
+ "description" : "List pending input grants.",
"parameters" : [ {
- "in" : "query",
- "name" : "include",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "const" : "overrides"
- }, {
- "type" : "null"
- } ]
- },
- "description" : "All cache configuration overrides should invalidate cache too"
- }, {
- "in" : "query",
- "name" : "database",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "description" : "value must be an integer greater or equal to than zero.",
- "type" : "integer",
- "minimum" : 0
- }
- }, {
- "type" : "null"
- } ]
- },
- "description" : "A list of database ids"
- }, {
- "in" : "query",
- "name" : "dashboard",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "description" : "value must be an integer greater or equal to than zero.",
- "type" : "integer",
- "minimum" : 0
- }
- }, {
- "type" : "null"
- } ]
- },
- "description" : "A list of dashboard ids"
- }, {
- "in" : "query",
- "name" : "question",
- "required" : false,
+ "in" : "path",
+ "name" : "ws-id",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "description" : "value must be an integer greater or equal to than zero.",
- "type" : "integer",
- "minimum" : 0
- }
- }, {
- "type" : "null"
- } ]
- },
- "description" : "A list of question ids"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
} ],
"responses" : {
"2XX" : {
@@ -19877,7 +13687,32 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase.cache.api.cache-invalidate-response"
+ "type" : "object",
+ "properties" : {
+ "inputs" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "db_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "db_id", "schema", "table" ]
+ }
+ }
+ },
+ "required" : [ "inputs" ]
}
}
}
@@ -19889,40 +13724,91 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/cache" ]
+ "tags" : [ "/api/agent/v1/workspace" ]
}
},
- "/api/card" : {
+ "/api/agent/v1/workspace/{ws-id}/log" : {
"get" : {
- "operationId" : "get-api-card",
- "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:",
+ "operationId" : "get-api-agent-v1-workspace-ws-id-log",
+ "summary" : "GET /api/agent/v1/workspace/{ws-id}/log",
+ "description" : "Get workspace creation status and recent log entries.",
"parameters" : [ {
- "in" : "query",
- "name" : "f",
+ "in" : "path",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "default" : "all",
- "type" : "string",
- "enum" : [ "archived", "table", "using_model", "bookmarked", "using_segment", "all", "mine", "database" ]
- }
- }, {
- "in" : "query",
- "name" : "model_id",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "last_completed_at" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
+ },
+ "logs" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "completed_at" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : { },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "message" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "started_at" : { },
+ "status" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "task" : {
+ "type" : "string"
+ },
+ "updated_at" : { }
+ },
+ "required" : [ "id", "task", "description", "started_at", "updated_at", "completed_at", "status", "message" ]
+ }
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ },
+ "updated_at" : { },
+ "workspace_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }
+ },
+ "required" : [ "workspace_id", "status", "updated_at", "last_completed_at", "logs" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -19931,16 +13817,37 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
- },
- "post" : {
- "operationId" : "post-api-card",
- "summary" : "POST /api/card",
- "description" : "Create a new `Card`. Card `type` can be `question`, `metric`, or `model`.",
- "parameters" : [ ],
+ "tags" : [ "/api/agent/v1/workspace" ]
+ }
+ },
+ "/api/agent/v1/workspace/{ws-id}/problem" : {
+ "get" : {
+ "operationId" : "get-api-agent-v1-workspace-ws-id-problem",
+ "summary" : "GET /api/agent/v1/workspace/{ws-id}/problem",
+ "description" : "Detect problems in the workspace.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "ws-id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.problem"
+ }
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -19949,143 +13856,103 @@
"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" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "entity_id" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "dataset_query" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- },
- "parameter_mappings" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "collection_position" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "result_metadata" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata"
- }, {
- "type" : "null"
- } ]
- },
- "collection_id" : {
- "oneOf" : [ {
- "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" : "null"
- } ]
- },
- "cache_ttl" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.queries.schema.card-type"
- }, {
- "type" : "null"
- } ]
- },
- "display" : {
+ "tags" : [ "/api/agent/v1/workspace" ]
+ }
+ },
+ "/api/agent/v1/workspace/{ws-id}/query" : {
+ "post" : {
+ "operationId" : "post-api-agent-v1-workspace-ws-id-query",
+ "summary" : "POST /api/agent/v1/workspace/{ws-id}/query",
+ "description" : "Execute a SQL query in the workspace's isolated database context.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "ws-id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.query-result"
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "sql" : {
"type" : "string",
"minLength" : 1
- },
- "parameters" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameters"
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "dashboard_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
}
},
- "required" : [ "name", "dataset_query", "display", "visualization_settings" ]
+ "required" : [ "sql" ]
}
}
}
},
- "tags" : [ "/api/card" ]
+ "tags" : [ "/api/agent/v1/workspace" ]
}
},
- "/api/card/collections" : {
+ "/api/agent/v1/workspace/{ws-id}/run" : {
"post" : {
- "operationId" : "post-api-card-collections",
- "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" : [ ],
+ "operationId" : "post-api-agent-v1-workspace-ws-id-run",
+ "summary" : "POST /api/agent/v1/workspace/{ws-id}/run",
+ "description" : "Execute all transforms in the workspace in dependency order.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "ws-id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "failed" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
+ },
+ "not_run" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
+ },
+ "succeeded" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
+ }
+ },
+ "required" : [ "succeeded", "failed", "not_run" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -20100,41 +13967,217 @@
"schema" : {
"type" : "object",
"properties" : {
- "card_ids" : {
- "type" : "array",
- "items" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }
- },
- "collection_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
+ "stale_only" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.flag"
}
- },
- "required" : [ "card_ids" ]
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/agent/v1/workspace" ]
+ }
+ },
+ "/api/agent/v1/workspace/{ws-id}/table" : {
+ "get" : {
+ "operationId" : "get-api-agent-v1-workspace-ws-id-table",
+ "summary" : "GET /api/agent/v1/workspace/{ws-id}/table",
+ "description" : "Get workspace input and output tables.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "ws-id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "inputs" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "db_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table" : {
+ "type" : "string"
+ },
+ "table_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "db_id", "schema", "table", "table_id" ]
+ }
+ },
+ "outputs" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "db_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "global" : {
+ "type" : "object",
+ "properties" : {
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table" : {
+ "type" : "string"
+ },
+ "table_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "transform_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "transform_id", "schema", "table", "table_id" ]
+ },
+ "isolated" : {
+ "type" : "object",
+ "properties" : {
+ "schema" : {
+ "type" : "string"
+ },
+ "table" : {
+ "type" : "string"
+ },
+ "table_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "transform_id" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }, {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ } ]
+ }
+ },
+ "required" : [ "transform_id", "schema", "table", "table_id" ]
+ }
+ },
+ "required" : [ "db_id", "global", "isolated" ]
+ }
+ }
+ },
+ "required" : [ "inputs", "outputs" ],
+ "additionalProperties" : false
+ }
}
}
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
+ "tags" : [ "/api/agent/v1/workspace" ]
}
},
- "/api/card/embeddable" : {
+ "/api/agent/v1/workspace/{ws-id}/transform" : {
"get" : {
- "operationId" : "get-api-card-embeddable",
- "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" : [ ],
+ "operationId" : "get-api-agent-v1-workspace-ws-id-transform",
+ "summary" : "GET /api/agent/v1/workspace/{ws-id}/transform",
+ "description" : "List all transforms in a workspace.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "ws-id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "transforms" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "creator_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "global_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "ref_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ },
+ "source_type" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "ref_id", "global_id", "name", "source_type", "creator_id" ],
+ "additionalProperties" : false
+ }
+ }
+ },
+ "required" : [ "transforms" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -20143,27 +14186,96 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
- }
- },
- "/api/card/pivot/{card-id}/query" : {
+ "tags" : [ "/api/agent/v1/workspace" ]
+ },
"post" : {
- "operationId" : "post-api-card-pivot-card-id-query",
- "summary" : "POST /api/card/pivot/{card-id}/query",
- "description" : "Run the query associated with a Card.",
+ "operationId" : "post-api-agent-v1-workspace-ws-id-transform",
+ "summary" : "POST /api/agent/v1/workspace/{ws-id}/transform",
+ "description" : "Create a new transform in the workspace.",
"parameters" : [ {
"in" : "path",
- "name" : "card-id",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "last_run_at" : { },
+ "target_stale" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "last_run_status" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "workspace_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "updated_at" : { },
+ "archived_at" : { },
+ "source" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "last_run_message" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "target" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "created_at" : { },
+ "global_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "creator_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "ref_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "ref_id", "global_id", "name", "description", "source", "target", "target_stale", "workspace_id", "creator_id", "archived_at", "created_at", "updated_at", "last_run_at", "last_run_status", "last_run_message" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -20178,74 +14290,129 @@
"schema" : {
"type" : "object",
"properties" : {
- "ignore_cache" : {
+ "description" : {
"oneOf" : [ {
- "type" : "boolean"
+ "type" : "string"
}, {
"type" : "null"
} ]
- }
- }
- }
- }
- }
- },
- "tags" : [ "/api/card" ]
- }
- },
- "/api/card/public" : {
- "get" : {
- "operationId" : "get-api-card-public",
- "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"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "source" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "query" : {
+ "$ref" : "#/components/schemas/metabase.queries.schema.query"
+ },
+ "type" : {
+ "const" : "query"
+ }
+ },
+ "required" : [ "type", "query" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "body" : {
+ "type" : "string"
+ },
+ "source-database" : {
+ "type" : "integer"
+ },
+ "source-tables" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.transforms-base.util.source-table-entry"
+ }
+ },
+ "type" : {
+ "const" : "python"
+ }
+ },
+ "required" : [ "source-tables", "type", "body" ],
+ "additionalProperties" : false
+ } ]
+ },
+ "target" : {
+ "type" : "object",
+ "properties" : {
+ "database" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "table" ]
+ }
+ },
+ "required" : [ "type", "name" ],
+ "additionalProperties" : false
+ }
+ },
+ "required" : [ "name", "source", "target" ]
+ }
+ }
}
},
- "tags" : [ "/api/card" ]
+ "tags" : [ "/api/agent/v1/workspace" ]
}
},
- "/api/card/{card-id}/params/{param-key}/search/{query}" : {
- "get" : {
- "operationId" : "get-api-card-card-id-params-param-key-search-query",
- "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/queries/1/params/abc/search/Orange\n\n Currently limited to first 1000 results.",
+ "/api/agent/v1/workspace/{ws-id}/transform/validate/target" : {
+ "post" : {
+ "operationId" : "post-api-agent-v1-workspace-ws-id-transform-validate-target",
+ "summary" : "POST /api/agent/v1/workspace/{ws-id}/transform/validate/target",
+ "description" : "Validate the target table for a workspace transform.",
"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",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
}, {
- "in" : "path",
- "name" : "query",
- "required" : true,
+ "in" : "query",
+ "name" : "transform-id",
+ "required" : false,
"schema" : {
- "type" : "string",
- "minLength" : 1
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "body" : {
+ "anyOf" : [ {
+ "type" : "string"
+ }, {
+ "anyOf" : [ { }, { } ]
+ } ]
+ },
+ "status" : {
+ "type" : "integer"
+ }
+ },
+ "required" : [ "status", "body" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -20254,90 +14421,142 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
- }
- },
- "/api/card/{card-id}/params/{param-key}/values" : {
- "get" : {
- "operationId" : "get-api-card-card-id-params-param-key-values",
- "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/queries/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"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "db_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "target" : {
+ "type" : "object",
+ "properties" : {
+ "database" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "type" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "type", "schema", "name" ]
+ }
+ },
+ "required" : [ "target" ]
+ }
+ }
}
},
- "tags" : [ "/api/card" ]
+ "tags" : [ "/api/agent/v1/workspace" ]
}
},
- "/api/card/{card-id}/public_link" : {
- "post" : {
- "operationId" : "post-api-card-card-id-public_link",
- "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/agent/v1/workspace/{ws-id}/transform/{tx-id}" : {
+ "get" : {
+ "operationId" : "get-api-agent-v1-workspace-ws-id-transform-tx-id",
+ "summary" : "GET /api/agent/v1/workspace/{ws-id}/transform/{tx-id}",
+ "description" : "Get a specific transform in a workspace.",
"parameters" : [ {
"in" : "path",
- "name" : "card-id",
+ "name" : "ws-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"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
- },
- "tags" : [ "/api/card" ]
- },
- "delete" : {
- "operationId" : "delete-api-card-card-id-public_link",
- "summary" : "DELETE /api/card/{card-id}/public_link",
- "description" : "Delete the publicly-accessible link to this Card.",
- "parameters" : [ {
+ }, {
"in" : "path",
- "name" : "card-id",
+ "name" : "tx-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "last_run_at" : { },
+ "target_stale" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "last_run_status" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "workspace_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "updated_at" : { },
+ "archived_at" : { },
+ "source" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "last_run_message" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "target" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "created_at" : { },
+ "global_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "creator_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "ref_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "ref_id", "global_id", "name", "description", "source", "target", "target_stale", "workspace_id", "creator_id", "archived_at", "created_at", "updated_at", "last_run_at", "last_run_status", "last_run_message" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -20346,33 +14565,103 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
- }
- },
- "/api/card/{card-id}/query" : {
- "post" : {
- "operationId" : "post-api-card-card-id-query",
- "summary" : "POST /api/card/{card-id}/query",
- "description" : "Run the query associated with a Card.",
+ "tags" : [ "/api/agent/v1/workspace" ]
+ },
+ "put" : {
+ "operationId" : "put-api-agent-v1-workspace-ws-id-transform-tx-id",
+ "summary" : "PUT /api/agent/v1/workspace/{ws-id}/transform/{tx-id}",
+ "description" : "Update or create a transform in a workspace.",
"parameters" : [ {
"in" : "path",
- "name" : "card-id",
+ "name" : "ws-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}$"
- } ]
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
+ }, {
+ "in" : "path",
+ "name" : "tx-id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "last_run_at" : { },
+ "target_stale" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "last_run_status" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "workspace_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "updated_at" : { },
+ "archived_at" : { },
+ "source" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "last_run_message" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "target" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "created_at" : { },
+ "global_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "creator_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "ref_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "ref_id", "global_id", "name", "description", "source", "target", "target_stale", "workspace_id", "creator_id", "archived_at", "created_at", "updated_at", "last_run_at", "last_run_status", "last_run_message" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -20387,138 +14676,154 @@
"schema" : {
"type" : "object",
"properties" : {
- "collection_preview" : {
+ "description" : {
"oneOf" : [ {
- "type" : "boolean"
+ "type" : "string"
}, {
"type" : "null"
} ]
},
- "dashboard_id" : {
+ "name" : {
+ "type" : "string"
+ },
+ "source" : {
"oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "type" : "object",
+ "properties" : {
+ "query" : {
+ "$ref" : "#/components/schemas/metabase.queries.schema.query"
+ },
+ "type" : {
+ "const" : "query"
+ }
+ },
+ "required" : [ "type", "query" ]
}, {
- "type" : "null"
+ "type" : "object",
+ "properties" : {
+ "body" : {
+ "type" : "string"
+ },
+ "source-database" : {
+ "type" : "integer"
+ },
+ "source-tables" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.transforms-base.util.source-table-entry"
+ }
+ },
+ "type" : {
+ "const" : "python"
+ }
+ },
+ "required" : [ "source-tables", "type", "body" ],
+ "additionalProperties" : false
} ]
},
- "ignore_cache" : {
- "default" : false,
- "type" : "boolean"
+ "target" : {
+ "type" : "object",
+ "properties" : {
+ "database" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "table" ]
+ }
+ },
+ "required" : [ "type", "name" ],
+ "additionalProperties" : false
}
- },
- "required" : [ "ignore_cache" ]
+ }
}
}
}
},
- "tags" : [ "/api/card" ]
- }
- },
- "/api/card/{card-id}/query/{export-format}" : {
- "post" : {
- "operationId" : "post-api-card-card-id-query-export-format",
- "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).",
+ "tags" : [ "/api/agent/v1/workspace" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-agent-v1-workspace-ws-id-transform-tx-id",
+ "summary" : "DELETE /api/agent/v1/workspace/{ws-id}/transform/{tx-id}",
+ "description" : "Delete a transform from the workspace.",
"parameters" : [ {
"in" : "path",
- "name" : "card-id",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
}, {
"in" : "path",
- "name" : "export-format",
+ "name" : "tx-id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "format_rows" : {
- "default" : false,
- "type" : "boolean"
- },
- "parameters" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "object",
- "additionalProperties" : { }
- }
- }, {
- "type" : "null"
- } ]
- },
- "pivot_results" : {
- "default" : false,
- "type" : "boolean"
- }
- },
- "required" : [ "format_rows", "pivot_results" ]
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "null"
+ }
}
}
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
+ "tags" : [ "/api/agent/v1/workspace" ]
}
},
- "/api/card/{id}" : {
- "get" : {
- "operationId" : "get-api-card-id",
- "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`.",
+ "/api/agent/v1/workspace/{ws-id}/transform/{tx-id}/archive" : {
+ "post" : {
+ "operationId" : "post-api-agent-v1-workspace-ws-id-transform-tx-id-archive",
+ "summary" : "POST /api/agent/v1/workspace/{ws-id}/transform/{tx-id}/archive",
+ "description" : "Mark a transform for archival.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "ws-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}$"
- } ]
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
}, {
- "in" : "query",
- "name" : "legacy-mbql",
- "required" : false,
+ "in" : "path",
+ "name" : "tx-id",
+ "required" : true,
"schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "null"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -20527,36 +14832,39 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
- },
- "put" : {
- "operationId" : "put-api-card-id",
- "summary" : "PUT /api/card/{id}",
- "description" : "Update a `Card`.",
+ "tags" : [ "/api/agent/v1/workspace" ]
+ }
+ },
+ "/api/agent/v1/workspace/{ws-id}/transform/{tx-id}/dry-run" : {
+ "post" : {
+ "operationId" : "post-api-agent-v1-workspace-ws-id-transform-tx-id-dry-run",
+ "summary" : "POST /api/agent/v1/workspace/{ws-id}/transform/{tx-id}/dry-run",
+ "description" : "Dry-run a transform without persisting to the target table.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
}, {
- "in" : "query",
- "name" : "delete_old_dashcards",
- "required" : false,
+ "in" : "path",
+ "name" : "tx-id",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.query-result"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -20569,190 +14877,49 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "enable_embedding" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "visualization_settings" : {
- "oneOf" : [ {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "dashboard_tab_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "collection_preview" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "dataset_query" : {
- "oneOf" : [ {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "parameter_mappings" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings"
- }, {
- "type" : "null"
- } ]
- },
- "embedding_type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "archived" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "collection_position" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "embedding_params" : {
- "oneOf" : [ {
- "description" : "value must be a valid embedding params map.",
- "oneOf" : [ {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string",
- "enum" : [ "disabled", "enabled", "locked" ]
- }
- }, {
- "type" : "null"
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "result_metadata" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata"
- }, {
- "type" : "null"
- } ]
- },
- "collection_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "cache_ttl" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "type" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.queries.schema.card-type"
- }, {
- "type" : "null"
- } ]
- },
- "display" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "parameters" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameters"
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "dashboard_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
+ "type" : "object",
+ "properties" : {
+ "run_stale_ancestors" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.flag"
}
}
}
}
}
},
- "tags" : [ "/api/card" ]
- },
- "delete" : {
- "operationId" : "delete-api-card-id",
- "summary" : "DELETE /api/card/{id}",
- "description" : "Hard delete a Card. To soft delete, use `PUT /api/queries/:id`",
+ "tags" : [ "/api/agent/v1/workspace" ]
+ }
+ },
+ "/api/agent/v1/workspace/{ws-id}/transform/{tx-id}/run" : {
+ "post" : {
+ "operationId" : "post-api-agent-v1-workspace-ws-id-transform-tx-id-run",
+ "summary" : "POST /api/agent/v1/workspace/{ws-id}/transform/{tx-id}/run",
+ "description" : "Run a single transform in a workspace.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
+ }, {
+ "in" : "path",
+ "name" : "tx-id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.execution-result"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -20761,24 +14928,70 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "run_stale_ancestors" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.flag"
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/agent/v1/workspace" ]
}
},
- "/api/card/{id}/copy" : {
+ "/api/agent/v1/workspace/{ws-id}/transform/{tx-id}/unarchive" : {
"post" : {
- "operationId" : "post-api-card-id-copy",
- "summary" : "POST /api/card/{id}/copy",
- "description" : "Copy a `Card`, with the new name 'Copy of _name_'",
+ "operationId" : "post-api-agent-v1-workspace-ws-id-transform-tx-id-unarchive",
+ "summary" : "POST /api/agent/v1/workspace/{ws-id}/transform/{tx-id}/unarchive",
+ "description" : "Unmark a transform for archival.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
+ }, {
+ "in" : "path",
+ "name" : "tx-id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
} ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "null"
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/agent/v1/workspace" ]
+ }
+ },
+ "/api/ai-entity-analysis/analyze-chart" : {
+ "post" : {
+ "operationId" : "post-api-ai-entity-analysis-analyze-chart",
+ "summary" : "POST /api/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\n for analysis.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -20790,23 +15003,94 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "image_base64" : {
+ "type" : "string"
+ },
+ "name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "timeline_events" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "timestamp" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "name", "timestamp" ]
+ }
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "image_base64" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ai-entity-analysis" ]
}
},
- "/api/card/{id}/dashboards" : {
+ "/api/alert" : {
"get" : {
- "operationId" : "get-api-card-id-dashboards",
- "summary" : "GET /api/card/{id}/dashboards",
- "description" : "Get a list of `{:name ... :id ...}` pairs for all the dashboards this card appears in.",
+ "operationId" : "get-api-alert",
+ "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" : "path",
- "name" : "id",
+ "in" : "query",
+ "name" : "archived",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "user_id",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
} ],
"responses" : {
"2XX" : {
@@ -20819,35 +15103,23 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
+ "tags" : [ "/api/alert" ]
}
},
- "/api/card/{id}/params/{param-key}/remapping" : {
+ "/api/alert/{id}" : {
"get" : {
- "operationId" : "get-api-card-id-params-param-key-remapping",
- "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/queries/1/params/abc/remapping?value=100",
+ "operationId" : "get-api-alert-id",
+ "summary" : "GET /api/alert/{id}",
+ "description" : "Fetch an alert by ID",
"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,
- "schema" : {
- "type" : "string"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -20860,29 +15132,23 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
+ "tags" : [ "/api/alert" ]
}
},
- "/api/card/{id}/query_metadata" : {
- "get" : {
- "operationId" : "get-api-card-id-query_metadata",
- "summary" : "GET /api/card/{id}/query_metadata",
- "description" : "Get all of the required query metadata for a card.",
+ "/api/alert/{id}/subscription" : {
+ "delete" : {
+ "operationId" : "delete-api-alert-id-subscription",
+ "summary" : "DELETE /api/alert/{id}/subscription",
+ "description" : "For users to unsubscribe themselves from the given alert.",
"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" : {
@@ -20895,56 +15161,15 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
+ "tags" : [ "/api/alert" ]
}
},
- "/api/card/{id}/series" : {
+ "/api/analytics/anonymous-stats" : {
"get" : {
- "operationId" : "get-api-card-id-series",
- "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" : {
- "type" : "integer"
- }
- }, {
- "in" : "query",
- "name" : "last_cursor",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "query",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "exclude_ids",
- "required" : false,
- "schema" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- }
- } ],
+ "operationId" : "get-api-analytics-anonymous-stats",
+ "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"
@@ -20956,14 +15181,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/card" ]
+ "tags" : [ "/api/analytics" ]
}
},
- "/api/cards/dashboards" : {
+ "/api/api-key" : {
"post" : {
- "operationId" : "post-api-cards-dashboards",
- "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.",
+ "operationId" : "post-api-api-key",
+ "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" : {
@@ -20982,28 +15207,45 @@
"schema" : {
"type" : "object",
"properties" : {
- "card_ids" : {
- "type" : "array",
- "items" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }
+ "group_id" : {
+ "$ref" : "#/components/schemas/metabase.api-keys.schema.id"
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
}
},
- "required" : [ "card_ids" ]
+ "required" : [ "group_id", "name" ]
}
}
}
},
- "tags" : [ "/api/cards" ]
+ "tags" : [ "/api/api-key" ]
+ },
+ "get" : {
+ "operationId" : "get-api-api-key",
+ "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/cards/move" : {
- "post" : {
- "operationId" : "post-api-cards-move",
- "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/api-key/count" : {
+ "get" : {
+ "operationId" : "get-api-api-key-count",
+ "summary" : "GET /api/api-key/count",
+ "description" : "Get the count of API keys in the DB with the default scope.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -21016,21 +15258,42 @@
"description" : "Server error response"
}
},
+ "tags" : [ "/api/api-key" ]
+ }
+ },
+ "/api/api-key/{id}" : {
+ "put" : {
+ "operationId" : "put-api-api-key-id",
+ "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" : "Successful response"
+ },
+ "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
- }
- },
- "collection_id" : {
+ "group_id" : {
"oneOf" : [ {
"description" : "value must be an integer greater than zero.",
"type" : "integer",
@@ -21039,30 +15302,144 @@
"type" : "null"
} ]
},
- "dashboard_id" : {
+ "name" : {
"oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "$ref" : "#/components/schemas/metabase.api-keys.schema.name"
}, {
"type" : "null"
} ]
}
- },
- "required" : [ "card_ids" ]
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/api-key" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-api-key-id",
+ "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/api-key/{id}/regenerate" : {
+ "put" : {
+ "operationId" : "put-api-api-key-id-regenerate",
+ "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" : "Successful response",
+ "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" ]
+ }
}
}
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/api-key" ]
+ }
+ },
+ "/api/automagic-dashboards/database/{id}/candidates" : {
+ "get" : {
+ "operationId" : "get-api-automagic-dashboards-database-id-candidates",
+ "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."
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/cards" ]
+ "tags" : [ "/api/automagic-dashboards" ]
}
},
- "/api/channel" : {
+ "/api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}" : {
"get" : {
- "operationId" : "get-api-channel",
- "summary" : "GET /api/channel",
- "description" : "Get all channels",
- "parameters" : [ ],
+ "operationId" : "get-api-automagic-dashboards-model_index-model-index-id-primary_key-pk-id",
+ "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"
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -21074,32 +15451,46 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "include_inactive" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }
- }
- }
+ "tags" : [ "/api/automagic-dashboards" ]
+ }
+ },
+ "/api/automagic-dashboards/{entity}/{entity-id-or-query}" : {
+ "get" : {
+ "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query",
+ "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" ]
}
- },
- "tags" : [ "/api/channel" ]
- },
- "post" : {
- "operationId" : "post-api-channel",
- "summary" : "POST /api/channel",
- "description" : "Create a channel",
- "parameters" : [ ],
+ }, {
+ "in" : "path",
+ "name" : "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" : {
+ "oneOf" : [ {
+ "anyOf" : [ {
+ "const" : "all"
+ }, {
+ "type" : "integer",
+ "minimum" : 0
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -21111,54 +15502,131 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "default" : true,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "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/automagic-dashboards" ]
+ }
+ },
+ "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}" : {
+ "get" : {
+ "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-cell-cell-query",
+ "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"
+ }
+ }, {
+ "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" : {
+ "oneOf" : [ {
+ "anyOf" : [ {
+ "type" : "string",
+ "enum" : [ "all" ]
+ }, {
+ "type" : "integer",
+ "minimum" : 0
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : "invalid show value"
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/channel" ]
+ "tags" : [ "/api/automagic-dashboards" ]
}
},
- "/api/channel/test" : {
- "post" : {
- "operationId" : "post-api-channel-test",
- "summary" : "POST /api/channel/test",
- "description" : "Test a channel connection",
- "parameters" : [ ],
+ "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : {
+ "get" : {
+ "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-cell-cell-query-compare-comparison-entity-comparison-entity-id-or-query",
+ "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" : "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,
+ "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" : {
+ "oneOf" : [ {
+ "anyOf" : [ {
+ "type" : "string",
+ "enum" : [ "all" ]
+ }, {
+ "type" : "integer",
+ "minimum" : 0
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : "invalid show value"
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -21170,42 +15638,65 @@
"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/automagic-dashboards" ]
}
},
- "/api/channel/{id}" : {
+ "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}" : {
"get" : {
- "operationId" : "get-api-channel-id",
- "summary" : "GET /api/channel/{id}",
- "description" : "Get a channel",
+ "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-cell-cell-query-rule-prefix-dashboard-template",
+ "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" : {
- "type" : "integer",
- "minimum" : 1
+ "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" : {
+ "oneOf" : [ {
+ "anyOf" : [ {
+ "type" : "string",
+ "enum" : [ "all" ]
+ }, {
+ "type" : "integer",
+ "minimum" : 0
+ } ]
+ }, {
+ "type" : "null"
+ } ]
},
- "description" : "value must be an integer greater than zero."
+ "description" : "invalid show value"
} ],
"responses" : {
"2XX" : {
@@ -21218,21 +15709,81 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/channel" ]
- },
- "put" : {
- "operationId" : "put-api-channel-id",
- "summary" : "PUT /api/channel/{id}",
- "description" : "Update a channel",
+ "tags" : [ "/api/automagic-dashboards" ]
+ }
+ },
+ "/api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : {
+ "get" : {
+ "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-cell-cell-query-rule-prefix-dashboard-template-compare-comparison-entity-comparison-entity-id-or-query",
+ "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" : {
- "type" : "integer",
- "minimum" : 1
+ "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" : "path",
+ "name" : "comparison-entity",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "enum" : [ "adhoc", "segment", "table" ]
},
- "description" : "value must be an integer greater than zero."
+ "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" : {
+ "oneOf" : [ {
+ "anyOf" : [ {
+ "type" : "string",
+ "enum" : [ "all" ]
+ }, {
+ "type" : "integer",
+ "minimum" : 0
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : "invalid show value"
} ],
"responses" : {
"2XX" : {
@@ -21245,64 +15796,64 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "details" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "type" : {
- "oneOf" : [ {
- "description" : "Must be a namespaced channel. E.g: channel/http"
- }, {
- "type" : "null"
- } ]
- }
- }
- }
- }
- }
- },
- "tags" : [ "/api/channel" ]
+ "tags" : [ "/api/automagic-dashboards" ]
}
},
- "/api/cloud-migration" : {
- "post" : {
- "operationId" : "post-api-cloud-migration",
- "summary" : "POST /api/cloud-migration",
- "description" : "Initiate a new cloud migration.",
- "parameters" : [ ],
+ "/api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : {
+ "get" : {
+ "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-compare-comparison-entity-comparison-entity-id-or-query",
+ "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"
+ }
+ }, {
+ "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" ]
+ },
+ "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" : {
+ "oneOf" : [ {
+ "anyOf" : [ {
+ "type" : "string",
+ "enum" : [ "all" ]
+ }, {
+ "type" : "integer",
+ "minimum" : 0
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : "invalid show value"
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -21314,13 +15865,30 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/cloud-migration" ]
- },
+ "tags" : [ "/api/automagic-dashboards" ]
+ }
+ },
+ "/api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata" : {
"get" : {
- "operationId" : "get-api-cloud-migration",
- "summary" : "GET /api/cloud-migration",
- "description" : "Get the latest cloud migration, if any.",
- "parameters" : [ ],
+ "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-query_metadata",
+ "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" : "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"
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -21332,15 +15900,59 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/cloud-migration" ]
+ "tags" : [ "/api/automagic-dashboards" ]
}
},
- "/api/cloud-migration/cancel" : {
- "put" : {
- "operationId" : "put-api-cloud-migration-cancel",
- "summary" : "PUT /api/cloud-migration/cancel",
- "description" : "Cancel any ongoing cloud migrations, if any.",
- "parameters" : [ ],
+ "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}" : {
+ "get" : {
+ "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-rule-prefix-dashboard-template",
+ "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" : "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" : "query",
+ "name" : "show",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "anyOf" : [ {
+ "type" : "string",
+ "enum" : [ "all" ]
+ }, {
+ "type" : "integer",
+ "minimum" : 0
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : "invalid show value"
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -21352,81 +15964,75 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/cloud-migration" ]
+ "tags" : [ "/api/automagic-dashboards" ]
}
},
- "/api/collection" : {
+ "/api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}" : {
"get" : {
- "operationId" : "get-api-collection",
- "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`.",
+ "operationId" : "get-api-automagic-dashboards-entity-entity-id-or-query-rule-prefix-dashboard-template-compare-comparison-entity-comparison-entity-id-or-query",
+ "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" : "query",
- "name" : "archived",
+ "in" : "path",
+ "name" : "entity",
"required" : true,
"schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "type" : "string",
+ "enum" : [ "adhoc", "field", "model", "question", "segment", "table", "transform" ]
}
}, {
- "in" : "query",
- "name" : "exclude-other-user-collections",
+ "in" : "path",
+ "name" : "entity-id-or-query",
"required" : true,
"schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "$ref" : "#/components/schemas/metabase.xrays.api.automagic-dashboards.entity-id-or-query"
}
}, {
- "in" : "query",
- "name" : "namespace",
- "required" : false,
+ "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" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
+ "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" : "personal-only",
- "required" : true,
+ "name" : "show",
+ "required" : false,
"schema" : {
- "default" : false,
"oneOf" : [ {
- "type" : "boolean"
+ "anyOf" : [ {
+ "type" : "string",
+ "enum" : [ "all" ]
+ }, {
+ "type" : "integer",
+ "minimum" : 0
+ } ]
}, {
"type" : "null"
} ]
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/collection" ]
- },
- "post" : {
- "operationId" : "post-api-collection",
- "summary" : "POST /api/collection",
- "description" : "Create a new Collection.",
- "parameters" : [ ],
+ "description" : "invalid show value"
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -21434,80 +16040,19 @@
"4XX" : {
"description" : "Client error response"
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "authority_level" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "official" ]
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "namespace" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "parent_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "name" ]
- }
- }
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/collection" ]
+ "tags" : [ "/api/automagic-dashboards" ]
}
},
- "/api/collection/graph" : {
+ "/api/bookmark" : {
"get" : {
- "operationId" : "get-api-collection-graph",
- "summary" : "GET /api/collection/graph",
- "description" : "Fetch a graph of all Collection Permissions.",
- "parameters" : [ {
- "in" : "query",
- "name" : "namespace",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- }
- } ],
+ "operationId" : "get-api-bookmark",
+ "summary" : "GET /api/bookmark",
+ "description" : "Fetch all bookmarks for the user",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -21519,37 +16064,15 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/collection" ]
- },
+ "tags" : [ "/api/bookmark" ]
+ }
+ },
+ "/api/bookmark/ordering" : {
"put" : {
- "operationId" : "put-api-collection-graph",
- "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" : "query",
- "name" : "force",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "skip-graph",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- } ],
+ "operationId" : "put-api-bookmark-ordering",
+ "summary" : "PUT /api/bookmark/ordering",
+ "description" : "Sets the order of bookmarks for user.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -21567,52 +16090,55 @@
"schema" : {
"type" : "object",
"properties" : {
- "groups" : {
- "type" : "object",
- "properties" : { }
- },
- "namespace" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "revision" : {
- "oneOf" : [ {
- "description" : "value must be an integer.",
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
+ "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" : [ "groups" ]
+ "required" : [ "orderings" ]
}
}
}
},
- "tags" : [ "/api/collection" ]
+ "tags" : [ "/api/bookmark" ]
}
},
- "/api/collection/root" : {
- "get" : {
- "operationId" : "get-api-collection-root",
- "summary" : "GET /api/collection/root",
- "description" : "Return the 'Root' Collection object with standard details added",
+ "/api/bookmark/{model}/{id}" : {
+ "post" : {
+ "operationId" : "post-api-bookmark-model-id",
+ "summary" : "POST /api/bookmark/{model}/{id}",
+ "description" : "Create a new bookmark for user.",
"parameters" : [ {
- "in" : "query",
- "name" : "namespace",
- "required" : false,
+ "in" : "path",
+ "name" : "model",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
+ "type" : "string",
+ "enum" : [ "card", "dashboard", "collection", "document" ]
}
+ }, {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -21625,25 +16151,33 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/collection" ]
- }
- },
- "/api/collection/root/dashboard-question-candidates" : {
- "get" : {
- "operationId" : "get-api-collection-root-dashboard-question-candidates",
- "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" : [ ],
+ "tags" : [ "/api/bookmark" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-bookmark-model-id",
+ "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" : "model",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "enum" : [ "card", "dashboard", "collection", "document" ]
+ }
+ }, {
+ "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",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.collections-rest.api.DashboardQuestionCandidatesResponse"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -21652,147 +16186,124 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/collection" ]
+ "tags" : [ "/api/bookmark" ]
}
},
- "/api/collection/root/items" : {
+ "/api/bug-reporting/connection-pool-details" : {
"get" : {
- "operationId" : "get-api-collection-root-items",
- "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 By default, library collections are excluded from the results; to include them, pass `?include_library=true`.\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" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string",
- "enum" : [ "dashboard", "table", "dataset", "no_models", "timeline", "snippet", "collection", "transform", "document", "pulse", "metric", "card" ]
- }
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "collection_type",
- "required" : false,
- "schema" : {
- "type" : "string",
- "enum" : [ "remote-synced" ]
- }
- }, {
- "in" : "query",
- "name" : "include_can_run_adhoc_query",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "archived",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "namespace",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
+ "operationId" : "get-api-bug-reporting-connection-pool-details",
+ "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"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
- }, {
- "in" : "query",
- "name" : "include_library",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ },
+ "tags" : [ "/api/bug-reporting" ]
+ }
+ },
+ "/api/bug-reporting/details" : {
+ "get" : {
+ "operationId" : "get-api-bug-reporting-details",
+ "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"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
- }, {
+ },
+ "tags" : [ "/api/bug-reporting" ]
+ }
+ },
+ "/api/cache" : {
+ "get" : {
+ "operationId" : "get-api-cache",
+ "summary" : "GET /api/cache",
+ "description" : "Return cache configuration. Supports pagination via `limit` and `offset` query parameters,\n and sorting via `sort_column` and `sort_direction`.",
+ "parameters" : [ {
"in" : "query",
- "name" : "pinned_state",
- "required" : false,
+ "name" : "model",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
+ "default" : [ "root" ],
+ "type" : "array",
+ "items" : {
"type" : "string",
- "enum" : [ "is_not_pinned", "is_pinned", "all" ]
- }, {
- "type" : "null"
- } ]
- }
+ "enum" : [ "root", "database", "dashboard", "question" ]
+ }
+ },
+ "description" : "Type of model"
}, {
"in" : "query",
- "name" : "sort_column",
+ "name" : "collection",
"required" : false,
"schema" : {
"oneOf" : [ {
- "type" : "string",
- "enum" : [ "model", "name", "last_edited_by", "last_edited_at", "description" ]
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}, {
"type" : "null"
} ]
- }
+ },
+ "description" : "Collection id to filter results. Returns everything if not supplied."
}, {
"in" : "query",
- "name" : "sort_direction",
+ "name" : "id",
"required" : false,
"schema" : {
"oneOf" : [ {
- "type" : "string",
- "enum" : [ "desc", "asc" ]
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}, {
"type" : "null"
} ]
- }
+ },
+ "description" : "Model id to get configuration for."
}, {
"in" : "query",
- "name" : "official_collections_first",
- "required" : false,
+ "name" : "sort_column",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "default" : "name",
+ "type" : "string",
+ "enum" : [ "name", "policy", "collection" ]
}
}, {
"in" : "query",
- "name" : "show_dashboard_questions",
- "required" : false,
+ "name" : "sort_direction",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "default" : "asc",
+ "type" : "string",
+ "enum" : [ "asc", "desc" ]
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.cache.api.cache-config-list-response"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -21801,14 +16312,12 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/collection" ]
- }
- },
- "/api/collection/root/move-dashboard-question-candidates" : {
- "post" : {
- "operationId" : "post-api-collection-root-move-dashboard-question-candidates",
- "summary" : "POST /api/collection/root/move-dashboard-question-candidates",
- "description" : "Move candidate cards to the dashboards they appear in (for the root collection)",
+ "tags" : [ "/api/cache" ]
+ },
+ "put" : {
+ "operationId" : "put-api-cache",
+ "summary" : "PUT /api/cache",
+ "description" : "Store cache configuration.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -21816,7 +16325,7 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase.collections-rest.api.MoveDashboardQuestionCandidatesResponse"
+ "$ref" : "#/components/schemas/metabase.cache.api.cache-config-store-response"
}
}
}
@@ -21832,38 +16341,43 @@
"content" : {
"application/json" : {
"schema" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "card_ids" : {
- "type" : "array",
- "items" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "uniqueItems" : true
- }
+ "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"
}
- }, {
- "type" : "null"
- } ]
+ },
+ "required" : [ "model", "model_id", "strategy" ]
}
}
}
},
- "tags" : [ "/api/collection" ]
- }
- },
- "/api/collection/trash" : {
- "get" : {
- "operationId" : "get-api-collection-trash",
- "summary" : "GET /api/collection/trash",
- "description" : "Fetch the trash collection, as in `/api/collection/:trash-id`",
+ "tags" : [ "/api/cache" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-cache",
+ "summary" : "DELETE /api/cache",
+ "description" : "Delete cache configurations.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "null"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -21872,91 +16386,140 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/collection" ]
+ "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/collection/tree" : {
- "get" : {
- "operationId" : "get-api-collection-tree",
- "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.\n\n By default, looks at the `analytics` (if enabled) and regular (`nil`) namespaces. You can optionally pass a\n `namespace` argument, or one or many `namespaces`, to specify the particular collection namespaces you wish to look\n at. For example, `namespaces=analytics&namespaces=` would match the default behavior.\n\n When `shallow` is true, takes an optional `collection-id` and returns only the requested collection (or\n the root, if `collection-id` is `nil`).",
+ "/api/cache/invalidate" : {
+ "post" : {
+ "operationId" : "post-api-cache-invalidate",
+ "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" : "query",
- "name" : "exclude-archived",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "exclude-other-user-collections",
- "required" : true,
+ "name" : "include",
+ "required" : false,
"schema" : {
- "default" : false,
"oneOf" : [ {
- "type" : "boolean"
+ "const" : "overrides"
}, {
"type" : "null"
} ]
- }
+ },
+ "description" : "All cache configuration overrides should invalidate cache too"
}, {
"in" : "query",
- "name" : "include-library",
- "required" : true,
+ "name" : "database",
+ "required" : false,
"schema" : {
- "default" : false,
"oneOf" : [ {
- "type" : "boolean"
+ "type" : "array",
+ "items" : {
+ "description" : "value must be an integer greater or equal to than zero.",
+ "type" : "integer",
+ "minimum" : 0
+ }
}, {
"type" : "null"
} ]
- }
+ },
+ "description" : "A list of database ids"
}, {
"in" : "query",
- "name" : "namespace",
+ "name" : "dashboard",
"required" : false,
"schema" : {
"oneOf" : [ {
- "type" : "string",
- "minLength" : 1
+ "type" : "array",
+ "items" : {
+ "description" : "value must be an integer greater or equal to than zero.",
+ "type" : "integer",
+ "minimum" : 0
+ }
}, {
"type" : "null"
} ]
- }
+ },
+ "description" : "A list of dashboard ids"
}, {
"in" : "query",
- "name" : "namespaces",
+ "name" : "question",
"required" : false,
"schema" : {
"oneOf" : [ {
"type" : "array",
"items" : {
- "type" : "string"
+ "description" : "value must be an integer greater or equal to than zero.",
+ "type" : "integer",
+ "minimum" : 0
}
}, {
"type" : "null"
} ]
+ },
+ "description" : "A list of question ids"
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.cache.api.cache-invalidate-response"
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
- }, {
+ },
+ "tags" : [ "/api/cache" ]
+ }
+ },
+ "/api/card" : {
+ "get" : {
+ "operationId" : "get-api-card",
+ "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" : "shallow",
+ "name" : "f",
"required" : true,
"schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "default" : "all",
+ "type" : "string",
+ "enum" : [ "archived", "table", "using_model", "bookmarked", "using_segment", "all", "mine", "database" ]
}
}, {
"in" : "query",
- "name" : "collection-id",
+ "name" : "model_id",
"required" : false,
"schema" : {
"oneOf" : [ {
@@ -21979,30 +16542,207 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/collection" ]
+ "tags" : [ "/api/card" ]
+ },
+ "post" : {
+ "operationId" : "post-api-card",
+ "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" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "entity_id" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "dataset_query" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ },
+ "parameter_mappings" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "collection_position" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "result_metadata" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_id" : {
+ "oneOf" : [ {
+ "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" : "null"
+ } ]
+ },
+ "cache_ttl" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.queries.schema.card-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "parameters" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameters"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "dashboard_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "name", "dataset_query", "display", "visualization_settings" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/card" ]
}
},
- "/api/collection/{id}" : {
- "get" : {
- "operationId" : "get-api-collection-id",
- "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}$"
- } ]
+ "/api/card/collections" : {
+ "post" : {
+ "operationId" : "post-api-card-collections",
+ "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"
+ }
+ },
+ "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" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "card_ids" ]
+ }
+ }
}
- } ],
+ },
+ "tags" : [ "/api/card" ]
+ }
+ },
+ "/api/card/embeddable" : {
+ "get" : {
+ "operationId" : "get-api-card-embeddable",
+ "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"
@@ -22014,15 +16754,17 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/collection" ]
- },
- "put" : {
- "operationId" : "put-api-collection-id",
- "summary" : "PUT /api/collection/{id}",
- "description" : "Modify an existing Collection, including archiving or unarchiving it, or moving it.",
+ "tags" : [ "/api/card" ]
+ }
+ },
+ "/api/card/pivot/{card-id}/query" : {
+ "post" : {
+ "operationId" : "post-api-card-pivot-card-id-query",
+ "summary" : "POST /api/card/pivot/{card-id}/query",
+ "description" : "Run the query associated with a Card.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "card-id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -22047,77 +16789,27 @@
"schema" : {
"type" : "object",
"properties" : {
- "archived" : {
- "default" : false,
+ "ignore_cache" : {
"oneOf" : [ {
"type" : "boolean"
}, {
"type" : "null"
} ]
- },
- "authority_level" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "official" ]
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "parent_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "type" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "remote-synced" ]
- }, {
- "type" : "null"
- } ]
}
- },
- "required" : [ "archived" ]
+ }
}
}
}
},
- "tags" : [ "/api/collection" ]
- },
- "delete" : {
- "operationId" : "delete-api-collection-id",
- "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."
- } ],
+ "tags" : [ "/api/card" ]
+ }
+ },
+ "/api/card/public" : {
+ "get" : {
+ "operationId" : "get-api-card-public",
+ "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"
@@ -22129,34 +16821,42 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/collection" ]
+ "tags" : [ "/api/card" ]
}
},
- "/api/collection/{id}/dashboard-question-candidates" : {
+ "/api/card/{card-id}/params/{param-key}/search/{query}" : {
"get" : {
- "operationId" : "get-api-collection-id-dashboard-question-candidates",
- "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.",
+ "operationId" : "get-api-card-card-id-params-param-key-search-query",
+ "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/queries/1/params/abc/search/Orange\n\n Currently limited to first 1000 results.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "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",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.collections-rest.api.DashboardQuestionCandidatesResponse"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -22165,126 +16865,29 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/collection" ]
+ "tags" : [ "/api/card" ]
}
},
- "/api/collection/{id}/items" : {
+ "/api/card/{card-id}/params/{param-key}/values" : {
"get" : {
- "operationId" : "get-api-collection-id-items",
- "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.",
+ "operationId" : "get-api-card-card-id-params-param-key-values",
+ "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/queries/1/params/abc/values",
"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" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string",
- "enum" : [ "dashboard", "table", "dataset", "no_models", "timeline", "snippet", "collection", "transform", "document", "pulse", "metric", "card" ]
- }
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "archived",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "include_can_run_adhoc_query",
+ "name" : "card-id",
"required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "pinned_state",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "is_not_pinned", "is_pinned", "all" ]
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "sort_column",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "model", "name", "last_edited_by", "last_edited_at", "description" ]
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "sort_direction",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "desc", "asc" ]
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "official_collections_first",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
}, {
- "in" : "query",
- "name" : "show_dashboard_questions",
+ "in" : "path",
+ "name" : "param-key",
"required" : true,
"schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id"
}
} ],
"responses" : {
@@ -22298,17 +16901,17 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/collection" ]
+ "tags" : [ "/api/card" ]
}
},
- "/api/collection/{id}/move-dashboard-question-candidates" : {
+ "/api/card/{card-id}/public_link" : {
"post" : {
- "operationId" : "post-api-collection-id-move-dashboard-question-candidates",
- "summary" : "POST /api/collection/{id}/move-dashboard-question-candidates",
- "description" : "Move candidate cards to the dashboards they appear in.",
+ "operationId" : "post-api-card-card-id-public_link",
+ "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" : "id",
+ "name" : "card-id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -22318,14 +16921,7 @@
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.collections-rest.api.MoveDashboardQuestionCandidatesResponse"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -22334,49 +16930,15 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "card_ids" : {
- "type" : "array",
- "items" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "uniqueItems" : true
- }
- }
- }, {
- "type" : "null"
- } ]
- }
- }
- }
- },
- "tags" : [ "/api/collection" ]
- }
- },
- "/api/comment" : {
- "get" : {
- "operationId" : "get-api-comment",
- "summary" : "GET /api/comment",
- "description" : "Get comments for an entity",
+ "tags" : [ "/api/card" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-card-card-id-public_link",
+ "summary" : "DELETE /api/card/{card-id}/public_link",
+ "description" : "Delete the publicly-accessible link to this Card.",
"parameters" : [ {
- "in" : "query",
- "name" : "target_type",
- "required" : true,
- "schema" : {
- "type" : "string",
- "enum" : [ "document" ]
- }
- }, {
- "in" : "query",
- "name" : "target_id",
+ "in" : "path",
+ "name" : "card-id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -22395,13 +16957,30 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/comment" ]
- },
+ "tags" : [ "/api/card" ]
+ }
+ },
+ "/api/card/{card-id}/query" : {
"post" : {
- "operationId" : "post-api-comment",
- "summary" : "POST /api/comment",
- "description" : "Create a new comment",
- "parameters" : [ ],
+ "operationId" : "post-api-card-card-id-query",
+ "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"
@@ -22419,17 +16998,14 @@
"schema" : {
"type" : "object",
"properties" : {
- "child_target_id" : {
+ "collection_preview" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "boolean"
}, {
"type" : "null"
} ]
},
- "content" : {
- "type" : "object"
- },
- "parent_comment_id" : {
+ "dashboard_id" : {
"oneOf" : [ {
"description" : "value must be an integer greater than zero.",
"type" : "integer",
@@ -22438,30 +17014,41 @@
"type" : "null"
} ]
},
- "target_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "target_type" : {
- "type" : "string",
- "enum" : [ "document" ]
+ "ignore_cache" : {
+ "default" : false,
+ "type" : "boolean"
}
},
- "required" : [ "target_type", "target_id", "content" ]
+ "required" : [ "ignore_cache" ]
}
}
}
},
- "tags" : [ "/api/comment" ]
+ "tags" : [ "/api/card" ]
}
},
- "/api/comment/mentions" : {
- "get" : {
- "operationId" : "get-api-comment-mentions",
- "summary" : "GET /api/comment/mentions",
- "description" : "Get a list of entities suitable for mentions. NOTE: only users for now.",
- "parameters" : [ ],
+ "/api/card/{card-id}/query/{export-format}" : {
+ "post" : {
+ "operationId" : "post-api-card-card-id-query-export-format",
+ "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"
@@ -22473,23 +17060,110 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/comment" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "format_rows" : {
+ "default" : false,
+ "type" : "boolean"
+ },
+ "parameters" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "additionalProperties" : { }
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "pivot_results" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ },
+ "required" : [ "format_rows", "pivot_results" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/card" ]
}
},
- "/api/comment/{comment-id}" : {
+ "/api/card/{id}" : {
+ "get" : {
+ "operationId" : "get-api-card-id",
+ "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" : "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" : "legacy-mbql",
+ "required" : false,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/card" ]
+ },
"put" : {
- "operationId" : "put-api-comment-comment-id",
- "summary" : "PUT /api/comment/{comment-id}",
- "description" : "Update a comment",
+ "operationId" : "put-api-card-id",
+ "summary" : "PUT /api/card/{id}",
+ "description" : "Update a `Card`.",
"parameters" : [ {
"in" : "path",
- "name" : "comment-id",
+ "name" : "id",
"required" : true,
"schema" : {
"type" : "integer",
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "query",
+ "name" : "delete_old_dashcards",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
} ],
"responses" : {
"2XX" : {
@@ -22508,26 +17182,178 @@
"schema" : {
"type" : "object",
"properties" : {
- "content" : {
- "type" : "object"
+ "enable_embedding" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
},
- "is_resolved" : {
- "type" : "boolean"
+ "visualization_settings" : {
+ "oneOf" : [ {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "dashboard_tab_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_preview" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "dataset_query" : {
+ "oneOf" : [ {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "parameter_mappings" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "embedding_type" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "archived" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_position" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "embedding_params" : {
+ "oneOf" : [ {
+ "description" : "value must be a valid embedding params map.",
+ "oneOf" : [ {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string",
+ "enum" : [ "disabled", "enabled", "locked" ]
+ }
+ }, {
+ "type" : "null"
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "result_metadata" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "cache_ttl" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "type" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.queries.schema.card-type"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "parameters" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameters"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "dashboard_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
}
}
}
}
},
- "tags" : [ "/api/comment" ]
+ "tags" : [ "/api/card" ]
},
"delete" : {
- "operationId" : "delete-api-comment-comment-id",
- "summary" : "DELETE /api/comment/{comment-id}",
- "description" : "Soft delete a comment",
+ "operationId" : "delete-api-card-id",
+ "summary" : "DELETE /api/card/{id}",
+ "description" : "Hard delete a Card. To soft delete, use `PUT /api/queries/:id`",
"parameters" : [ {
"in" : "path",
- "name" : "comment-id",
+ "name" : "id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -22546,17 +17372,17 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/comment" ]
+ "tags" : [ "/api/card" ]
}
},
- "/api/comment/{comment-id}/reaction" : {
+ "/api/card/{id}/copy" : {
"post" : {
- "operationId" : "post-api-comment-comment-id-reaction",
- "summary" : "POST /api/comment/{comment-id}/reaction",
- "description" : "Toggle a reaction on a comment",
+ "operationId" : "post-api-card-id-copy",
+ "summary" : "POST /api/card/{id}/copy",
+ "description" : "Copy a `Card`, with the new name 'Copy of _name_'",
"parameters" : [ {
"in" : "path",
- "name" : "comment-id",
+ "name" : "id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -22575,63 +17401,24 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "emoji" : {
- "type" : "string",
- "minLength" : 1,
- "maxLength" : 10
- }
- },
- "required" : [ "emoji" ]
- }
- }
- }
- },
- "tags" : [ "/api/comment" ]
+ "tags" : [ "/api/card" ]
}
},
- "/api/dashboard" : {
+ "/api/card/{id}/dashboards" : {
"get" : {
- "operationId" : "get-api-dashboard",
- "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*.)",
+ "operationId" : "get-api-card-id-dashboards",
+ "summary" : "GET /api/card/{id}/dashboards",
+ "description" : "Get a list of `{:name ... :id ...}` pairs for all the dashboards this card appears in.",
"parameters" : [ {
- "in" : "query",
- "name" : "f",
- "required" : false,
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "all", "mine", "archived" ]
- }, {
- "type" : "null"
- } ]
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
+ "type" : "integer",
+ "minimum" : 1
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "deprecated" : true,
- "tags" : [ "/api/dashboard" ]
- },
- "post" : {
- "operationId" : "post-api-dashboard",
- "summary" : "POST /api/dashboard",
- "description" : "Create a new Dashboard.",
- "parameters" : [ ],
+ "description" : "value must be an integer greater than zero."
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -22643,72 +17430,36 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "cache_ttl" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "collection_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "collection_position" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "parameters" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameters"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "name" ]
- }
- }
- }
- },
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/card" ]
}
},
- "/api/dashboard/embeddable" : {
+ "/api/card/{id}/params/{param-key}/remapping" : {
"get" : {
- "operationId" : "get-api-dashboard-embeddable",
- "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" : [ ],
+ "operationId" : "get-api-card-id-params-param-key-remapping",
+ "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/queries/1/params/abc/remapping?value=100",
+ "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,
+ "schema" : {
+ "type" : "string"
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -22720,36 +17471,27 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/card" ]
}
},
- "/api/dashboard/params/valid-filter-fields" : {
+ "/api/card/{id}/query_metadata" : {
"get" : {
- "operationId" : "get-api-dashboard-params-valid-filter-fields",
- "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",
+ "operationId" : "get-api-card-id-query_metadata",
+ "summary" : "GET /api/card/{id}/query_metadata",
+ "description" : "Get all of the required query metadata for a card.",
"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" : {
- "oneOf" : [ {
- "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
}, {
- "type" : "null"
+ "description" : "String must be a valid 21-character NanoID string.",
+ "type" : "string",
+ "pattern" : "^[A-Za-z0-9_\\-]{21}$"
} ]
}
} ],
@@ -22764,41 +17506,55 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/card" ]
}
},
- "/api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : {
- "post" : {
- "operationId" : "post-api-dashboard-pivot-dashboard-id-dashcard-dashcard-id-card-card-id-query",
- "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/card/{id}/series" : {
+ "get" : {
+ "operationId" : "get-api-card-id-series",
+ "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" : "dashboard-id",
+ "name" : "id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "type" : "integer"
+ }
}, {
- "in" : "path",
- "name" : "dashcard-id",
- "required" : true,
+ "in" : "query",
+ "name" : "last_cursor",
+ "required" : false,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
}, {
- "in" : "path",
- "name" : "card-id",
- "required" : true,
+ "in" : "query",
+ "name" : "query",
+ "required" : false,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "exclude_ids",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
+ }
} ],
"responses" : {
"2XX" : {
@@ -22811,48 +17567,14 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "parameters" : {
- "oneOf" : [ {
- "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" : { }
- } ]
- }
- }, {
- "type" : "null"
- } ]
- }
- }
- }
- }
- }
- },
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/card" ]
}
},
- "/api/dashboard/public" : {
- "get" : {
- "operationId" : "get-api-dashboard-public",
- "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/cards/dashboards" : {
+ "post" : {
+ "operationId" : "post-api-cards-dashboards",
+ "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" : {
@@ -22865,14 +17587,34 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
+ "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
+ }
+ }
+ },
+ "required" : [ "card_ids" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/cards" ]
}
},
- "/api/dashboard/save" : {
+ "/api/cards/move" : {
"post" : {
- "operationId" : "post-api-dashboard-save",
- "summary" : "POST /api/dashboard/save",
- "description" : "Save a denormalized description of dashboard.",
+ "operationId" : "post-api-cards-move",
+ "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" : {
@@ -22885,24 +17627,53 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
+ "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" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "dashboard_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "card_ids" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/cards" ]
}
},
- "/api/dashboard/save/collection/{parent-collection-id}" : {
- "post" : {
- "operationId" : "post-api-dashboard-save-collection-parent-collection-id",
- "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" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- } ],
+ "/api/channel" : {
+ "get" : {
+ "operationId" : "get-api-channel",
+ "summary" : "GET /api/channel",
+ "description" : "Get all channels",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -22914,42 +17685,32 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
- }
- },
- "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : {
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "include_inactive" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/channel" ]
+ },
"post" : {
- "operationId" : "post-api-dashboard-dashboard-id-dashcard-dashcard-id-card-card-id-query",
- "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" : "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."
- } ],
+ "operationId" : "post-api-channel",
+ "summary" : "POST /api/channel",
+ "description" : "Create a channel",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -22967,85 +17728,48 @@
"schema" : {
"type" : "object",
"properties" : {
- "dashboard_load_id" : {
+ "active" : {
+ "default" : true,
"oneOf" : [ {
- "type" : "string",
- "minLength" : 1
+ "type" : "boolean"
}, {
"type" : "null"
} ]
},
- "parameters" : {
+ "description" : {
"oneOf" : [ {
- "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" : { }
- } ]
- }
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
+ },
+ "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/dashboard" ]
+ "tags" : [ "/api/channel" ]
}
},
- "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}" : {
+ "/api/channel/test" : {
"post" : {
- "operationId" : "post-api-dashboard-dashboard-id-dashcard-dashcard-id-card-card-id-query-export-format",
- "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" : "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."
- }, {
- "in" : "path",
- "name" : "export-format",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format"
- }
- } ],
+ "operationId" : "post-api-channel-test",
+ "summary" : "POST /api/channel/test",
+ "description" : "Test a channel connection",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -23057,88 +17781,42 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "format_rows" : {
- "default" : false,
- "type" : "boolean"
- },
- "parameters" : {
- "oneOf" : [ {
- "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"
- } ]
- }, {
- "type" : "null"
- } ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "details" : {
+ "type" : "object",
+ "properties" : { }
},
- "pivot_results" : {
- "default" : false,
- "type" : "boolean"
+ "type" : {
+ "description" : "Must be a namespaced channel. E.g: channel/http"
}
},
- "required" : [ "format_rows", "pivot_results" ]
+ "required" : [ "type", "details" ]
}
}
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/channel" ]
}
},
- "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute" : {
+ "/api/channel/{id}" : {
"get" : {
- "operationId" : "get-api-dashboard-dashboard-id-dashcard-dashcard-id-execute",
- "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.",
+ "operationId" : "get-api-channel-id",
+ "summary" : "GET /api/channel/{id}",
+ "description" : "Get a channel",
"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",
"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" : {
@@ -23151,24 +17829,15 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/channel" ]
},
- "post" : {
- "operationId" : "post-api-dashboard-dashboard-id-dashcard-dashcard-id-execute",
- "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.",
+ "put" : {
+ "operationId" : "put-api-channel-id",
+ "summary" : "PUT /api/channel/{id}",
+ "description" : "Update a channel",
"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",
@@ -23193,10 +17862,40 @@
"schema" : {
"type" : "object",
"properties" : {
- "parameters" : {
+ "active" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "details" : {
"oneOf" : [ {
"type" : "object",
- "additionalProperties" : { }
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "type" : {
+ "oneOf" : [ {
+ "description" : "Must be a namespaced channel. E.g: channel/http"
}, {
"type" : "null"
} ]
@@ -23206,24 +17905,15 @@
}
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/channel" ]
}
},
- "/api/dashboard/{dashboard-id}/public_link" : {
+ "/api/cloud-migration" : {
"post" : {
- "operationId" : "post-api-dashboard-dashboard-id-public_link",
- "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."
- } ],
+ "operationId" : "post-api-cloud-migration",
+ "summary" : "POST /api/cloud-migration",
+ "description" : "Initiate a new cloud migration.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -23235,22 +17925,33 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/cloud-migration" ]
},
- "delete" : {
- "operationId" : "delete-api-dashboard-dashboard-id-public_link",
- "summary" : "DELETE /api/dashboard/{dashboard-id}/public_link",
- "description" : "Delete the publicly-accessible link to this Dashboard.",
- "parameters" : [ {
- "in" : "path",
- "name" : "dashboard-id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
+ "get" : {
+ "operationId" : "get-api-cloud-migration",
+ "summary" : "GET /api/cloud-migration",
+ "description" : "Get the latest cloud migration, if any.",
+ "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/cloud-migration" ]
+ }
+ },
+ "/api/cloud-migration/cancel" : {
+ "put" : {
+ "operationId" : "put-api-cloud-migration-cancel",
+ "summary" : "PUT /api/cloud-migration/cancel",
+ "description" : "Cancel any ongoing cloud migrations, if any.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -23262,23 +17963,62 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/cloud-migration" ]
}
},
- "/api/dashboard/{from-dashboard-id}/copy" : {
- "post" : {
- "operationId" : "post-api-dashboard-from-dashboard-id-copy",
- "summary" : "POST /api/dashboard/{from-dashboard-id}/copy",
- "description" : "Copy a Dashboard.",
+ "/api/collection" : {
+ "get" : {
+ "operationId" : "get-api-collection",
+ "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" : "from-dashboard-id",
+ "in" : "query",
+ "name" : "archived",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "exclude-other-user-collections",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "namespace",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "personal-only",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
} ],
"responses" : {
"2XX" : {
@@ -23291,80 +18031,91 @@
"description" : "Server error response"
}
},
+ "tags" : [ "/api/collection" ]
+ },
+ "post" : {
+ "operationId" : "post-api-collection",
+ "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" : {
- "collection_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "collection_position" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "authority_level" : {
"oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "type" : "string",
+ "enum" : [ "official" ]
}, {
"type" : "null"
} ]
},
"description" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
},
- "is_deep_copy" : {
- "default" : false,
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "namespace" : {
"oneOf" : [ {
- "type" : "boolean"
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
},
- "name" : {
+ "parent_id" : {
"oneOf" : [ {
- "type" : "string",
- "minLength" : 1
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}, {
"type" : "null"
} ]
}
},
- "required" : [ "is_deep_copy" ]
+ "required" : [ "name" ]
}
}
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/collection" ]
}
},
- "/api/dashboard/{id}" : {
+ "/api/collection/graph" : {
"get" : {
- "operationId" : "get-api-dashboard-id",
- "summary" : "GET /api/dashboard/{id}",
- "description" : "Get Dashboard with ID.",
+ "operationId" : "get-api-collection-graph",
+ "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" : {
- "anyOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "description" : "String must be a valid 21-character NanoID string.",
+ "oneOf" : [ {
"type" : "string",
- "pattern" : "^[A-Za-z0-9_\\-]{21}$"
+ "minLength" : 1
+ }, {
+ "type" : "null"
} ]
}
} ],
@@ -23379,48 +18130,36 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/collection" ]
},
- "delete" : {
- "operationId" : "delete-api-dashboard-id",
- "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.",
+ "put" : {
+ "operationId" : "put-api-collection-graph",
+ "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",
+ "in" : "query",
+ "name" : "force",
"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"
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
}
- },
- "tags" : [ "/api/dashboard" ]
- },
- "put" : {
- "operationId" : "put-api-dashboard-id",
- "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",
+ }, {
+ "in" : "query",
+ "name" : "skip-graph",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
} ],
"responses" : {
"2XX" : {
@@ -23439,239 +18178,259 @@
"schema" : {
"type" : "object",
"properties" : {
- "points_of_interest" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "enable_embedding" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "width" : {
- "type" : "string",
- "enum" : [ "fixed", "full" ]
- },
- "embedding_type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "show_in_getting_started" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "position" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "archived" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "collection_position" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "embedding_params" : {
- "oneOf" : [ {
- "description" : "value must be a valid embedding params map.",
- "oneOf" : [ {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string",
- "enum" : [ "disabled", "enabled", "locked" ]
- }
- }, {
- "type" : "null"
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "tabs" : {
- "oneOf" : [ {
- "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" ]
- }
- }, {
- "type" : "null"
- } ]
- },
- "collection_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "cache_ttl" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "caveats" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "parameters" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameters"
- }, {
- "type" : "null"
- } ]
+ "groups" : {
+ "type" : "object",
+ "properties" : { }
},
- "dashcards" : {
+ "namespace" : {
"oneOf" : [ {
- "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" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string",
- "minLength" : 1
- }
- }, {
- "type" : "null"
- } ]
- },
- "parameter_mappings" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings"
- }, {
- "type" : "null"
- } ]
- },
- "row" : {
- "description" : "value must be an integer greater or equal to than zero.",
- "type" : "integer",
- "minimum" : 0
- },
- "series" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "object"
- }
- }, {
- "type" : "null"
- } ]
- },
- "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" ]
- }
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
},
- "description" : {
+ "revision" : {
"oneOf" : [ {
- "type" : "string"
+ "description" : "value must be an integer.",
+ "type" : "integer"
}, {
"type" : "null"
} ]
}
+ },
+ "required" : [ "groups" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/collection" ]
+ }
+ },
+ "/api/collection/root" : {
+ "get" : {
+ "operationId" : "get-api-collection-root",
+ "summary" : "GET /api/collection/root",
+ "description" : "Return the 'Root' Collection object with standard details added",
+ "parameters" : [ {
+ "in" : "query",
+ "name" : "namespace",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/collection" ]
+ }
+ },
+ "/api/collection/root/dashboard-question-candidates" : {
+ "get" : {
+ "operationId" : "get-api-collection-root-dashboard-question-candidates",
+ "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",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.collections-rest.api.DashboardQuestionCandidatesResponse"
}
}
}
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/collection" ]
+ }
+ },
+ "/api/collection/root/items" : {
+ "get" : {
+ "operationId" : "get-api-collection-root-items",
+ "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 By default, library collections are excluded from the results; to include them, pass `?include_library=true`.\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" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "enum" : [ "dashboard", "table", "dataset", "no_models", "timeline", "snippet", "collection", "transform", "document", "pulse", "metric", "card" ]
+ }
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "collection_type",
+ "required" : false,
+ "schema" : {
+ "type" : "string",
+ "enum" : [ "remote-synced" ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "include_can_run_adhoc_query",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "archived",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "namespace",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "include_library",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "pinned_state",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "is_not_pinned", "is_pinned", "all" ]
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "sort_column",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "model", "name", "last_edited_by", "last_edited_at", "description" ]
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "sort_direction",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "desc", "asc" ]
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "official_collections_first",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "show_dashboard_questions",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/collection" ]
}
},
- "/api/dashboard/{id}/cards" : {
- "put" : {
- "operationId" : "put-api-dashboard-id-cards",
- "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."
- } ],
+ "/api/collection/root/move-dashboard-question-candidates" : {
+ "post" : {
+ "operationId" : "post-api-collection-root-move-dashboard-question-candidates",
+ "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" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.collections-rest.api.MoveDashboardQuestionCandidatesResponse"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -23684,115 +18443,35 @@
"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" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string",
- "minLength" : 1
- }
- }, {
- "type" : "null"
- } ]
- },
- "parameter_mappings" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings"
- }, {
- "type" : "null"
- } ]
- },
- "row" : {
- "description" : "value must be an integer greater or equal to than zero.",
- "type" : "integer",
- "minimum" : 0
- },
- "series" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "object"
- }
- }, {
- "type" : "null"
- } ]
- },
- "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" : {
- "oneOf" : [ {
- "description" : "value must be seq of maps in which ids are unique",
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "card_ids" : {
"type" : "array",
"items" : {
- "type" : "object",
- "properties" : {
- "id" : {
- "description" : "value must be an integer.",
- "type" : "integer"
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "id", "name" ]
- }
- }, {
- "type" : "null"
- } ]
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "uniqueItems" : true
+ }
}
- },
- "required" : [ "cards" ]
+ }, {
+ "type" : "null"
+ } ]
}
}
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/collection" ]
}
},
- "/api/dashboard/{id}/items" : {
+ "/api/collection/trash" : {
"get" : {
- "operationId" : "get-api-dashboard-id-items",
- "summary" : "GET /api/dashboard/{id}/items",
- "description" : "Get Dashboard with ID.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- } ],
+ "operationId" : "get-api-collection-trash",
+ "summary" : "GET /api/collection/trash",
+ "description" : "Fetch the trash collection, as in `/api/collection/:trash-id`",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -23804,119 +18483,100 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/collection" ]
}
},
- "/api/dashboard/{id}/params/{param-key}/remapping" : {
+ "/api/collection/tree" : {
"get" : {
- "operationId" : "get-api-dashboard-id-params-param-key-remapping",
- "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",
+ "operationId" : "get-api-collection-tree",
+ "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.\n\n By default, looks at the `analytics` (if enabled) and regular (`nil`) namespaces. You can optionally pass a\n `namespace` argument, or one or many `namespaces`, to specify the particular collection namespaces you wish to look\n at. For example, `namespaces=analytics&namespaces=` would match the default behavior.\n\n When `shallow` is true, takes an optional `collection-id` and returns only the requested collection (or\n the root, if `collection-id` is `nil`).",
"parameters" : [ {
- "in" : "path",
- "name" : "id",
+ "in" : "query",
+ "name" : "exclude-archived",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
}, {
- "in" : "path",
- "name" : "param-key",
+ "in" : "query",
+ "name" : "exclude-other-user-collections",
"required" : true,
"schema" : {
- "type" : "string",
- "minLength" : 1
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
}
}, {
"in" : "query",
- "name" : "value",
+ "name" : "include-library",
"required" : true,
"schema" : {
- "type" : "string"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
}
- },
- "tags" : [ "/api/dashboard" ]
- }
- },
- "/api/dashboard/{id}/params/{param-key}/search/{query}" : {
- "get" : {
- "operationId" : "get-api-dashboard-id-params-param-key-search-query",
- "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",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
}, {
- "in" : "path",
- "name" : "param-key",
- "required" : true,
+ "in" : "query",
+ "name" : "namespace",
+ "required" : false,
"schema" : {
- "type" : "string",
- "minLength" : 1
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
}
}, {
- "in" : "path",
- "name" : "query",
- "required" : true,
+ "in" : "query",
+ "name" : "namespaces",
+ "required" : false,
"schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }, {
+ "type" : "null"
+ } ]
}
- },
- "tags" : [ "/api/dashboard" ]
- }
- },
- "/api/dashboard/{id}/params/{param-key}/values" : {
- "get" : {
- "operationId" : "get-api-dashboard-id-params-param-key-values",
- "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",
+ }, {
+ "in" : "query",
+ "name" : "shallow",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
}, {
- "in" : "path",
- "name" : "param-key",
- "required" : true,
+ "in" : "query",
+ "name" : "collection-id",
+ "required" : false,
"schema" : {
- "type" : "string",
- "minLength" : 1
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
} ],
"responses" : {
@@ -23930,14 +18590,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
+ "tags" : [ "/api/collection" ]
}
},
- "/api/dashboard/{id}/query_metadata" : {
+ "/api/collection/{id}" : {
"get" : {
- "operationId" : "get-api-dashboard-id-query_metadata",
- "summary" : "GET /api/dashboard/{id}/query_metadata",
- "description" : "Get all of the required query metadata for the cards on dashboard.",
+ "operationId" : "get-api-collection-id",
+ "summary" : "GET /api/collection/{id}",
+ "description" : "Fetch a specific Collection with standard details added",
"parameters" : [ {
"in" : "path",
"name" : "id",
@@ -23965,14 +18625,12 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
- }
- },
- "/api/dashboard/{id}/related" : {
- "get" : {
- "operationId" : "get-api-dashboard-id-related",
- "summary" : "GET /api/dashboard/{id}/related",
- "description" : "Return related entities.",
+ "tags" : [ "/api/collection" ]
+ },
+ "put" : {
+ "operationId" : "put-api-collection-id",
+ "summary" : "PUT /api/collection/{id}",
+ "description" : "Modify an existing Collection, including archiving or unarchiving it, or moving it.",
"parameters" : [ {
"in" : "path",
"name" : "id",
@@ -23994,202 +18652,86 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/dashboard" ]
- }
- },
- "/api/data-studio/table/discard-values" : {
- "post" : {
- "operationId" : "post-api-data-studio-table-discard-values",
- "summary" : "POST /api/data-studio/table/discard-values",
- "description" : "Batch version of /table/:id/discard_values. Takes an abstract table selection as /table/edit does.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "null"
- }
- }
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.data-studio.api.table.table-selectors"
- }
- }
- }
- },
- "tags" : [ "/api/data-studio/table" ]
- }
- },
- "/api/data-studio/table/edit" : {
- "post" : {
- "operationId" : "post-api-data-studio-table-edit",
- "summary" : "POST /api/data-studio/table/edit",
- "description" : "Bulk updating tables.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : { },
- "additionalProperties" : false
- }
- }
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"properties" : {
- "data_authority" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.data-studio.api.table.data-authorities"
- }, {
- "type" : "null"
- } ]
- },
- "data_layer" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.data-studio.api.table.data-layers"
- }, {
- "type" : "null"
- } ]
- },
- "table_ids" : {
- "type" : "array",
- "items" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }
- },
- "owner_email" : {
+ "archived" : {
+ "default" : false,
"oneOf" : [ {
- "type" : "string"
+ "type" : "boolean"
}, {
"type" : "null"
} ]
},
- "owner_user_id" : {
+ "authority_level" : {
"oneOf" : [ {
- "type" : "integer"
+ "type" : "string",
+ "enum" : [ "official" ]
}, {
"type" : "null"
} ]
},
- "data_source" : {
+ "description" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.data-studio.api.table.data-sources"
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
},
- "schema_ids" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- },
- "entity_type" : {
+ "name" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
- } ]
- },
- "database_ids" : {
- "type" : "array",
- "items" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }
- }
- },
- "additionalProperties" : false
- }
- }
- }
- },
- "tags" : [ "/api/data-studio/table" ]
- }
- },
- "/api/data-studio/table/rescan-values" : {
- "post" : {
- "operationId" : "post-api-data-studio-table-rescan-values",
- "summary" : "POST /api/data-studio/table/rescan-values",
- "description" : "Batch version of /table/:id/rescan_values. Takes an abstract table selection as /table/edit does.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "null"
- }
- }
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.data-studio.api.table.table-selectors"
+ } ]
+ },
+ "parent_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "type" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "remote-synced" ]
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "archived" ]
}
}
}
},
- "tags" : [ "/api/data-studio/table" ]
- }
- },
- "/api/data-studio/table/selection" : {
- "post" : {
- "operationId" : "post-api-data-studio-table-selection",
- "summary" : "POST /api/data-studio/table/selection",
- "description" : "Gets information about selected tables",
- "parameters" : [ ],
+ "tags" : [ "/api/collection" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-collection-id",
+ "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",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.data-studio.api.table.bulk-table-selection-info"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -24198,31 +18740,31 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.data-studio.api.table.table-selectors"
- }
- }
- }
- },
- "tags" : [ "/api/data-studio/table" ]
+ "tags" : [ "/api/collection" ]
}
},
- "/api/data-studio/table/sync-schema" : {
- "post" : {
- "operationId" : "post-api-data-studio-table-sync-schema",
- "summary" : "POST /api/data-studio/table/sync-schema",
- "description" : "Batch version of /table/:id/sync_schema. Takes an abstract table selection as /table/edit does.\n - Currently checks policy before returning (so you might receive a 4xx on e.g. AuthZ policy failure)\n - The sync itself is however, asynchronous. This call may return before all tables synced.",
- "parameters" : [ ],
+ "/api/collection/{id}/dashboard-question-candidates" : {
+ "get" : {
+ "operationId" : "get-api-collection-id-dashboard-question-candidates",
+ "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",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "type" : "null"
+ "$ref" : "#/components/schemas/metabase.collections-rest.api.DashboardQuestionCandidatesResponse"
}
}
}
@@ -24234,50 +18776,47 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.data-studio.api.table.table-selectors"
- }
- }
- }
- },
- "tags" : [ "/api/data-studio/table" ]
+ "tags" : [ "/api/collection" ]
}
},
- "/api/database" : {
+ "/api/collection/{id}/items" : {
"get" : {
- "operationId" : "get-api-database",
- "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 * `can-query` will only include DBs for which the current user has query permissions. Default: `false`.\n\n * `can-write-metadata` will only include DBs for which the current user has data model editing permissions\n for at least one table in the database. Default: `false`.\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.",
+ "operationId" : "get-api-collection-id-items",
+ "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" : "query",
- "name" : "include",
- "required" : false,
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
- "const" : "tables"
+ "anyOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}, {
- "type" : "null"
+ "description" : "String must be a valid 21-character NanoID string.",
+ "type" : "string",
+ "pattern" : "^[A-Za-z0-9_\\-]{21}$"
} ]
- },
- "description" : "include must be either empty or the value 'tables'"
+ }
}, {
"in" : "query",
- "name" : "include_analytics",
- "required" : true,
+ "name" : "models",
+ "required" : false,
"schema" : {
- "default" : false,
"oneOf" : [ {
- "type" : "boolean"
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "enum" : [ "dashboard", "table", "dataset", "no_models", "timeline", "snippet", "collection", "transform", "document", "pulse", "metric", "card" ]
+ }
}, {
"type" : "null"
} ]
}
}, {
"in" : "query",
- "name" : "saved",
+ "name" : "archived",
"required" : true,
"schema" : {
"default" : false,
@@ -24289,7 +18828,7 @@
}
}, {
"in" : "query",
- "name" : "include_editable_data_model",
+ "name" : "include_can_run_adhoc_query",
"required" : true,
"schema" : {
"default" : false,
@@ -24301,44 +18840,43 @@
}
}, {
"in" : "query",
- "name" : "exclude_uneditable_details",
- "required" : true,
+ "name" : "pinned_state",
+ "required" : false,
"schema" : {
- "default" : false,
"oneOf" : [ {
- "type" : "boolean"
+ "type" : "string",
+ "enum" : [ "is_not_pinned", "is_pinned", "all" ]
}, {
"type" : "null"
} ]
}
}, {
"in" : "query",
- "name" : "include_only_uploadable",
- "required" : true,
+ "name" : "sort_column",
+ "required" : false,
"schema" : {
- "default" : false,
"oneOf" : [ {
- "type" : "boolean"
+ "type" : "string",
+ "enum" : [ "model", "name", "last_edited_by", "last_edited_at", "description" ]
}, {
"type" : "null"
} ]
}
}, {
"in" : "query",
- "name" : "router_database_id",
+ "name" : "sort_direction",
"required" : false,
"schema" : {
"oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "type" : "string",
+ "enum" : [ "desc", "asc" ]
}, {
"type" : "null"
} ]
}
}, {
"in" : "query",
- "name" : "can-query",
+ "name" : "official_collections_first",
"required" : false,
"schema" : {
"oneOf" : [ {
@@ -24349,9 +18887,10 @@
}
}, {
"in" : "query",
- "name" : "can-write-metadata",
- "required" : false,
+ "name" : "show_dashboard_questions",
+ "required" : true,
"schema" : {
+ "default" : false,
"oneOf" : [ {
"type" : "boolean"
}, {
@@ -24370,12 +18909,109 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/collection" ]
+ }
+ },
+ "/api/collection/{id}/move-dashboard-question-candidates" : {
+ "post" : {
+ "operationId" : "post-api-collection-id-move-dashboard-question-candidates",
+ "summary" : "POST /api/collection/{id}/move-dashboard-question-candidates",
+ "description" : "Move candidate cards to the dashboards they appear 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",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.collections-rest.api.MoveDashboardQuestionCandidatesResponse"
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "card_ids" : {
+ "type" : "array",
+ "items" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "uniqueItems" : true
+ }
+ }
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/collection" ]
+ }
+ },
+ "/api/comment" : {
+ "get" : {
+ "operationId" : "get-api-comment",
+ "summary" : "GET /api/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"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/comment" ]
},
"post" : {
- "operationId" : "post-api-database",
- "summary" : "POST /api/database",
- "description" : "Add a new `Database`.",
+ "operationId" : "post-api-comment",
+ "summary" : "POST /api/comment",
+ "description" : "Create a new comment",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -24394,26 +19030,17 @@
"schema" : {
"type" : "object",
"properties" : {
- "provider_name" : {
+ "child_target_id" : {
"oneOf" : [ {
"type" : "string"
}, {
"type" : "null"
} ]
},
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "is_on_demand" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "content" : {
+ "type" : "object"
},
- "cache_ttl" : {
+ "parent_comment_id" : {
"oneOf" : [ {
"description" : "value must be an integer greater than zero.",
"type" : "integer",
@@ -24422,61 +19049,29 @@
"type" : "null"
} ]
},
- "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" : {
- "default" : true,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "connection_source" : {
- "default" : "admin",
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "admin", "setup" ]
- }, {
- "type" : "null"
- } ]
- },
- "auto_run_queries" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "target_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "schedules" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap"
- }, {
- "type" : "null"
- } ]
+ "target_type" : {
+ "type" : "string",
+ "enum" : [ "document" ]
}
},
- "required" : [ "name", "engine", "details", "is_full_sync", "is_on_demand", "connection_source" ]
+ "required" : [ "target_type", "target_id", "content" ]
}
}
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/comment" ]
}
},
- "/api/database/sample_database" : {
- "post" : {
- "operationId" : "post-api-database-sample_database",
- "summary" : "POST /api/database/sample_database",
- "description" : "Add the sample database as a new `Database`.",
+ "/api/comment/mentions" : {
+ "get" : {
+ "operationId" : "get-api-comment-mentions",
+ "summary" : "GET /api/comment/mentions",
+ "description" : "Get a list of entities suitable for mentions. NOTE: only users for now.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -24489,15 +19084,24 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/comment" ]
}
},
- "/api/database/validate" : {
- "post" : {
- "operationId" : "post-api-database-validate",
- "summary" : "POST /api/database/validate",
- "description" : "Validate that we can connect to a database given a set of details.",
- "parameters" : [ ],
+ "/api/comment/{comment-id}" : {
+ "put" : {
+ "operationId" : "put-api-comment-comment-id",
+ "summary" : "PUT /api/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"
@@ -24515,70 +19119,32 @@
"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" ]
+ "content" : {
+ "type" : "object"
+ },
+ "is_resolved" : {
+ "type" : "boolean"
}
- },
- "required" : [ "details" ]
+ }
}
}
}
},
- "tags" : [ "/api/database" ]
- }
- },
- "/api/database/{id}" : {
- "get" : {
- "operationId" : "get-api-database-id",
- "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.",
+ "tags" : [ "/api/comment" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-comment-comment-id",
+ "summary" : "DELETE /api/comment/{comment-id}",
+ "description" : "Soft delete a comment",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "comment-id",
"required" : true,
"schema" : {
"type" : "integer",
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
- }, {
- "in" : "query",
- "name" : "include",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "tables", "tables.fields" ]
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "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" : {
@@ -24591,15 +19157,17 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
- },
- "put" : {
- "operationId" : "put-api-database-id",
- "summary" : "PUT /api/database/{id}",
- "description" : "Update a `Database`.",
+ "tags" : [ "/api/comment" ]
+ }
+ },
+ "/api/comment/{comment-id}/reaction" : {
+ "post" : {
+ "operationId" : "post-api-comment-comment-id-reaction",
+ "summary" : "POST /api/comment/{comment-id}/reaction",
+ "description" : "Toggle a reaction on a comment",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "comment-id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -24624,46 +19192,74 @@
"schema" : {
"type" : "object",
"properties" : {
- "points_of_interest" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "provider_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "write_data_details" : {
- "oneOf" : [ {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "settings" : {
- "oneOf" : [ {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
+ "emoji" : {
+ "type" : "string",
+ "minLength" : 1,
+ "maxLength" : 10
+ }
+ },
+ "required" : [ "emoji" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/comment" ]
+ }
+ },
+ "/api/dashboard" : {
+ "get" : {
+ "operationId" : "get-api-dashboard",
+ "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" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "all", "mine", "archived" ]
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "deprecated" : true,
+ "tags" : [ "/api/dashboard" ]
+ },
+ "post" : {
+ "operationId" : "post-api-dashboard",
+ "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" : {
"oneOf" : [ {
"description" : "value must be an integer greater than zero.",
@@ -24673,80 +19269,57 @@
"type" : "null"
} ]
},
- "engine" : {
- "oneOf" : [ {
- "description" : "value must be a valid database engine.",
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "details" : {
+ "collection_id" : {
"oneOf" : [ {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}, {
"type" : "null"
} ]
},
- "auto_run_queries" : {
+ "collection_position" : {
"oneOf" : [ {
- "type" : "boolean"
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}, {
"type" : "null"
} ]
},
- "caveats" : {
+ "description" : {
"oneOf" : [ {
"type" : "string"
}, {
"type" : "null"
} ]
},
- "refingerprint" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "schedules" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap"
- }, {
- "type" : "null"
- } ]
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
},
- "description" : {
+ "parameters" : {
"oneOf" : [ {
- "type" : "string"
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameters"
}, {
"type" : "null"
} ]
}
- }
+ },
+ "required" : [ "name" ]
}
}
}
},
- "tags" : [ "/api/database" ]
- },
- "delete" : {
- "operationId" : "delete-api-database-id",
- "summary" : "DELETE /api/database/{id}",
- "description" : "Delete a `Database`.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- } ],
+ "tags" : [ "/api/dashboard" ]
+ }
+ },
+ "/api/dashboard/embeddable" : {
+ "get" : {
+ "operationId" : "get-api-dashboard-embeddable",
+ "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" : {
"description" : "Successful response"
@@ -24758,43 +19331,34 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{id}/autocomplete_suggestions" : {
+ "/api/dashboard/params/valid-filter-fields" : {
"get" : {
- "operationId" : "get-api-database-id-autocomplete_suggestions",
- "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\"]`",
+ "operationId" : "get-api-dashboard-params-valid-filter-fields",
+ "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" : "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,
+ "name" : "filtered",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ }
}
}, {
"in" : "query",
- "name" : "substring",
+ "name" : "filtering",
"required" : false,
"schema" : {
"oneOf" : [ {
- "type" : "string",
- "minLength" : 1
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ }
}, {
"type" : "null"
} ]
@@ -24811,17 +19375,17 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{id}/card_autocomplete_suggestions" : {
- "get" : {
- "operationId" : "get-api-database-id-card_autocomplete_suggestions",
- "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. {{#...}}.",
+ "/api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : {
+ "post" : {
+ "operationId" : "post-api-dashboard-pivot-dashboard-id-dashcard-dashcard-id-card-card-id-query",
+ "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" : "id",
+ "name" : "dashboard-id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -24829,21 +19393,98 @@
},
"description" : "value must be an integer greater than zero."
}, {
- "in" : "query",
- "name" : "query",
+ "in" : "path",
+ "name" : "dashcard-id",
"required" : true,
"schema" : {
- "type" : "string",
- "minLength" : 1
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
}, {
- "in" : "query",
- "name" : "include_dashboard_questions",
- "required" : false,
+ "in" : "path",
+ "name" : "card-id",
+ "required" : true,
"schema" : {
- "type" : "boolean"
+ "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" : {
+ "parameters" : {
+ "oneOf" : [ {
+ "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" : { }
+ } ]
+ }
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/dashboard" ]
+ }
+ },
+ "/api/dashboard/public" : {
+ "get" : {
+ "operationId" : "get-api-dashboard-public",
+ "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"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
- } ],
+ },
+ "tags" : [ "/api/dashboard" ]
+ }
+ },
+ "/api/dashboard/save" : {
+ "post" : {
+ "operationId" : "post-api-dashboard-save",
+ "summary" : "POST /api/dashboard/save",
+ "description" : "Save a denormalized description of dashboard.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -24855,17 +19496,17 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{id}/discard_values" : {
+ "/api/dashboard/save/collection/{parent-collection-id}" : {
"post" : {
- "operationId" : "post-api-database-id-discard_values",
- "summary" : "POST /api/database/{id}/discard_values",
- "description" : "Discards all saved field values for this `Database`.",
+ "operationId" : "post-api-dashboard-save-collection-parent-collection-id",
+ "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" : "id",
+ "name" : "parent-collection-id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -24884,17 +19525,35 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{id}/dismiss_spinner" : {
+ "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query" : {
"post" : {
- "operationId" : "post-api-database-id-dismiss_spinner",
- "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)",
+ "operationId" : "post-api-dashboard-dashboard-id-dashcard-dashcard-id-card-card-id-query",
+ "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" : "path",
- "name" : "id",
+ "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",
@@ -24913,23 +19572,90 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "dashboard_load_id" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "parameters" : {
+ "oneOf" : [ {
+ "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" : { }
+ } ]
+ }
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{id}/fields" : {
- "get" : {
- "operationId" : "get-api-database-id-fields",
- "summary" : "GET /api/database/{id}/fields",
- "description" : "Get a list of all `Fields` in `Database`.",
+ "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}" : {
+ "post" : {
+ "operationId" : "post-api-dashboard-dashboard-id-dashcard-dashcard-id-card-card-id-query-export-format",
+ "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" : "path",
- "name" : "id",
+ "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."
+ }, {
+ "in" : "path",
+ "name" : "export-format",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format"
+ }
} ],
"responses" : {
"2XX" : {
@@ -24942,17 +19668,74 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "format_rows" : {
+ "default" : false,
+ "type" : "boolean"
+ },
+ "parameters" : {
+ "oneOf" : [ {
+ "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"
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "pivot_results" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ },
+ "required" : [ "format_rows", "pivot_results" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{id}/healthcheck" : {
+ "/api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute" : {
"get" : {
- "operationId" : "get-api-database-id-healthcheck",
- "summary" : "GET /api/database/{id}/healthcheck",
- "description" : "Reports whether the database can currently connect",
+ "operationId" : "get-api-dashboard-dashboard-id-dashcard-dashcard-id-execute",
+ "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" : "id",
+ "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",
@@ -24961,11 +19744,12 @@
"description" : "value must be an integer greater than zero."
}, {
"in" : "query",
- "name" : "connection-type",
+ "name" : "parameters",
"required" : false,
"schema" : {
- "$ref" : "#/components/schemas/metabase.driver.connection.connection-type"
- }
+ "type" : "string"
+ },
+ "description" : "value must be a valid JSON string."
} ],
"responses" : {
"2XX" : {
@@ -24978,17 +19762,24 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
- }
- },
- "/api/database/{id}/idfields" : {
- "get" : {
- "operationId" : "get-api-database-id-idfields",
- "summary" : "GET /api/database/{id}/idfields",
- "description" : "Get a list of all primary key `Fields` for `Database`.",
+ "tags" : [ "/api/dashboard" ]
+ },
+ "post" : {
+ "operationId" : "post-api-dashboard-dashboard-id-dashcard-dashcard-id-execute",
+ "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" : "id",
+ "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",
@@ -25007,71 +19798,42 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "parameters" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "additionalProperties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{id}/metadata" : {
- "get" : {
- "operationId" : "get-api-database-id-metadata",
- "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.",
+ "/api/dashboard/{dashboard-id}/public_link" : {
+ "post" : {
+ "operationId" : "post-api-dashboard-dashboard-id-public_link",
+ "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" : "id",
+ "name" : "dashboard-id",
"required" : true,
"schema" : {
"type" : "integer",
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
- }, {
- "in" : "query",
- "name" : "include_hidden",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "include_editable_data_model",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "remove_inactive",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "skip_fields",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
} ],
"responses" : {
"2XX" : {
@@ -25084,54 +19846,25 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
- }
- },
- "/api/database/{id}/permission/workspace/check" : {
- "post" : {
- "operationId" : "post-api-database-id-permission-workspace-check",
- "summary" : "POST /api/database/{id}/permission/workspace/check",
- "description" : "Check if database's connection has the required permissions to manage workspaces.\n By default it'll return the cached permission check.",
+ "tags" : [ "/api/dashboard" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-dashboard-dashboard-id-public_link",
+ "summary" : "DELETE /api/dashboard/{dashboard-id}/public_link",
+ "description" : "Delete the publicly-accessible link to this Dashboard.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "dashboard-id",
"required" : true,
"schema" : {
"type" : "integer",
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
- }, {
- "in" : "path",
- "name" : "cached",
- "required" : false,
- "schema" : {
- "default" : true,
- "type" : "boolean"
- }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "checked_at" : {
- "type" : "string"
- },
- "error" : {
- "type" : "string"
- },
- "status" : {
- "type" : "string"
- }
- },
- "required" : [ "status", "checked_at" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -25140,17 +19873,17 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{id}/rescan_values" : {
+ "/api/dashboard/{from-dashboard-id}/copy" : {
"post" : {
- "operationId" : "post-api-database-id-rescan_values",
- "summary" : "POST /api/database/{id}/rescan_values",
- "description" : "Trigger a manual scan of the field values for this `Database`.",
+ "operationId" : "post-api-dashboard-from-dashboard-id-copy",
+ "summary" : "POST /api/dashboard/{from-dashboard-id}/copy",
+ "description" : "Copy a Dashboard.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "from-dashboard-id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -25169,67 +19902,80 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "collection_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_position" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "is_deep_copy" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "is_deep_copy" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{id}/schema" : {
+ "/api/dashboard/{id}" : {
"get" : {
- "operationId" : "get-api-database-id-schema",
- "summary" : "GET /api/database/{id}/schema",
- "description" : "Return a list of Tables for a Database whose `schema` is `nil` or an empty string.\n\n Optional filters:\n - `can-query=true` - filter to only tables the user can query\n - `can-write-metadata=true` - filter to only tables the user can edit metadata for",
+ "operationId" : "get-api-dashboard-id",
+ "summary" : "GET /api/dashboard/{id}",
+ "description" : "Get Dashboard with ID.",
"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" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "include_editable_data_model",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "can-query",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "can-write-metadata",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
+ "anyOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}, {
- "type" : "null"
+ "description" : "String must be a valid 21-character NanoID string.",
+ "type" : "string",
+ "pattern" : "^[A-Za-z0-9_\\-]{21}$"
} ]
}
} ],
@@ -25244,14 +19990,12 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
- }
- },
- "/api/database/{id}/schema/{schema}" : {
- "get" : {
- "operationId" : "get-api-database-id-schema-schema",
- "summary" : "GET /api/database/{id}/schema/{schema}",
- "description" : "Returns a list of Tables for the given Database `id` and `schema`.\n\n Optional filters:\n - `can-query=true` - filter to only tables the user can query\n - `can-write-metadata=true` - filter to only tables the user can edit metadata for",
+ "tags" : [ "/api/dashboard" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-dashboard-id",
+ "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",
@@ -25261,60 +20005,6 @@
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
- }, {
- "in" : "path",
- "name" : "schema",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- }, {
- "in" : "query",
- "name" : "include_hidden",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "include_editable_data_model",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "can-query",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "can-write-metadata",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
} ],
"responses" : {
"2XX" : {
@@ -25327,14 +20017,12 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
- }
- },
- "/api/database/{id}/schemas" : {
- "get" : {
- "operationId" : "get-api-database-id-schemas",
- "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.\n\n Optional filters:\n - `can-query=true` - filter to only schemas containing tables the user can query\n - `can-write-metadata=true` - filter to only schemas containing tables the user can edit metadata for",
+ "tags" : [ "/api/dashboard" ]
+ },
+ "put" : {
+ "operationId" : "put-api-dashboard-id",
+ "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",
@@ -25344,94 +20032,244 @@
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
- }, {
- "in" : "query",
- "name" : "include_editable_data_model",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "include_hidden",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "can-query",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "can-write-metadata",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }, {
- "in" : "query",
- "name" : "include_workspace",
- "required" : true,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "type" : "string"
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "points_of_interest" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "enable_embedding" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "width" : {
+ "type" : "string",
+ "enum" : [ "fixed", "full" ]
+ },
+ "embedding_type" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "show_in_getting_started" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "position" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "archived" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_position" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "embedding_params" : {
+ "oneOf" : [ {
+ "description" : "value must be a valid embedding params map.",
+ "oneOf" : [ {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string",
+ "enum" : [ "disabled", "enabled", "locked" ]
+ }
+ }, {
+ "type" : "null"
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "tabs" : {
+ "oneOf" : [ {
+ "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" ]
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "cache_ttl" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "caveats" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "parameters" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameters"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "dashcards" : {
+ "oneOf" : [ {
+ "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" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "parameter_mappings" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "row" : {
+ "description" : "value must be an integer greater or equal to than zero.",
+ "type" : "integer",
+ "minimum" : 0
+ },
+ "series" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "object"
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "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" ]
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
}
}
}
}
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{id}/settings-available" : {
- "get" : {
- "operationId" : "get-api-database-id-settings-available",
- "summary" : "GET /api/database/{id}/settings-available",
- "description" : "Get all database-local settings and their availability for the given database.",
+ "/api/dashboard/{id}/cards" : {
+ "put" : {
+ "operationId" : "put-api-dashboard-id-cards",
+ "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",
@@ -25444,20 +20282,7 @@
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "settings" : {
- "$ref" : "#/components/schemas/metabase.warehouses-rest.api.available-settings"
- }
- },
- "required" : [ "settings" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -25466,43 +20291,109 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
- }
- },
- "/api/database/{id}/sync_schema" : {
- "post" : {
- "operationId" : "post-api-database-id-sync_schema",
- "summary" : "POST /api/database/{id}/sync_schema",
- "description" : "Trigger a manual update of the schema metadata for this `Database`.",
- "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" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "parameter_mappings" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mappings"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "row" : {
+ "description" : "value must be an integer greater or equal to than zero.",
+ "type" : "integer",
+ "minimum" : 0
+ },
+ "series" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "object"
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "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" : {
+ "oneOf" : [ {
+ "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" ]
+ }
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "cards" ]
+ }
+ }
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{id}/syncable_schemas" : {
+ "/api/dashboard/{id}/items" : {
"get" : {
- "operationId" : "get-api-database-id-syncable_schemas",
- "summary" : "GET /api/database/{id}/syncable_schemas",
- "description" : "Returns a list of all syncable schemas found for the database `id`.",
+ "operationId" : "get-api-dashboard-id-items",
+ "summary" : "GET /api/dashboard/{id}/items",
+ "description" : "Get Dashboard with ID.",
"parameters" : [ {
"in" : "path",
"name" : "id",
@@ -25524,14 +20415,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{id}/usage_info" : {
+ "/api/dashboard/{id}/params/{param-key}/remapping" : {
"get" : {
- "operationId" : "get-api-database-id-usage_info",
- "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.",
+ "operationId" : "get-api-dashboard-id-params-param-key-remapping",
+ "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",
@@ -25541,6 +20432,21 @@
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "path",
+ "name" : "param-key",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }, {
+ "in" : "query",
+ "name" : "value",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
} ],
"responses" : {
"2XX" : {
@@ -25553,55 +20459,40 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{virtual-db}/datasets" : {
+ "/api/dashboard/{id}/params/{param-key}/search/{query}" : {
"get" : {
- "operationId" : "get-api-database-virtual-db-datasets",
- "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"
- },
- "4XX" : {
- "description" : "Client error response"
+ "operationId" : "get-api-dashboard-id-params-param-key-search-query",
+ "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",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
},
- "5XX" : {
- "description" : "Server error response"
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "path",
+ "name" : "param-key",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
}
- },
- "tags" : [ "/api/database" ]
- }
- },
- "/api/database/{virtual-db}/datasets/{schema}" : {
- "get" : {
- "operationId" : "get-api-database-virtual-db-datasets-schema",
- "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"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ }, {
+ "in" : "path",
+ "name" : "query",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
}
- },
- "tags" : [ "/api/database" ]
- }
- },
- "/api/database/{virtual-db}/metadata" : {
- "get" : {
- "operationId" : "get-api-database-virtual-db-metadata",
- "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"
@@ -25613,35 +20504,32 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/database/{virtual-db}/schema/{schema}" : {
+ "/api/dashboard/{id}/params/{param-key}/values" : {
"get" : {
- "operationId" : "get-api-database-virtual-db-schema-schema",
- "summary" : "GET /api/database/{virtual-db}/schema/{schema}",
- "description" : "Returns a list of Tables for the saved questions virtual database.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
+ "operationId" : "get-api-dashboard-id-params-param-key-values",
+ "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
},
- "5XX" : {
- "description" : "Server error response"
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "path",
+ "name" : "param-key",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
}
- },
- "tags" : [ "/api/database" ]
- }
- },
- "/api/database/{virtual-db}/schemas" : {
- "get" : {
- "operationId" : "get-api-database-virtual-db-schemas",
- "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" : {
"description" : "Successful response"
@@ -25653,60 +20541,30 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/database" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/dataset" : {
- "post" : {
- "operationId" : "post-api-dataset",
- "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" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.query-processor.schema.query-result"
- }
- }
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "database" : {
- "oneOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
- }
- }
- }
- }
+ "/api/dashboard/{id}/query_metadata" : {
+ "get" : {
+ "operationId" : "get-api-dashboard-id-query_metadata",
+ "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}$"
+ } ]
}
- },
- "tags" : [ "/api/dataset" ]
- }
- },
- "/api/dataset/native" : {
- "post" : {
- "operationId" : "post-api-dataset-native",
- "summary" : "POST /api/dataset/native",
- "description" : "Fetch a native version of an MBQL query.",
- "parameters" : [ ],
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -25718,40 +20576,24 @@
"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
- },
- "pretty" : {
- "default" : true,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "database", "pretty" ]
- }
- }
- }
- },
- "tags" : [ "/api/dataset" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/dataset/parameter/remapping" : {
- "post" : {
- "operationId" : "post-api-dataset-parameter-remapping",
- "summary" : "POST /api/dataset/parameter/remapping",
- "description" : "Return the remapped parameter values for cards or dashboards that are being edited.",
- "parameters" : [ ],
+ "/api/dashboard/{id}/related" : {
+ "get" : {
+ "operationId" : "get-api-dashboard-id-related",
+ "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."
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -25763,52 +20605,25 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "field_ids" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- }
- }, {
- "type" : "null"
- } ]
- },
- "parameter" : {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter"
- },
- "value" : { }
- },
- "required" : [ "parameter", "value" ]
- }
- }
- }
- },
- "tags" : [ "/api/dataset" ]
+ "tags" : [ "/api/dashboard" ]
}
},
- "/api/dataset/parameter/search/{query}" : {
+ "/api/data-studio/table/discard-values" : {
"post" : {
- "operationId" : "post-api-dataset-parameter-search-query",
- "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" : "query",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
+ "operationId" : "post-api-data-studio-table-discard-values",
+ "summary" : "POST /api/data-studio/table/discard-values",
+ "description" : "Batch version of /table/:id/discard_values. Takes an abstract table selection as /table/edit does.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "null"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -25821,39 +20636,32 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "field_ids" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- }
- }, {
- "type" : "null"
- } ]
- },
- "parameter" : {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter"
- }
- },
- "required" : [ "parameter" ]
+ "$ref" : "#/components/schemas/metabase.data-studio.api.table.table-selectors"
}
}
}
},
- "tags" : [ "/api/dataset" ]
+ "tags" : [ "/api/data-studio/table" ]
}
},
- "/api/dataset/parameter/values" : {
+ "/api/data-studio/table/edit" : {
"post" : {
- "operationId" : "post-api-dataset-parameter-values",
- "summary" : "POST /api/dataset/parameter/values",
- "description" : "Return parameter values for cards or dashboards that are being edited.",
+ "operationId" : "post-api-data-studio-table-edit",
+ "summary" : "POST /api/data-studio/table/edit",
+ "description" : "Bulk updating tables.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : { },
+ "additionalProperties" : false
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -25868,33 +20676,84 @@
"schema" : {
"type" : "object",
"properties" : {
- "field_ids" : {
+ "data_authority" : {
"oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
- }
+ "$ref" : "#/components/schemas/metabase.data-studio.api.table.data-authorities"
}, {
"type" : "null"
} ]
},
- "parameter" : {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter"
+ "data_layer" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.data-studio.api.table.data-layers"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table_ids" : {
+ "type" : "array",
+ "items" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }
+ },
+ "owner_email" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "owner_user_id" : {
+ "oneOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "data_source" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.data-studio.api.table.data-sources"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "schema_ids" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "entity_type" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "database_ids" : {
+ "type" : "array",
+ "items" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }
}
},
- "required" : [ "parameter" ]
+ "additionalProperties" : false
}
}
}
},
- "tags" : [ "/api/dataset" ]
+ "tags" : [ "/api/data-studio/table" ]
}
},
- "/api/dataset/pivot" : {
+ "/api/data-studio/table/rescan-values" : {
"post" : {
- "operationId" : "post-api-dataset-pivot",
- "summary" : "POST /api/dataset/pivot",
- "description" : "Generate a pivoted dataset for an ad-hoc query",
+ "operationId" : "post-api-data-studio-table-rescan-values",
+ "summary" : "POST /api/data-studio/table/rescan-values",
+ "description" : "Batch version of /table/:id/rescan_values. Takes an abstract table selection as /table/edit does.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -25902,7 +20761,7 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase.query-processor.schema.query-result"
+ "type" : "null"
}
}
}
@@ -25918,31 +20777,30 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "database" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }
- },
- "required" : [ "database" ]
+ "$ref" : "#/components/schemas/metabase.data-studio.api.table.table-selectors"
}
}
}
},
- "tags" : [ "/api/dataset" ]
+ "tags" : [ "/api/data-studio/table" ]
}
},
- "/api/dataset/query_metadata" : {
+ "/api/data-studio/table/selection" : {
"post" : {
- "operationId" : "post-api-dataset-query_metadata",
- "summary" : "POST /api/dataset/query_metadata",
- "description" : "Get all of the required query metadata for an ad-hoc query.\n\n You can pass `{:settings {:include-sensitive-fields true}}` in the query to include fields with\n visibility_type :sensitive in the response.",
+ "operationId" : "post-api-data-studio-table-selection",
+ "summary" : "POST /api/data-studio/table/selection",
+ "description" : "Gets information about selected tables",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.data-studio.api.table.bulk-table-selection-info"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -25953,56 +20811,29 @@
},
"requestBody" : {
"content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "database" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "settings" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "include_sensitive_fields" : {
- "type" : "boolean"
- }
- }
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "database" ]
- }
- }
- }
- },
- "tags" : [ "/api/dataset" ]
- }
- },
- "/api/dataset/{export-format}" : {
- "post" : {
- "operationId" : "post-api-dataset-export-format",
- "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" : "export-format",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format"
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.data-studio.api.table.table-selectors"
+ }
+ }
}
- } ],
+ },
+ "tags" : [ "/api/data-studio/table" ]
+ }
+ },
+ "/api/data-studio/table/sync-schema" : {
+ "post" : {
+ "operationId" : "post-api-data-studio-table-sync-schema",
+ "summary" : "POST /api/data-studio/table/sync-schema",
+ "description" : "Batch version of /table/:id/sync_schema. Takes an abstract table selection as /table/edit does.\n - Currently checks policy before returning (so you might receive a 4xx on e.g. AuthZ policy failure)\n - The sync itself is however, asynchronous. This call may return before all tables synced.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase.query-processor.schema.query-result"
+ "type" : "null"
}
}
}
@@ -26018,40 +20849,127 @@
"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" ]
+ "$ref" : "#/components/schemas/metabase.data-studio.api.table.table-selectors"
}
}
}
},
- "tags" : [ "/api/dataset" ]
+ "tags" : [ "/api/data-studio/table" ]
}
},
- "/api/document" : {
+ "/api/database" : {
"get" : {
- "operationId" : "get-api-document",
- "summary" : "GET /api/document",
- "description" : "Gets existing `Documents`.",
- "parameters" : [ ],
+ "operationId" : "get-api-database",
+ "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 * `can-query` will only include DBs for which the current user has query permissions. Default: `false`.\n\n * `can-write-metadata` will only include DBs for which the current user has data model editing permissions\n for at least one table in the database. Default: `false`.\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" : {
+ "oneOf" : [ {
+ "const" : "tables"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : "include must be either empty or the value 'tables'"
+ }, {
+ "in" : "query",
+ "name" : "include_analytics",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "saved",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "include_editable_data_model",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "exclude_uneditable_details",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "include_only_uploadable",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "router_database_id",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "can-query",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "can-write-metadata",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -26063,12 +20981,12 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/document" ]
+ "tags" : [ "/api/database" ]
},
"post" : {
- "operationId" : "post-api-document",
- "summary" : "POST /api/document",
- "description" : "Create a new `Document`.",
+ "operationId" : "post-api-database",
+ "summary" : "POST /api/database",
+ "description" : "Add a new `Database`.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -26087,108 +21005,26 @@
"schema" : {
"type" : "object",
"properties" : {
- "cards" : {
- "oneOf" : [ {
- "type" : "object",
- "additionalProperties" : {
- "type" : "object",
- "properties" : {
- "visualization_settings" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- },
- "entity_id" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "dataset_query" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- },
- "parameter_mappings" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "result_metadata" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }
- }, {
- "type" : "null"
- } ]
- },
- "cache_ttl" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "display" : {
- "type" : "string",
- "minLength" : 1
- },
- "parameters" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "name", "dataset_query", "display", "visualization_settings" ]
- }
+ "provider_name" : {
+ "oneOf" : [ {
+ "type" : "string"
}, {
"type" : "null"
} ]
},
- "collection_id" : {
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "is_on_demand" : {
+ "default" : false,
"oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "type" : "boolean"
}, {
"type" : "null"
} ]
},
- "collection_position" : {
+ "cache_ttl" : {
"oneOf" : [ {
"description" : "value must be an integer greater than zero.",
"type" : "integer",
@@ -26197,81 +21033,163 @@
"type" : "null"
} ]
},
- "document" : { },
- "name" : {
+ "engine" : {
+ "description" : "value must be a valid database engine.",
"type" : "string",
- "minLength" : 1,
- "maxLength" : 254
+ "minLength" : 1
+ },
+ "details" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ },
+ "is_full_sync" : {
+ "default" : true,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "connection_source" : {
+ "default" : "admin",
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "admin", "setup" ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "auto_run_queries" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "schedules" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap"
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "name", "document" ]
+ "required" : [ "name", "engine", "details", "is_full_sync", "is_on_demand", "connection_source" ]
}
}
}
},
- "tags" : [ "/api/document" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/document/public" : {
- "get" : {
- "operationId" : "get-api-document-public",
- "summary" : "GET /api/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.",
+ "/api/database/sample_database" : {
+ "post" : {
+ "operationId" : "post-api-database-sample_database",
+ "summary" : "POST /api/database/sample_database",
+ "description" : "Add the sample database as a new `Database`.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "array",
- "items" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/database" ]
+ }
+ },
+ "/api/database/validate" : {
+ "post" : {
+ "operationId" : "post-api-database-validate",
+ "summary" : "POST /api/database/validate",
+ "description" : "Validate that we can connect to a database given a set of details.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "details" : {
"type" : "object",
"properties" : {
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "name" : {
- "type" : "string"
+ "details" : {
+ "type" : "object",
+ "properties" : { }
},
- "public_uuid" : {
- "description" : "value must be a valid UUID.",
+ "engine" : {
+ "description" : "value must be a valid database engine.",
"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
}
},
- "required" : [ "name", "id", "public_uuid" ]
+ "required" : [ "engine", "details" ]
}
- }
+ },
+ "required" : [ "details" ]
}
}
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
}
},
- "tags" : [ "/api/document" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/document/{document-id}" : {
+ "/api/database/{id}" : {
"get" : {
- "operationId" : "get-api-document-document-id",
- "summary" : "GET /api/document/{document-id}",
- "description" : "Returns an existing Document by ID.",
+ "operationId" : "get-api-database-id",
+ "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" : "document-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" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "tables", "tables.fields" ]
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "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" : {
@@ -26284,15 +21202,15 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/document" ]
+ "tags" : [ "/api/database" ]
},
"put" : {
- "operationId" : "put-api-document-document-id",
- "summary" : "PUT /api/document/{document-id}",
- "description" : "Updates an existing `Document`.",
+ "operationId" : "put-api-database-id",
+ "summary" : "PUT /api/database/{id}",
+ "description" : "Update a `Database`.",
"parameters" : [ {
"in" : "path",
- "name" : "document-id",
+ "name" : "id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -26317,143 +21235,122 @@
"schema" : {
"type" : "object",
"properties" : {
- "archived" : {
+ "points_of_interest" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "provider_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "write_data_details" : {
+ "oneOf" : [ {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "settings" : {
+ "oneOf" : [ {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "cache_ttl" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "engine" : {
+ "oneOf" : [ {
+ "description" : "value must be a valid database engine.",
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "details" : {
+ "oneOf" : [ {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "auto_run_queries" : {
"oneOf" : [ {
"type" : "boolean"
}, {
"type" : "null"
} ]
},
- "cards" : {
+ "caveats" : {
"oneOf" : [ {
- "type" : "object",
- "additionalProperties" : {
- "type" : "object",
- "properties" : {
- "visualization_settings" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- },
- "entity_id" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "dataset_query" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- },
- "parameter_mappings" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "result_metadata" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }
- }, {
- "type" : "null"
- } ]
- },
- "cache_ttl" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "display" : {
- "type" : "string",
- "minLength" : 1
- },
- "parameters" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "name", "dataset_query", "display", "visualization_settings" ]
- }
+ "type" : "string"
}, {
"type" : "null"
} ]
},
- "collection_id" : {
+ "refingerprint" : {
"oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "type" : "boolean"
}, {
"type" : "null"
} ]
},
- "collection_position" : {
+ "schedules" : {
"oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "$ref" : "#/components/schemas/metabase.sync.schedules.ExpandedSchedulesMap"
}, {
"type" : "null"
} ]
},
- "document" : { },
- "name" : {
- "type" : "string",
- "minLength" : 1,
- "maxLength" : 254
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
}
}
}
}
}
},
- "tags" : [ "/api/document" ]
+ "tags" : [ "/api/database" ]
},
"delete" : {
- "operationId" : "delete-api-document-document-id",
- "summary" : "DELETE /api/document/{document-id}",
- "description" : "Permanently deletes an archived Document.",
+ "operationId" : "delete-api-database-id",
+ "summary" : "DELETE /api/database/{id}",
+ "description" : "Delete a `Database`.",
"parameters" : [ {
"in" : "path",
- "name" : "document-id",
+ "name" : "id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -26472,17 +21369,17 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/document" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/document/{document-id}/card/{card-id}/query/{export-format}" : {
- "post" : {
- "operationId" : "post-api-document-document-id-card-card-id-query-export-format",
- "summary" : "POST /api/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)",
+ "/api/database/{id}/autocomplete_suggestions" : {
+ "get" : {
+ "operationId" : "get-api-database-id-autocomplete_suggestions",
+ "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" : "document-id",
+ "name" : "id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -26490,8 +21387,52 @@
},
"description" : "value must be an integer greater than zero."
}, {
+ "in" : "query",
+ "name" : "prefix",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "substring",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/database" ]
+ }
+ },
+ "/api/database/{id}/card_autocomplete_suggestions" : {
+ "get" : {
+ "operationId" : "get-api-database-id-card_autocomplete_suggestions",
+ "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" : "card-id",
+ "name" : "id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -26499,11 +21440,19 @@
},
"description" : "value must be an integer greater than zero."
}, {
- "in" : "path",
- "name" : "export-format",
+ "in" : "query",
+ "name" : "query",
"required" : true,
"schema" : {
- "type" : "string"
+ "type" : "string",
+ "minLength" : 1
+ }
+ }, {
+ "in" : "query",
+ "name" : "include_dashboard_questions",
+ "required" : false,
+ "schema" : {
+ "type" : "boolean"
}
} ],
"responses" : {
@@ -26517,54 +21466,46 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "format_rows" : {
- "default" : false,
- "type" : "boolean"
- },
- "parameters" : {
- "oneOf" : [ {
- "anyOf" : [ {
- "type" : "array",
- "items" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }
- }, {
- "description" : "value must be a valid JSON string.",
- "type" : "string"
- } ]
- }, {
- "type" : "null"
- } ]
- },
- "pivot_results" : {
- "default" : false,
- "type" : "boolean"
- }
- },
- "required" : [ "format_rows", "pivot_results" ]
- }
- }
+ "tags" : [ "/api/database" ]
+ }
+ },
+ "/api/database/{id}/discard_values" : {
+ "post" : {
+ "operationId" : "post-api-database-id-discard_values",
+ "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."
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/document" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/document/{document-id}/public-link" : {
+ "/api/database/{id}/dismiss_spinner" : {
"post" : {
- "operationId" : "post-api-document-document-id-public-link",
- "summary" : "POST /api/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.",
+ "operationId" : "post-api-database-id-dismiss_spinner",
+ "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" : "document-id",
+ "name" : "id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -26574,22 +21515,7 @@
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "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" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -26598,15 +21524,17 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/document" ]
- },
- "delete" : {
- "operationId" : "delete-api-document-document-id-public-link",
- "summary" : "DELETE /api/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.",
+ "tags" : [ "/api/database" ]
+ }
+ },
+ "/api/database/{id}/fields" : {
+ "get" : {
+ "operationId" : "get-api-database-id-fields",
+ "summary" : "GET /api/database/{id}/fields",
+ "description" : "Get a list of all `Fields` in `Database`.",
"parameters" : [ {
"in" : "path",
- "name" : "document-id",
+ "name" : "id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -26625,34 +21553,34 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/document" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/document/{from-document-id}/copy" : {
- "post" : {
- "operationId" : "post-api-document-from-document-id-copy",
- "summary" : "POST /api/document/{from-document-id}/copy",
- "description" : "Copy a Document.",
+ "/api/database/{id}/healthcheck" : {
+ "get" : {
+ "operationId" : "get-api-database-id-healthcheck",
+ "summary" : "GET /api/database/{id}/healthcheck",
+ "description" : "Reports whether the database can currently connect",
"parameters" : [ {
"in" : "path",
- "name" : "from-document-id",
+ "name" : "id",
"required" : true,
"schema" : {
"type" : "integer",
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "query",
+ "name" : "connection-type",
+ "required" : false,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.driver.connection.connection-type"
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.documents.schema.document"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -26661,52 +21589,101 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "collection_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "collection_position" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- }
- }
- }
- }
+ "tags" : [ "/api/database" ]
+ }
+ },
+ "/api/database/{id}/idfields" : {
+ "get" : {
+ "operationId" : "get-api-database-id-idfields",
+ "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."
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/document" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/action-v2/execute" : {
- "post" : {
- "operationId" : "post-api-ee-action-v2-execute",
- "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" : [ ],
+ "/api/database/{id}/metadata" : {
+ "get" : {
+ "operationId" : "get-api-database-id-metadata",
+ "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
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "query",
+ "name" : "include_hidden",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "include_editable_data_model",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "remove_inactive",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "skip_fields",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -26718,44 +21695,54 @@
"description" : "Server error response"
}
},
- "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/database" ]
+ }
+ },
+ "/api/database/{id}/permission/workspace/check" : {
+ "post" : {
+ "operationId" : "post-api-database-id-permission-workspace-check",
+ "summary" : "POST /api/database/{id}/permission/workspace/check",
+ "description" : "Check if database's connection has the required permissions to manage workspaces.\n By default it'll return the cached permission check.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "path",
+ "name" : "cached",
+ "required" : false,
+ "schema" : {
+ "default" : true,
+ "type" : "boolean"
}
- },
- "tags" : [ "/api/ee/action-v2" ]
- }
- },
- "/api/ee/action-v2/execute-bulk" : {
- "post" : {
- "operationId" : "post-api-ee-action-v2-execute-bulk",
- "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"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "checked_at" : {
+ "type" : "string"
+ },
+ "error" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "status", "checked_at" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -26764,45 +21751,24 @@
"description" : "Server error response"
}
},
- "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" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/action-v2/execute-form" : {
+ "/api/database/{id}/rescan_values" : {
"post" : {
- "operationId" : "post-api-ee-action-v2-execute-form",
- "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" : [ ],
+ "operationId" : "post-api-database-id-rescan_values",
+ "summary" : "POST /api/database/{id}/rescan_values",
+ "description" : "Trigger a manual scan of the 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."
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -26814,15 +21780,70 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/action-v2" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/advanced-permissions/application/graph" : {
+ "/api/database/{id}/schema" : {
"get" : {
- "operationId" : "get-api-ee-advanced-permissions-application-graph",
- "summary" : "GET /api/ee/advanced-permissions/application/graph",
- "description" : "Fetch a graph of Application Permissions.",
- "parameters" : [ ],
+ "operationId" : "get-api-database-id-schema",
+ "summary" : "GET /api/database/{id}/schema",
+ "description" : "Return a list of Tables for a Database whose `schema` is `nil` or an empty string.\n\n Optional filters:\n - `can-query=true` - filter to only tables the user can query\n - `can-write-metadata=true` - filter to only tables the user can edit metadata for",
+ "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" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "include_editable_data_model",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "can-query",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "can-write-metadata",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -26834,15 +21855,34 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/advanced-permissions/application" ]
- },
- "put" : {
- "operationId" : "put-api-ee-advanced-permissions-application-graph",
- "summary" : "PUT /api/ee/advanced-permissions/application/graph",
- "description" : "Do a batch update of Application Permissions by passing a modified graph.",
+ "tags" : [ "/api/database" ]
+ }
+ },
+ "/api/database/{id}/schema/{schema}" : {
+ "get" : {
+ "operationId" : "get-api-database-id-schema-schema",
+ "summary" : "GET /api/database/{id}/schema/{schema}",
+ "description" : "Returns a list of Tables for the given Database `id` and `schema`.\n\n Optional filters:\n - `can-query=true` - filter to only tables the user can query\n - `can-write-metadata=true` - filter to only tables the user can edit metadata for",
"parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "path",
+ "name" : "schema",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }, {
"in" : "query",
- "name" : "skip-graph",
+ "name" : "include_hidden",
"required" : true,
"schema" : {
"default" : false,
@@ -26854,7 +21894,7 @@
}
}, {
"in" : "query",
- "name" : "force",
+ "name" : "include_editable_data_model",
"required" : true,
"schema" : {
"default" : false,
@@ -26864,6 +21904,28 @@
"type" : "null"
} ]
}
+ }, {
+ "in" : "query",
+ "name" : "can-query",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "can-write-metadata",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
} ],
"responses" : {
"2XX" : {
@@ -26876,46 +21938,77 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : { }
- }
- }
- }
- },
- "tags" : [ "/api/ee/advanced-permissions/application" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/advanced-permissions/impersonation" : {
+ "/api/database/{id}/schemas" : {
"get" : {
- "operationId" : "get-api-ee-advanced-permissions-impersonation",
- "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.",
+ "operationId" : "get-api-database-id-schemas",
+ "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.\n\n Optional filters:\n - `can-query=true` - filter to only schemas containing tables the user can query\n - `can-write-metadata=true` - filter to only schemas containing tables the user can edit metadata for",
"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_editable_data_model",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "include_hidden",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
"in" : "query",
- "name" : "group_id",
+ "name" : "can-query",
"required" : false,
"schema" : {
"oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "type" : "boolean"
}, {
"type" : "null"
} ]
}
}, {
"in" : "query",
- "name" : "db_id",
+ "name" : "can-write-metadata",
"required" : false,
"schema" : {
"oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "include_workspace",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
}, {
"type" : "null"
} ]
@@ -26923,7 +22016,17 @@
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -26932,14 +22035,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/advanced-permissions/impersonation" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/advanced-permissions/impersonation/{id}" : {
- "delete" : {
- "operationId" : "delete-api-ee-advanced-permissions-impersonation-id",
- "summary" : "DELETE /api/ee/advanced-permissions/impersonation/{id}",
- "description" : "Delete a Connection Impersonation entry.",
+ "/api/database/{id}/settings-available" : {
+ "get" : {
+ "operationId" : "get-api-database-id-settings-available",
+ "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",
@@ -26950,26 +22053,6 @@
},
"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/advanced-permissions/impersonation" ]
- }
- },
- "/api/ee/audit-app/analytics-dev/export" : {
- "post" : {
- "operationId" : "post-api-ee-audit-app-analytics-dev-export",
- "summary" : "POST /api/ee/audit-app/analytics-dev/export",
- "description" : "Export analytics content as a .tar.gz file for local development.\n\n Only available when MB_ANALYTICS_DEV_MODE=true. Returns a tarball containing\n the analytics YAMLs in canonical format, ready to commit to source control.\n\n Requires superuser permissions.",
- "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response",
@@ -26978,9 +22061,11 @@
"schema" : {
"type" : "object",
"properties" : {
- "body" : { }
+ "settings" : {
+ "$ref" : "#/components/schemas/metabase.warehouses-rest.api.available-settings"
+ }
},
- "required" : [ "body" ]
+ "required" : [ "settings" ]
}
}
}
@@ -26992,34 +22077,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/audit-app/analytics-dev" ]
- }
- },
- "/api/ee/audit-app/user/audit-info" : {
- "get" : {
- "operationId" : "get-api-ee-audit-app-user-audit-info",
- "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" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/ee/audit-app/user" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/audit-app/user/{id}/subscriptions" : {
- "delete" : {
- "operationId" : "delete-api-ee-audit-app-user-id-subscriptions",
- "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/database/{id}/sync_schema" : {
+ "post" : {
+ "operationId" : "post-api-database-id-sync_schema",
+ "summary" : "POST /api/database/{id}/sync_schema",
+ "description" : "Trigger a manual update of the schema metadata for this `Database`.",
"parameters" : [ {
"in" : "path",
"name" : "id",
@@ -27041,35 +22106,24 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/audit-app/user" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/billing" : {
+ "/api/database/{id}/syncable_schemas" : {
"get" : {
- "operationId" : "get-api-ee-billing",
- "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"
+ "operationId" : "get-api-database-id-syncable_schemas",
+ "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
},
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/ee/billing" ]
- }
- },
- "/api/ee/cloud-add-ons/addons" : {
- "get" : {
- "operationId" : "get-api-ee-cloud-add-ons-addons",
- "summary" : "GET /api/ee/cloud-add-ons/addons",
- "description" : "Get addons information from the Metabase Store API.",
- "parameters" : [ ],
+ "description" : "value must be an integer greater than zero."
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -27081,42 +22135,23 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/cloud-add-ons" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/cloud-add-ons/plans" : {
+ "/api/database/{id}/usage_info" : {
"get" : {
- "operationId" : "get-api-ee-cloud-add-ons-plans",
- "summary" : "GET /api/ee/cloud-add-ons/plans",
- "description" : "Get plans information from the Metabase Store API.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/ee/cloud-add-ons" ]
- }
- },
- "/api/ee/cloud-add-ons/{product-type}" : {
- "post" : {
- "operationId" : "post-api-ee-cloud-add-ons-product-type",
- "summary" : "POST /api/ee/cloud-add-ons/{product-type}",
- "description" : "Purchase an add-on.",
+ "operationId" : "get-api-database-id-usage_info",
+ "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" : "product-type",
+ "name" : "id",
"required" : true,
"schema" : {
- "type" : "string",
- "enum" : [ "metabase-ai", "metabase-ai-tiered", "python-execution", "transforms", "transforms-basic", "transforms-advanced" ]
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -27129,81 +22164,34 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "quantity" : {
- "oneOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
- },
- "terms_of_service" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }
- }
- }
- }
- },
- "tags" : [ "/api/ee/cloud-add-ons" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/cloud-proxy/{operation-id}" : {
- "post" : {
- "operationId" : "post-api-ee-cloud-proxy-operation-id",
- "summary" : "POST /api/ee/cloud-proxy/{operation-id}",
- "description" : "Proxy a call to the Metabase Store API via harbormaster client.\n This endpoint is used only for hosted instances, and calls Harbormaster Store using a OpenAPI client.\n :operation-id is the operation-id of the Harbormaster Store endpoint.\n All parameters for the operation are taken in the POST body.",
- "parameters" : [ {
- "in" : "path",
- "name" : "operation-id",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
+ "/api/database/{virtual-db}/datasets" : {
+ "get" : {
+ "operationId" : "get-api-database-virtual-db-datasets",
+ "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"
},
"4XX" : {
"description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : { }
- }, {
- "type" : "null"
- } ]
- }
- }
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/ee/cloud-proxy" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/content-translation/csv" : {
+ "/api/database/{virtual-db}/datasets/{schema}" : {
"get" : {
- "operationId" : "get-api-ee-content-translation-csv",
- "summary" : "GET /api/ee/content-translation/csv",
- "description" : "Provides content translation dictionary in CSV",
+ "operationId" : "get-api-database-virtual-db-datasets-schema",
+ "summary" : "GET /api/database/{virtual-db}/datasets/{schema}",
+ "description" : "Returns a list of Tables for the datasets virtual database.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -27216,55 +22204,18 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/content-translation" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/content-translation/dictionary" : {
+ "/api/database/{virtual-db}/metadata" : {
"get" : {
- "operationId" : "get-api-ee-content-translation-dictionary",
- "summary" : "GET /api/ee/content-translation/dictionary",
- "description" : "Fetch the content translation dictionary for authenticated users (auth-based embedding flows).",
- "parameters" : [ {
- "in" : "query",
- "name" : "locale",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- } ],
+ "operationId" : "get-api-database-virtual-db-metadata",
+ "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",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "data" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "locale" : {
- "type" : "string",
- "minLength" : 1
- },
- "msgid" : {
- "type" : "string",
- "minLength" : 1
- },
- "msgstr" : {
- "type" : "string"
- }
- },
- "required" : [ "locale", "msgid", "msgstr" ]
- }
- }
- },
- "required" : [ "data" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -27273,23 +22224,15 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/content-translation" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/content-translation/dictionary/{token}" : {
+ "/api/database/{virtual-db}/schema/{schema}" : {
"get" : {
- "operationId" : "get-api-ee-content-translation-dictionary-token",
- "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",
- "minLength" : 1
- }
- } ],
+ "operationId" : "get-api-database-virtual-db-schema-schema",
+ "summary" : "GET /api/database/{virtual-db}/schema/{schema}",
+ "description" : "Returns a list of Tables for the saved questions virtual database.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -27301,14 +22244,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/content-translation" ]
+ "tags" : [ "/api/database" ]
}
},
- "/api/ee/content-translation/upload-dictionary" : {
- "post" : {
- "operationId" : "post-api-ee-content-translation-upload-dictionary",
- "summary" : "POST /api/ee/content-translation/upload-dictionary",
- "description" : "Upload a CSV of content translations",
+ "/api/database/{virtual-db}/schemas" : {
+ "get" : {
+ "operationId" : "get-api-database-virtual-db-schemas",
+ "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" : {
@@ -27321,36 +22264,14 @@
"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/database" ]
}
},
- "/api/ee/data-studio/table/publish-tables" : {
+ "/api/dataset" : {
"post" : {
- "operationId" : "post-api-ee-data-studio-table-publish-tables",
- "summary" : "POST /api/ee/data-studio/table/publish-tables",
- "description" : "Set collection for each of selected tables and all upstream dependencies recursively.",
+ "operationId" : "post-api-dataset",
+ "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" : {
@@ -27358,7 +22279,7 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.data-studio.api.table.publish-tables-response"
+ "$ref" : "#/components/schemas/metabase.query-processor.schema.query-result"
}
}
}
@@ -27374,30 +22295,32 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.data-studio.api.table.table-selectors"
+ "type" : "object",
+ "properties" : {
+ "database" : {
+ "oneOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
}
}
}
},
- "tags" : [ "/api/ee/data-studio/table" ]
+ "tags" : [ "/api/dataset" ]
}
},
- "/api/ee/data-studio/table/unpublish-tables" : {
+ "/api/dataset/native" : {
"post" : {
- "operationId" : "post-api-ee-data-studio-table-unpublish-tables",
- "summary" : "POST /api/ee/data-studio/table/unpublish-tables",
- "description" : "Unset collection for each of selected tables and all downstream dependents recursively.",
+ "operationId" : "post-api-dataset-native",
+ "summary" : "POST /api/dataset/native",
+ "description" : "Fetch a native version of an MBQL query.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "null"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -27410,29 +22333,36 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.data-studio.api.table.table-selectors"
+ "type" : "object",
+ "properties" : {
+ "database" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "pretty" : {
+ "default" : true,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "database", "pretty" ]
}
}
}
},
- "tags" : [ "/api/ee/data-studio/table" ]
+ "tags" : [ "/api/dataset" ]
}
},
- "/api/ee/database-replication/connection/{database-id}" : {
+ "/api/dataset/parameter/remapping" : {
"post" : {
- "operationId" : "post-api-ee-database-replication-connection-database-id",
- "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."
- } ],
+ "operationId" : "post-api-dataset-parameter-remapping",
+ "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"
@@ -27450,68 +22380,42 @@
"schema" : {
"type" : "object",
"properties" : {
- "replicationSchemaFilters" : {
- "type" : "object",
- "properties" : {
- "schema-filters-patterns" : {
- "type" : "string"
- },
- "schema-filters-type" : {
- "type" : "string",
- "enum" : [ "inclusion", "exclusion", "all" ]
+ "field_ids" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
}
- },
- "required" : [ "schema-filters-type", "schema-filters-patterns" ]
- }
- }
- }
- }
- }
- },
- "tags" : [ "/api/ee/database-replication" ]
- },
- "delete" : {
- "operationId" : "delete-api-ee-database-replication-connection-database-id",
- "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"
- },
- "5XX" : {
- "description" : "Server error response"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "parameter" : {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter"
+ },
+ "value" : { }
+ },
+ "required" : [ "parameter", "value" ]
+ }
+ }
}
},
- "tags" : [ "/api/ee/database-replication" ]
+ "tags" : [ "/api/dataset" ]
}
},
- "/api/ee/database-replication/connection/{database-id}/preview" : {
+ "/api/dataset/parameter/search/{query}" : {
"post" : {
- "operationId" : "post-api-ee-database-replication-connection-database-id-preview",
- "summary" : "POST /api/ee/database-replication/connection/{database-id}/preview",
- "description" : "Return info about pg-replication connection that is about to be created.",
+ "operationId" : "post-api-dataset-parameter-search-query",
+ "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" : "database-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" : {
@@ -27530,40 +22434,34 @@
"schema" : {
"type" : "object",
"properties" : {
- "replicationSchemaFilters" : {
- "type" : "object",
- "properties" : {
- "schema-filters-patterns" : {
- "type" : "string"
- },
- "schema-filters-type" : {
- "type" : "string",
- "enum" : [ "inclusion", "exclusion", "all" ]
+ "field_ids" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
}
- },
- "required" : [ "schema-filters-type", "schema-filters-patterns" ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "parameter" : {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter"
}
- }
+ },
+ "required" : [ "parameter" ]
}
}
}
},
- "tags" : [ "/api/ee/database-replication" ]
+ "tags" : [ "/api/dataset" ]
}
},
- "/api/ee/database-routing/destination-database" : {
+ "/api/dataset/parameter/values" : {
"post" : {
- "operationId" : "post-api-ee-database-routing-destination-database",
- "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"
- }
- } ],
+ "operationId" : "post-api-dataset-parameter-values",
+ "summary" : "POST /api/dataset/parameter/values",
+ "description" : "Return parameter values for cards or dashboards that are being edited.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -27581,56 +22479,44 @@
"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" ]
- }
+ "field_ids" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.field"
+ }
+ }, {
+ "type" : "null"
+ } ]
},
- "router_database_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "parameter" : {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter"
}
},
- "required" : [ "router_database_id", "destinations" ]
+ "required" : [ "parameter" ]
}
}
}
},
- "tags" : [ "/api/ee/database-routing" ]
+ "tags" : [ "/api/dataset" ]
}
},
- "/api/ee/database-routing/router-database/{id}" : {
- "put" : {
- "operationId" : "put-api-ee-database-routing-router-database-id",
- "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/dataset/pivot" : {
+ "post" : {
+ "operationId" : "post-api-dataset-pivot",
+ "summary" : "POST /api/dataset/pivot",
+ "description" : "Generate a pivoted dataset for an ad-hoc query",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.query-processor.schema.query-result"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -27645,38 +22531,29 @@
"schema" : {
"type" : "object",
"properties" : {
- "user_attribute" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
+ "database" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}
- }
+ },
+ "required" : [ "database" ]
}
}
}
},
- "tags" : [ "/api/ee/database-routing" ]
+ "tags" : [ "/api/dataset" ]
}
},
- "/api/ee/dependencies/check-card" : {
+ "/api/dataset/query_metadata" : {
"post" : {
- "operationId" : "post-api-ee-dependencies-check-card",
- "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.",
+ "operationId" : "post-api-dataset-query_metadata",
+ "summary" : "POST /api/dataset/query_metadata",
+ "description" : "Get all of the required query metadata for an ad-hoc query.\n\n You can pass `{:settings {:include-sensitive-fields true}}` in the query to include fields with\n visibility_type :sensitive in the response.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.broken-cards-response"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -27689,27 +22566,54 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.card-body"
+ "type" : "object",
+ "properties" : {
+ "database" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "settings" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "include_sensitive_fields" : {
+ "type" : "boolean"
+ }
+ }
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "database" ]
}
}
}
},
- "tags" : [ "/api/ee/dependencies" ]
+ "tags" : [ "/api/dataset" ]
}
},
- "/api/ee/dependencies/check-snippet" : {
+ "/api/dataset/{export-format}" : {
"post" : {
- "operationId" : "post-api-ee-dependencies-check-snippet",
- "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" : [ ],
+ "operationId" : "post-api-dataset-export-format",
+ "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" : "export-format",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format"
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.broken-cards-response"
+ "$ref" : "#/components/schemas/metabase.query-processor.schema.query-result"
}
}
}
@@ -27727,40 +22631,59 @@
"schema" : {
"type" : "object",
"properties" : {
- "content" : {
- "type" : "string"
+ "format_rows" : {
+ "default" : false,
+ "type" : "boolean"
},
- "id" : {
- "$ref" : "#/components/schemas/metabase.lib.schema.id.snippet"
+ "pivot_results" : {
+ "default" : false,
+ "type" : "boolean"
},
- "name" : {
- "description" : "snippet names cannot include '}' or start with spaces"
+ "query" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "visualization_settings" : {
+ "default" : { },
+ "type" : "object",
+ "properties" : { }
}
},
- "required" : [ "id" ]
+ "required" : [ "query", "visualization_settings", "format_rows", "pivot_results" ]
}
}
}
},
- "tags" : [ "/api/ee/dependencies" ]
+ "tags" : [ "/api/dataset" ]
}
},
- "/api/ee/dependencies/check-transform" : {
+ "/api/document" : {
+ "get" : {
+ "operationId" : "get-api-document",
+ "summary" : "GET /api/document",
+ "description" : "Gets existing `Documents`.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/document" ]
+ },
"post" : {
- "operationId" : "post-api-ee-dependencies-check-transform",
- "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.",
+ "operationId" : "post-api-document",
+ "summary" : "POST /api/document",
+ "description" : "Create a new `Document`.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.broken-cards-response"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -27773,166 +22696,165 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.transform-body"
- }
- }
- }
- },
- "tags" : [ "/api/ee/dependencies" ]
- }
- },
- "/api/ee/dependencies/graph" : {
- "get" : {
- "operationId" : "get-api-ee-dependencies-graph",
- "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.\n\n Optional :archived parameter controls whether entities in archived collections are included:\n - false (default): Excludes entities in archived collections\n - true: Includes entities in archived collections",
- "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" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
- }
- }, {
- "in" : "query",
- "name" : "archived",
- "required" : false,
- "schema" : {
- "type" : "boolean"
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.graph-response"
- }
+ "type" : "object",
+ "properties" : {
+ "cards" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : {
+ "visualization_settings" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ },
+ "entity_id" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "dataset_query" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ },
+ "parameter_mappings" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "result_metadata" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "cache_ttl" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "parameters" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "name", "dataset_query", "display", "visualization_settings" ]
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_position" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "document" : { },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1,
+ "maxLength" : 254
+ }
+ },
+ "required" : [ "name", "document" ]
}
}
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
}
},
- "tags" : [ "/api/ee/dependencies" ]
+ "tags" : [ "/api/document" ]
}
},
- "/api/ee/dependencies/graph/breaking" : {
- "get" : {
- "operationId" : "get-api-ee-dependencies-graph-breaking",
- "summary" : "GET /api/ee/dependencies/graph/breaking",
- "description" : "Returns a list of entities that are breaking other entities (sources of errors).\n These are tables or cards that other entities depend on, where those dependents\n have validation errors traced back to this source entity.\n\n Accepts optional parameters for filtering:\n - `types`: List of source entity types - only `:card` or `:table` (default: both)\n - `card-types`: List of card types to include when filtering cards (e.g., `[:question :model :metric]`)\n - `query`: Search string to filter by name or location\n - `archived`: Controls whether archived entities are included\n - `include-personal-collections`: Controls whether items in personal collections are included (default: false)\n - `sort-column`: Sort column - `:name`, `:location`, `:dependents-errors`, or `:dependents-with-errors` (default: `:name`)\n - `sort-direction`: Sort direction - `:asc` or `:desc` (default: `:asc`)\n - `offset`: Default 0\n - `limit`: Default 50\n\n Returns a map with:\n - `data`: List of breaking source entities\n - `total`: Total count of matched items\n - `offset`: Applied offset\n - `limit`: Applied limit",
- "parameters" : [ {
- "in" : "query",
- "name" : "types",
- "required" : false,
- "schema" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
- }, {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
- }
- } ]
- }
- }, {
- "in" : "query",
- "name" : "card-types",
- "required" : false,
- "schema" : {
- "anyOf" : [ {
- "type" : "string",
- "enum" : [ "question", "metric", "model" ]
- }, {
- "type" : "array",
- "items" : {
- "type" : "string",
- "enum" : [ "question", "metric", "model" ]
- }
- } ]
- }
- }, {
- "in" : "query",
- "name" : "query",
- "required" : false,
- "schema" : {
- "type" : "string"
- }
- }, {
- "in" : "query",
- "name" : "archived",
- "required" : false,
- "schema" : {
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "include-personal-collections",
- "required" : false,
- "schema" : {
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "sort-column",
- "required" : false,
- "schema" : {
- "type" : "string",
- "enum" : [ "dependents-with-errors", "dependents-errors", "name", "location" ]
- }
- }, {
- "in" : "query",
- "name" : "sort-direction",
- "required" : false,
- "schema" : {
- "type" : "string",
- "enum" : [ "desc", "asc" ]
- }
- } ],
+ "/api/document/public" : {
+ "get" : {
+ "operationId" : "get-api-document-public",
+ "summary" : "GET /api/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",
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "data" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.entity"
+ "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}"
}
},
- "limit" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "offset" : {
- "type" : "integer",
- "minimum" : 0
- },
- "total" : {
- "type" : "integer",
- "minimum" : 0
- }
- },
- "required" : [ "data", "total", "offset", "limit" ]
+ "required" : [ "name", "id", "public_uuid" ]
+ }
}
}
}
@@ -27944,97 +22866,215 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/dependencies" ]
+ "tags" : [ "/api/document" ]
}
},
- "/api/ee/dependencies/graph/broken" : {
+ "/api/document/{document-id}" : {
"get" : {
- "operationId" : "get-api-ee-dependencies-graph-broken",
- "summary" : "GET /api/ee/dependencies/graph/broken",
- "description" : "Returns the broken dependents for a specific source entity.\n These are entities that have validation errors traced back to the specified source.\n\n Required parameters:\n - `id`: The ID of the source entity\n - `type`: The type of the source entity (card, table)\n\n Optional parameters:\n - `dependent-types`: Dependency types to filter by. Can be single value or array.\n - `dependent-card-types`: Card types to filter by when dependent-types includes :card.\n - `include-personal-collections`: Include items in personal collections (default: false)\n - `sort-column`: Column to sort by - name, location, or view-count (default: name)\n - `sort-direction`: Sort direction - asc or desc (default: asc)",
+ "operationId" : "get-api-document-document-id",
+ "summary" : "GET /api/document/{document-id}",
+ "description" : "Returns an existing Document by ID.",
"parameters" : [ {
- "in" : "query",
- "name" : "id",
+ "in" : "path",
+ "name" : "document-id",
"required" : true,
"schema" : {
"type" : "integer",
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
- }, {
- "in" : "query",
- "name" : "type",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
- }, {
- "in" : "query",
- "name" : "dependent-types",
- "required" : false,
+ },
+ "tags" : [ "/api/document" ]
+ },
+ "put" : {
+ "operationId" : "put-api-document-document-id",
+ "summary" : "PUT /api/document/{document-id}",
+ "description" : "Updates an existing `Document`.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "document-id",
+ "required" : true,
"schema" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
- }, {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
- }
- } ]
+ "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" : "dependent-card-types",
- "required" : false,
- "schema" : {
- "anyOf" : [ {
- "type" : "string",
- "enum" : [ "question", "metric", "model" ]
- }, {
- "type" : "array",
- "items" : {
- "type" : "string",
- "enum" : [ "question", "metric", "model" ]
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "archived" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "cards" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : {
+ "visualization_settings" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ },
+ "entity_id" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "dataset_query" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ },
+ "parameter_mappings" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "result_metadata" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "cache_ttl" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "parameters" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "name", "dataset_query", "display", "visualization_settings" ]
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_position" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "document" : { },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1,
+ "maxLength" : 254
+ }
+ }
}
- } ]
- }
- }, {
- "in" : "query",
- "name" : "include-personal-collections",
- "required" : false,
- "schema" : {
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "sort-column",
- "required" : false,
- "schema" : {
- "type" : "string",
- "enum" : [ "name", "view-count", "location" ]
+ }
}
- }, {
- "in" : "query",
- "name" : "sort-direction",
- "required" : false,
+ },
+ "tags" : [ "/api/document" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-document-document-id",
+ "summary" : "DELETE /api/document/{document-id}",
+ "description" : "Permanently deletes an archived Document.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "document-id",
+ "required" : true,
"schema" : {
- "type" : "string",
- "enum" : [ "desc", "asc" ]
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.broken-dependent-entity"
- }
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -28043,17 +23083,17 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/dependencies" ]
+ "tags" : [ "/api/document" ]
}
},
- "/api/ee/dependencies/graph/dependents" : {
- "get" : {
- "operationId" : "get-api-ee-dependencies-graph-dependents",
- "summary" : "GET /api/ee/dependencies/graph/dependents",
- "description" : "Returns a list of dependents for the specified entity.\n\n Required parameters:\n - `id`: The ID of the entity\n - `type`: The type of the entity (card, table, dashboard, etc.)\n\n Optional parameters:\n - `dependent-types`: Dependency types to filter by. Can be single value or array.\n If not provided, returns all types. Example: ?dependent-types=card&dependent-types=dashboard\n - `dependent-card-types`: Card types to filter by when dependent-types includes :card.\n Ignored if dependent-types doesn't include :card. Example: ?dependent-card-types=question&dependent-card-types=model\n - `archived`: Include entities in archived collections (default: false)\n - `broken`: Return only broken entities (default: false)\n - `query`: Search string to filter results by name or location (case-insensitive)\n - `include-personal-collections`: Include items in personal collections (default: false)\n - `sort-column`: Column to sort by - name, location, or view-count (default: name)\n - `sort-direction`: Sort direction - asc or desc (default: asc)",
+ "/api/document/{document-id}/card/{card-id}/query/{export-format}" : {
+ "post" : {
+ "operationId" : "post-api-document-document-id-card-card-id-query-export-format",
+ "summary" : "POST /api/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" : "query",
- "name" : "id",
+ "in" : "path",
+ "name" : "document-id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -28061,100 +23101,25 @@
},
"description" : "value must be an integer greater than zero."
}, {
- "in" : "query",
- "name" : "type",
+ "in" : "path",
+ "name" : "card-id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
- }
- }, {
- "in" : "query",
- "name" : "dependent-types",
- "required" : false,
- "schema" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
- }, {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
- }
- } ]
- }
- }, {
- "in" : "query",
- "name" : "dependent-card-types",
- "required" : false,
- "schema" : {
- "anyOf" : [ {
- "type" : "string",
- "enum" : [ "question", "metric", "model" ]
- }, {
- "type" : "array",
- "items" : {
- "type" : "string",
- "enum" : [ "question", "metric", "model" ]
- }
- } ]
- }
- }, {
- "in" : "query",
- "name" : "archived",
- "required" : false,
- "schema" : {
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "broken",
- "required" : false,
- "schema" : {
- "type" : "boolean"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
}, {
- "in" : "query",
- "name" : "query",
- "required" : false,
+ "in" : "path",
+ "name" : "export-format",
+ "required" : true,
"schema" : {
"type" : "string"
}
- }, {
- "in" : "query",
- "name" : "include-personal-collections",
- "required" : false,
- "schema" : {
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "sort-column",
- "required" : false,
- "schema" : {
- "type" : "string",
- "enum" : [ "name", "view-count", "location" ]
- }
- }, {
- "in" : "query",
- "name" : "sort-direction",
- "required" : false,
- "schema" : {
- "type" : "string",
- "enum" : [ "desc", "asc" ]
- }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.entity"
- }
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -28163,81 +23128,60 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/dependencies" ]
- }
- },
- "/api/ee/dependencies/graph/unreferenced" : {
- "get" : {
- "operationId" : "get-api-ee-dependencies-graph-unreferenced",
- "summary" : "GET /api/ee/dependencies/graph/unreferenced",
- "description" : "Returns a list of all unreferenced items in the instance.\n An unreferenced item is one that is not a dependency of any other item.\n\n Accepts optional parameters for filtering:\n - `types`: List of entity types to include (e.g., [:card :transform :snippet :dashboard])\n - `card-types`: List of card types to include when filtering cards (e.g., [:question :model :metric])\n - `query`: Search string to filter by name or location\n - `archived`: Controls whether archived entities are included\n - `include-personal-collections`: Controls whether items in personal collections are included (default: false)\n - `sort-column`: Sort column - `:name`, `:location`, `:dependents-errors`, or `:dependents-with-errors` (default: `:name`)\n - `sort-direction`: Sort direction - `:asc` or `:desc` (default: `:asc`)\n - `offset`: Default 0\n - `limit`: Default 50\n\n Returns a map with:\n - `data`: List of unreferenced items, each with `:id`, `:type`, and `:data` fields\n - `total`: Total count of matched items\n - `offset`: Applied offset\n - `limit`: Applied limit",
- "parameters" : [ {
- "in" : "query",
- "name" : "types",
- "required" : false,
- "schema" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
- }, {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
- }
- } ]
- }
- }, {
- "in" : "query",
- "name" : "card-types",
- "required" : false,
- "schema" : {
- "anyOf" : [ {
- "type" : "string",
- "enum" : [ "question", "metric", "model" ]
- }, {
- "type" : "array",
- "items" : {
- "type" : "string",
- "enum" : [ "question", "metric", "model" ]
- }
- } ]
- }
- }, {
- "in" : "query",
- "name" : "query",
- "required" : false,
- "schema" : {
- "type" : "string"
- }
- }, {
- "in" : "query",
- "name" : "archived",
- "required" : false,
- "schema" : {
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "include-personal-collections",
- "required" : false,
- "schema" : {
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "sort-column",
- "required" : false,
- "schema" : {
- "type" : "string",
- "enum" : [ "dependents-with-errors", "dependents-errors", "name", "location" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "format_rows" : {
+ "default" : false,
+ "type" : "boolean"
+ },
+ "parameters" : {
+ "oneOf" : [ {
+ "anyOf" : [ {
+ "type" : "array",
+ "items" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }
+ }, {
+ "description" : "value must be a valid JSON string.",
+ "type" : "string"
+ } ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "pivot_results" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ },
+ "required" : [ "format_rows", "pivot_results" ]
+ }
+ }
}
- }, {
- "in" : "query",
- "name" : "sort-direction",
- "required" : false,
+ },
+ "tags" : [ "/api/document" ]
+ }
+ },
+ "/api/document/{document-id}/public-link" : {
+ "post" : {
+ "operationId" : "post-api-document-document-id-public-link",
+ "summary" : "POST /api/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" : "string",
- "enum" : [ "desc", "asc" ]
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -28247,27 +23191,13 @@
"schema" : {
"type" : "object",
"properties" : {
- "data" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.entity"
- }
- },
- "limit" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "offset" : {
- "type" : "integer",
- "minimum" : 0
- },
- "total" : {
- "type" : "integer",
- "minimum" : 0
+ "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" : [ "data", "total", "offset", "limit" ]
+ "required" : [ "uuid" ]
}
}
}
@@ -28279,18 +23209,61 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/dependencies" ]
+ "tags" : [ "/api/document" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-document-document-id-public-link",
+ "summary" : "DELETE /api/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" : "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/document" ]
}
},
- "/api/ee/email/override" : {
- "put" : {
- "operationId" : "put-api-ee-email-override",
- "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" : [ ],
+ "/api/document/{from-document-id}/copy" : {
+ "post" : {
+ "operationId" : "post-api-document-from-document-id-copy",
+ "summary" : "POST /api/document/{from-document-id}/copy",
+ "description" : "Copy a Document.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "from-document-id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.documents.schema.document"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -28305,37 +23278,28 @@
"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"
+ "collection_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}, {
"type" : "null"
} ]
},
- "email-smtp-security-override" : {
- "anyOf" : [ {
- "type" : "string"
+ "collection_position" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}, {
"type" : "null"
} ]
},
- "email-smtp-username-override" : {
- "anyOf" : [ {
- "type" : "string"
+ "name" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
@@ -28345,12 +23309,14 @@
}
}
},
- "tags" : [ "/api/ee/email" ]
- },
- "delete" : {
- "operationId" : "delete-api-ee-email-override",
- "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/document" ]
+ }
+ },
+ "/api/ee/action-v2/execute" : {
+ "post" : {
+ "operationId" : "post-api-ee-action-v2-execute",
+ "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" : {
@@ -28363,110 +23329,44 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/email" ]
- }
- },
- "/api/ee/embedding-hub/checklist" : {
- "get" : {
- "operationId" : "get-api-ee-embedding-hub-checklist",
- "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",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "checklist" : {
- "type" : "object",
- "properties" : {
- "enable-tenants" : {
- "type" : "boolean"
- },
- "create-models" : {
- "type" : "boolean"
- },
- "sso-configured" : {
- "type" : "boolean"
- },
- "configure-row-column-security" : {
- "type" : "boolean"
- },
- "create-test-embed" : {
- "type" : "boolean"
- },
- "data-permissions-and-enable-tenants" : {
- "type" : "boolean"
- },
- "embed-production" : {
- "type" : "boolean"
- },
- "create-dashboard" : {
- "type" : "boolean"
- },
- "move-dashboard-to-shared" : {
- "type" : "boolean"
- },
- "setup-data-segregation-strategy" : {
- "type" : "boolean"
- },
- "create-tenants" : {
- "type" : "boolean"
- },
- "add-data" : {
- "type" : "boolean"
- },
- "sso-auth-manual-tested" : {
- "type" : "boolean"
- }
- },
- "required" : [ "add-data", "create-dashboard", "create-models", "configure-row-column-security", "create-test-embed", "embed-production", "sso-configured", "data-permissions-and-enable-tenants", "enable-tenants", "move-dashboard-to-shared", "create-tenants", "setup-data-segregation-strategy", "sso-auth-manual-tested" ],
- "additionalProperties" : false
- },
- "data-isolation-strategy" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "row-column-level-security", "connection-impersonation", "database-routing" ]
- }, {
- "type" : "null"
- } ]
- }
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "action" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.action-v2.api.api-action-id-or-expression"
},
- "required" : [ "checklist", "data-isolation-strategy" ],
- "additionalProperties" : false
- }
+ "input" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "params" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "scope" : {
+ "$ref" : "#/components/schemas/metabase.actions.types..scope.raw"
+ }
+ },
+ "required" : [ "action", "scope" ]
}
}
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
}
},
- "tags" : [ "/api/ee/embedding-hub" ]
+ "tags" : [ "/api/ee/action-v2" ]
}
},
- "/api/ee/gsheets/connection" : {
+ "/api/ee/action-v2/execute-bulk" : {
"post" : {
- "operationId" : "post-api-ee-gsheets-connection",
- "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.",
+ "operationId" : "post-api-ee-action-v2-execute-bulk",
+ "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",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/gsheets.response"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -28481,33 +23381,42 @@
"schema" : {
"type" : "object",
"properties" : {
- "url" : {
- "type" : "string",
- "minLength" : 1
+ "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" : [ "url" ]
+ "required" : [ "action", "scope", "inputs" ]
}
}
}
},
- "tags" : [ "/api/ee/gsheets" ]
- },
- "get" : {
- "operationId" : "get-api-ee-gsheets-connection",
- "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/action-v2" ]
+ }
+ },
+ "/api/ee/action-v2/execute-form" : {
+ "post" : {
+ "operationId" : "post-api-ee-action-v2-execute-form",
+ "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",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/gsheets.response"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -28516,12 +23425,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/gsheets" ]
- },
- "delete" : {
- "operationId" : "delete-api-ee-gsheets-connection",
- "summary" : "DELETE /api/ee/gsheets/connection",
- "description" : "Disconnect the google service account. There is only one (or zero) at the time of writing.",
+ "tags" : [ "/api/ee/action-v2" ]
+ }
+ },
+ "/api/ee/advanced-permissions/application/graph" : {
+ "get" : {
+ "operationId" : "get-api-ee-advanced-permissions-application-graph",
+ "summary" : "GET /api/ee/advanced-permissions/application/graph",
+ "description" : "Fetch a graph of Application Permissions.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -28534,15 +23445,37 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/gsheets" ]
- }
- },
- "/api/ee/gsheets/connection/sync" : {
- "post" : {
- "operationId" : "post-api-ee-gsheets-connection-sync",
- "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" : [ ],
+ "tags" : [ "/api/ee/advanced-permissions/application" ]
+ },
+ "put" : {
+ "operationId" : "put-api-ee-advanced-permissions-application-graph",
+ "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" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "force",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -28554,35 +23487,54 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/gsheets" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : { }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/advanced-permissions/application" ]
}
},
- "/api/ee/gsheets/service-account" : {
+ "/api/ee/advanced-permissions/impersonation" : {
"get" : {
- "operationId" : "get-api-ee-gsheets-service-account",
- "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" : [ ],
+ "operationId" : "get-api-ee-advanced-permissions-impersonation",
+ "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" : "query",
+ "name" : "group_id",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "db_id",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "email" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "email" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -28591,15 +23543,24 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/gsheets" ]
+ "tags" : [ "/api/ee/advanced-permissions/impersonation" ]
}
},
- "/api/ee/library" : {
- "post" : {
- "operationId" : "post-api-ee-library",
- "summary" : "POST /api/ee/library",
- "description" : "Creates the Library if it doesn't exist. Returns the created collection.\n\n Requires data analyst or superuser permissions.",
- "parameters" : [ ],
+ "/api/ee/advanced-permissions/impersonation/{id}" : {
+ "delete" : {
+ "operationId" : "delete-api-ee-advanced-permissions-impersonation-id",
+ "summary" : "DELETE /api/ee/advanced-permissions/impersonation/{id}",
+ "description" : "Delete a Connection Impersonation entry.",
+ "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"
@@ -28611,12 +23572,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/library" ]
- },
- "get" : {
- "operationId" : "get-api-ee-library",
- "summary" : "GET /api/ee/library",
- "description" : "Get the Library. If no library exists, it doesn't fail but returns an empty response",
+ "tags" : [ "/api/ee/advanced-permissions/impersonation" ]
+ }
+ },
+ "/api/ee/audit-app/analytics-dev/export" : {
+ "post" : {
+ "operationId" : "post-api-ee-audit-app-analytics-dev-export",
+ "summary" : "POST /api/ee/audit-app/analytics-dev/export",
+ "description" : "Export analytics content as a .tar.gz file for local development.\n\n Only available when MB_ANALYTICS_DEV_MODE=true. Returns a tarball containing\n the analytics YAMLs in canonical format, ready to commit to source control.\n\n Requires superuser permissions.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -28624,17 +23587,11 @@
"content" : {
"application/json" : {
"schema" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase.collections.schema.CollectionItem"
- }, {
- "type" : "object",
- "properties" : {
- "data" : {
- "type" : "null"
- }
- },
- "required" : [ "data" ]
- } ]
+ "type" : "object",
+ "properties" : {
+ "body" : { }
+ },
+ "required" : [ "body" ]
}
}
}
@@ -28646,14 +23603,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/library" ]
+ "tags" : [ "/api/ee/audit-app/analytics-dev" ]
}
},
- "/api/ee/library/tree" : {
- "get" : {
- "operationId" : "get-api-ee-library-tree",
- "summary" : "GET /api/ee/library/tree",
- "description" : "This matches /api/collection/tree but only returns the library collection.",
+ "/api/ee/audit-app/user/audit-info" : {
+ "get" : {
+ "operationId" : "get-api-ee-audit-app-user-audit-info",
+ "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" : {
@@ -28666,23 +23623,23 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/library" ]
+ "tags" : [ "/api/ee/audit-app/user" ]
}
},
- "/api/ee/logs/query_execution/{yyyy-mm}" : {
- "get" : {
- "operationId" : "get-api-ee-logs-query_execution-yyyy-mm",
- "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.",
+ "/api/ee/audit-app/user/{id}/subscriptions" : {
+ "delete" : {
+ "operationId" : "delete-api-ee-audit-app-user-id-subscriptions",
+ "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" : "yyyy-mm",
+ "name" : "id",
"required" : true,
"schema" : {
- "type" : "string",
- "pattern" : "\\d{4}-\\d{2}"
+ "type" : "integer",
+ "minimum" : 1
},
- "description" : "Must be a string like 2020-04 or 2222-11."
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -28695,48 +23652,18 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/logs" ]
+ "tags" : [ "/api/ee/audit-app/user" ]
}
},
- "/api/ee/permission_debug" : {
+ "/api/ee/billing" : {
"get" : {
- "operationId" : "get-api-ee-permission_debug",
- "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" ]
- }
- } ],
+ "operationId" : "get-api-ee-billing",
+ "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",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.permission-debug.impl.perm-debug-info"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -28745,34 +23672,18 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/permission_debug" ]
+ "tags" : [ "/api/ee/billing" ]
}
},
- "/api/ee/remote-sync/branches" : {
+ "/api/ee/cloud-add-ons/addons" : {
"get" : {
- "operationId" : "get-api-ee-remote-sync-branches",
- "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.",
+ "operationId" : "get-api-ee-cloud-add-ons-addons",
+ "summary" : "GET /api/ee/cloud-add-ons/addons",
+ "description" : "Get addons information from the Metabase Store API.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "items" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }
- },
- "required" : [ "items" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -28781,34 +23692,18 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/remote-sync" ]
+ "tags" : [ "/api/ee/cloud-add-ons" ]
}
},
- "/api/ee/remote-sync/create-branch" : {
- "post" : {
- "operationId" : "post-api-ee-remote-sync-create-branch",
- "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.",
+ "/api/ee/cloud-add-ons/plans" : {
+ "get" : {
+ "operationId" : "get-api-ee-cloud-add-ons-plans",
+ "summary" : "GET /api/ee/cloud-add-ons/plans",
+ "description" : "Get plans information from the Metabase Store API.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "message" : {
- "type" : "string"
- },
- "status" : {
- "type" : "string"
- }
- },
- "required" : [ "status", "message" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -28817,119 +23712,79 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "name" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "name" ]
- }
- }
- }
- },
- "tags" : [ "/api/ee/remote-sync" ]
+ "tags" : [ "/api/ee/cloud-add-ons" ]
}
},
- "/api/ee/remote-sync/current-task" : {
- "get" : {
- "operationId" : "get-api-ee-remote-sync-current-task",
- "summary" : "GET /api/ee/remote-sync/current-task",
- "description" : "Get the current sync task",
- "parameters" : [ ],
+ "/api/ee/cloud-add-ons/{product-type}" : {
+ "post" : {
+ "operationId" : "post-api-ee-cloud-add-ons-product-type",
+ "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", "metabase-ai-tiered", "python-execution", "transforms", "transforms-basic", "transforms-advanced" ]
+ }
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "progress" : {
- "oneOf" : [ {
- "type" : "number",
- "minimum" : 0.0,
- "maximum" : 1.0
- }, {
- "type" : "null"
- } ]
- },
- "conflicts" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }, {
- "type" : "null"
- } ]
- },
- "last_progress_report_at" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer",
- "minimum" : 1
- },
- "started_at" : { },
- "ended_at" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- },
- "initiated_by" : {
- "oneOf" : [ {
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "cancelled" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "status" : {
- "type" : "string",
- "enum" : [ "running", "successful", "errored", "cancelled", "timed-out", "conflict" ]
- },
- "error_message" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "sync_task_type" : {
- "type" : "string",
- "enum" : [ "import", "export" ]
- },
- "version" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "id", "sync_task_type", "progress", "started_at", "status" ]
- }, {
- "type" : "null"
- } ]
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "quantity" : {
+ "oneOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "terms_of_service" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
}
}
}
+ }
+ },
+ "tags" : [ "/api/ee/cloud-add-ons" ]
+ }
+ },
+ "/api/ee/cloud-proxy/{operation-id}" : {
+ "post" : {
+ "operationId" : "post-api-ee-cloud-proxy-operation-id",
+ "summary" : "POST /api/ee/cloud-proxy/{operation-id}",
+ "description" : "Proxy a call to the Metabase Store API via harbormaster client.\n This endpoint is used only for hosted instances, and calls Harbormaster Store using a OpenAPI client.\n :operation-id is the operation-id of the Harbormaster Store endpoint.\n All parameters for the operation are taken in the POST body.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "operation-id",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -28938,99 +23793,32 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/remote-sync" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/cloud-proxy" ]
}
},
- "/api/ee/remote-sync/current-task/cancel" : {
- "post" : {
- "operationId" : "post-api-ee-remote-sync-current-task-cancel",
- "summary" : "POST /api/ee/remote-sync/current-task/cancel",
- "description" : "Cancels the current task if one is running",
+ "/api/ee/content-translation/csv" : {
+ "get" : {
+ "operationId" : "get-api-ee-content-translation-csv",
+ "summary" : "GET /api/ee/content-translation/csv",
+ "description" : "Provides content translation dictionary in CSV",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "progress" : {
- "oneOf" : [ {
- "type" : "number",
- "minimum" : 0.0,
- "maximum" : 1.0
- }, {
- "type" : "null"
- } ]
- },
- "conflicts" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }, {
- "type" : "null"
- } ]
- },
- "last_progress_report_at" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer",
- "minimum" : 1
- },
- "started_at" : { },
- "ended_at" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- },
- "initiated_by" : {
- "oneOf" : [ {
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "cancelled" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "status" : {
- "type" : "string",
- "enum" : [ "running", "successful", "errored", "cancelled", "timed-out", "conflict" ]
- },
- "error_message" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "sync_task_type" : {
- "type" : "string",
- "enum" : [ "import", "export" ]
- },
- "version" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "id", "sync_task_type", "progress", "started_at", "status" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -29039,15 +23827,22 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/remote-sync" ]
+ "tags" : [ "/api/ee/content-translation" ]
}
},
- "/api/ee/remote-sync/dirty" : {
+ "/api/ee/content-translation/dictionary" : {
"get" : {
- "operationId" : "get-api-ee-remote-sync-dirty",
- "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" : [ ],
+ "operationId" : "get-api-ee-content-translation-dictionary",
+ "summary" : "GET /api/ee/content-translation/dictionary",
+ "description" : "Fetch the content translation dictionary for authenticated users (auth-based embedding flows).",
+ "parameters" : [ {
+ "in" : "query",
+ "name" : "locale",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response",
@@ -29056,90 +23851,28 @@
"schema" : {
"type" : "object",
"properties" : {
- "dirty" : {
+ "data" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
- "table_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "model" : {
- "type" : "string"
- },
- "authority_level" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer"
- },
- "name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "updated_at" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- },
- "table_id" : {
- "oneOf" : [ {
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "query_type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "collection_id" : {
- "oneOf" : [ {
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
+ "locale" : {
+ "type" : "string",
+ "minLength" : 1
},
- "created_at" : { },
- "display" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "msgid" : {
+ "type" : "string",
+ "minLength" : 1
},
- "sync_status" : {
+ "msgstr" : {
"type" : "string"
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
}
},
- "required" : [ "id", "name", "model", "sync_status" ]
+ "required" : [ "locale", "msgid", "msgstr" ]
}
}
},
- "required" : [ "dirty" ]
+ "required" : [ "data" ]
}
}
}
@@ -29151,35 +23884,46 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/remote-sync" ]
+ "tags" : [ "/api/ee/content-translation" ]
+ }
+ },
+ "/api/ee/content-translation/dictionary/{token}" : {
+ "get" : {
+ "operationId" : "get-api-ee-content-translation-dictionary-token",
+ "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",
+ "minLength" : 1
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/content-translation" ]
}
},
- "/api/ee/remote-sync/export" : {
+ "/api/ee/content-translation/upload-dictionary" : {
"post" : {
- "operationId" : "post-api-ee-remote-sync-export",
- "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.",
+ "operationId" : "post-api-ee-content-translation-upload-dictionary",
+ "summary" : "POST /api/ee/content-translation/upload-dictionary",
+ "description" : "Upload a CSV of content translations",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "message" : {
- "type" : "string"
- },
- "task_id" : {
- "type" : "integer",
- "minimum" : 1
- }
- },
- "required" : [ "message", "task_id" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -29188,52 +23932,44 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/remote-sync" ]
+ "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" ]
}
},
- "/api/ee/remote-sync/has-remote-changes" : {
- "get" : {
- "operationId" : "get-api-ee-remote-sync-has-remote-changes",
- "summary" : "GET /api/ee/remote-sync/has-remote-changes",
- "description" : "Check if there are new changes on the remote branch that can be pulled.\n Uses in-memory caching (configurable TTL via remote-sync-check-changes-cache-ttl-seconds setting).\n\n Returns:\n - has_changes: true if remote version differs from last imported version, or if never imported\n - remote_version: current Git SHA on remote branch\n - local_version: Git SHA of last successful import (nil if never imported)\n - cached: true if result was served from cache",
- "parameters" : [ {
- "in" : "query",
- "name" : "force-refresh",
- "required" : false,
- "schema" : {
- "type" : "boolean"
- }
- } ],
+ "/api/ee/data-studio/table/publish-tables" : {
+ "post" : {
+ "operationId" : "post-api-ee-data-studio-table-publish-tables",
+ "summary" : "POST /api/ee/data-studio/table/publish-tables",
+ "description" : "Set collection for each of selected tables and all upstream dependencies recursively.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "cached" : {
- "type" : "boolean"
- },
- "has_changes" : {
- "type" : "boolean"
- },
- "local_version" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "remote_version" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "has_changes", "remote_version", "local_version", "cached" ]
+ "$ref" : "#/components/schemas/metabase-enterprise.data-studio.api.table.publish-tables-response"
}
}
}
@@ -29245,14 +23981,23 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/remote-sync" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.data-studio.api.table.table-selectors"
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/data-studio/table" ]
}
},
- "/api/ee/remote-sync/import" : {
+ "/api/ee/data-studio/table/unpublish-tables" : {
"post" : {
- "operationId" : "post-api-ee-remote-sync-import",
- "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.",
+ "operationId" : "post-api-ee-data-studio-table-unpublish-tables",
+ "summary" : "POST /api/ee/data-studio/table/unpublish-tables",
+ "description" : "Unset collection for each of selected tables and all downstream dependents recursively.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -29260,28 +24005,7 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "message" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "status" : {
- "const" : "success"
- },
- "task_id" : {
- "oneOf" : [ {
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "status", "task_id" ]
+ "type" : "null"
}
}
}
@@ -29297,45 +24021,83 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "branch" : {
- "type" : "string",
- "minLength" : 1
- },
- "force" : {
- "type" : "boolean"
- }
- }
+ "$ref" : "#/components/schemas/metabase-enterprise.data-studio.api.table.table-selectors"
}
}
}
},
- "tags" : [ "/api/ee/remote-sync" ]
+ "tags" : [ "/api/ee/data-studio/table" ]
}
},
- "/api/ee/remote-sync/is-dirty" : {
- "get" : {
- "operationId" : "get-api-ee-remote-sync-is-dirty",
- "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" : [ ],
+ "/api/ee/database-replication/connection/{database-id}" : {
+ "post" : {
+ "operationId" : "post-api-ee-database-replication-connection-database-id",
+ "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",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "is_dirty" : {
- "type" : "boolean"
- }
- },
- "required" : [ "is_dirty" ]
+ "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" ]
+ }
}
}
}
+ }
+ },
+ "tags" : [ "/api/ee/database-replication" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-ee-database-replication-connection-database-id",
+ "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"
@@ -29344,35 +24106,27 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/remote-sync" ]
+ "tags" : [ "/api/ee/database-replication" ]
}
},
- "/api/ee/remote-sync/settings" : {
- "put" : {
- "operationId" : "put-api-ee-remote-sync-settings",
- "summary" : "PUT /api/ee/remote-sync/settings",
- "description" : "Update Remote Sync related settings. You must be a superuser to do this.",
- "parameters" : [ ],
+ "/api/ee/database-replication/connection/{database-id}/preview" : {
+ "post" : {
+ "operationId" : "post-api-ee-database-replication-connection-database-id-preview",
+ "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" : "database-id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "success" : {
- "type" : "boolean"
- },
- "task_id" : {
- "type" : "integer",
- "minimum" : 1
- }
- },
- "required" : [ "success" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -29387,96 +24141,43 @@
"schema" : {
"type" : "object",
"properties" : {
- "collections" : {
- "oneOf" : [ {
- "type" : "object",
- "additionalProperties" : {
- "type" : "boolean"
+ "replicationSchemaFilters" : {
+ "type" : "object",
+ "properties" : {
+ "schema-filters-patterns" : {
+ "type" : "string"
+ },
+ "schema-filters-type" : {
+ "type" : "string",
+ "enum" : [ "inclusion", "exclusion", "all" ]
}
- }, {
- "type" : "null"
- } ]
- },
- "remote-sync-auto-import" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "remote-sync-branch" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "remote-sync-token" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "remote-sync-transforms" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "remote-sync-type" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "read-only", "read-write" ]
- }, {
- "type" : "null"
- } ]
- },
- "remote-sync-url" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ },
+ "required" : [ "schema-filters-type", "schema-filters-patterns" ]
}
}
}
}
}
},
- "tags" : [ "/api/ee/remote-sync" ]
+ "tags" : [ "/api/ee/database-replication" ]
}
},
- "/api/ee/remote-sync/stash" : {
+ "/api/ee/database-routing/destination-database" : {
"post" : {
- "operationId" : "post-api-ee-remote-sync-stash",
- "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" : [ ],
+ "operationId" : "post-api-ee-database-routing-destination-database",
+ "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",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "message" : {
- "type" : "string"
- },
- "status" : {
- "type" : "string"
- },
- "task_id" : {
- "type" : "integer",
- "minimum" : 1
- }
- },
- "required" : [ "status", "message", "task_id" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -29491,39 +24192,56 @@
"schema" : {
"type" : "object",
"properties" : {
- "message" : {
- "type" : "string",
- "minLength" : 1
+ "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" ]
+ }
},
- "new_branch" : {
- "type" : "string",
- "minLength" : 1
+ "router_database_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}
},
- "required" : [ "new_branch", "message" ]
+ "required" : [ "router_database_id", "destinations" ]
}
}
}
},
- "tags" : [ "/api/ee/remote-sync" ]
+ "tags" : [ "/api/ee/database-routing" ]
}
},
- "/api/ee/replacement/check-replace-source" : {
- "post" : {
- "operationId" : "post-api-ee-replacement-check-replace-source",
- "summary" : "POST /api/ee/replacement/check-replace-source",
- "description" : "Check whether a source entity can be replaced by a target entity. Returns compatibility\n errors describing column mismatches, type mismatches, primary key mismatches, and foreign\n key mismatches.",
- "parameters" : [ ],
+ "/api/ee/database-routing/router-database/{id}" : {
+ "put" : {
+ "operationId" : "put-api-ee-database-routing-router-database-id",
+ "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",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.check-replace-source-response"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -29538,32 +24256,27 @@
"schema" : {
"type" : "object",
"properties" : {
- "source_entity_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-id"
- },
- "source_entity_type" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-type"
- },
- "target_entity_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-id"
- },
- "target_entity_type" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-type"
+ "user_attribute" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
}
- },
- "required" : [ "source_entity_id", "source_entity_type", "target_entity_id", "target_entity_type" ]
+ }
}
}
}
},
- "tags" : [ "/api/ee/replacement" ]
+ "tags" : [ "/api/ee/database-routing" ]
}
},
- "/api/ee/replacement/replace-model-with-transform" : {
+ "/api/ee/dependencies/check-card" : {
"post" : {
- "operationId" : "post-api-ee-replacement-replace-model-with-transform",
- "summary" : "POST /api/ee/replacement/replace-model-with-transform",
- "description" : "Create a transform from a model, execute it, and replace all usages of the model\n with the output table. Un-persists the model and converts it to a saved question.\n Returns 202 with a run_id for polling.\n\n If there is an error during the transform execution, no replacement will be\n performed and the model will remain unchanged.\n\n If there is an error during the source swap, the transform and the output\n table will be retained, and the model will remain unchanged. We cannot delete\n the transform or the output table because they can be used by other queries at\n this point.",
+ "operationId" : "post-api-ee-dependencies-check-card",
+ "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" : {
@@ -29571,23 +24284,7 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "body" : {
- "type" : "object",
- "properties" : {
- "run_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.run-id"
- }
- },
- "required" : [ "run_id" ],
- "additionalProperties" : false
- },
- "status" : {
- "const" : 202
- }
- },
- "required" : [ "status", "body" ]
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.broken-cards-response"
}
}
}
@@ -29603,50 +24300,19 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "card_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-id"
- },
- "target_collection_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-id"
- }, {
- "type" : "null"
- } ]
- },
- "transform_name" : {
- "type" : "string"
- },
- "transform_tag_ids" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "integer",
- "minimum" : 1
- }
- }, {
- "type" : "null"
- } ]
- },
- "transform_target" : {
- "type" : "object",
- "properties" : { }
- }
- },
- "required" : [ "card_id", "transform_name", "transform_target" ]
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.card-body"
}
}
}
},
- "tags" : [ "/api/ee/replacement" ]
+ "tags" : [ "/api/ee/dependencies" ]
}
},
- "/api/ee/replacement/replace-source" : {
+ "/api/ee/dependencies/check-snippet" : {
"post" : {
- "operationId" : "post-api-ee-replacement-replace-source",
- "summary" : "POST /api/ee/replacement/replace-source",
- "description" : "Replace all usages of a source entity with a target entity asynchronously.\n Returns 202 with a run_id for polling. Returns 409 if a replacement is already running.",
+ "operationId" : "post-api-ee-dependencies-check-snippet",
+ "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" : {
@@ -29654,23 +24320,7 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "body" : {
- "type" : "object",
- "properties" : {
- "run_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.run-id"
- }
- },
- "required" : [ "run_id" ],
- "additionalProperties" : false
- },
- "status" : {
- "const" : 202
- }
- },
- "required" : [ "status", "body" ]
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.broken-cards-response"
}
}
}
@@ -29688,54 +24338,37 @@
"schema" : {
"type" : "object",
"properties" : {
- "source_entity_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-id"
- },
- "source_entity_type" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-type"
+ "content" : {
+ "type" : "string"
},
- "target_entity_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-id"
+ "id" : {
+ "$ref" : "#/components/schemas/metabase.lib.schema.id.snippet"
},
- "target_entity_type" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-type"
+ "name" : {
+ "description" : "snippet names cannot include '}' or start with spaces"
}
},
- "required" : [ "source_entity_id", "source_entity_type", "target_entity_id", "target_entity_type" ]
+ "required" : [ "id" ]
}
}
}
},
- "tags" : [ "/api/ee/replacement" ]
+ "tags" : [ "/api/ee/dependencies" ]
}
},
- "/api/ee/replacement/runs" : {
- "get" : {
- "operationId" : "get-api-ee-replacement-runs",
- "summary" : "GET /api/ee/replacement/runs",
- "description" : "List replacement runs, optionally filtered by is-active.",
- "parameters" : [ {
- "in" : "query",
- "name" : "is-active",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- } ],
+ "/api/ee/dependencies/check-transform" : {
+ "post" : {
+ "operationId" : "post-api-ee-dependencies-check-transform",
+ "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",
"content" : {
"application/json" : {
"schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.run"
- }
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.broken-cards-response"
}
}
}
@@ -29747,20 +24380,45 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/replacement" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.transform-body"
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/dependencies" ]
}
},
- "/api/ee/replacement/runs/{id}" : {
+ "/api/ee/dependencies/graph" : {
"get" : {
- "operationId" : "get-api-ee-replacement-runs-id",
- "summary" : "GET /api/ee/replacement/runs/{id}",
- "description" : "Get the status of a source replacement run.",
+ "operationId" : "get-api-ee-dependencies-graph",
+ "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.\n\n Optional :archived parameter controls whether entities in archived collections are included:\n - false (default): Excludes entities in archived collections\n - true: Includes entities in archived collections",
"parameters" : [ {
- "in" : "path",
+ "in" : "query",
"name" : "id",
- "required" : true,
+ "required" : false,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.run-id"
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "query",
+ "name" : "type",
+ "required" : false,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
+ }
+ }, {
+ "in" : "query",
+ "name" : "archived",
+ "required" : false,
+ "schema" : {
+ "type" : "boolean"
}
} ],
"responses" : {
@@ -29769,7 +24427,7 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.run"
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.graph-response"
}
}
}
@@ -29781,152 +24439,114 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/replacement" ]
+ "tags" : [ "/api/ee/dependencies" ]
}
},
- "/api/ee/replacement/runs/{id}/cancel" : {
- "post" : {
- "operationId" : "post-api-ee-replacement-runs-id-cancel",
- "summary" : "POST /api/ee/replacement/runs/{id}/cancel",
- "description" : "Cancel a running source replacement.",
+ "/api/ee/dependencies/graph/breaking" : {
+ "get" : {
+ "operationId" : "get-api-ee-dependencies-graph-breaking",
+ "summary" : "GET /api/ee/dependencies/graph/breaking",
+ "description" : "Returns a list of entities that are breaking other entities (sources of errors).\n These are tables or cards that other entities depend on, where those dependents\n have validation errors traced back to this source entity.\n\n Accepts optional parameters for filtering:\n - `types`: List of source entity types - only `:card` or `:table` (default: both)\n - `card-types`: List of card types to include when filtering cards (e.g., `[:question :model :metric]`)\n - `query`: Search string to filter by name or location\n - `archived`: Controls whether archived entities are included\n - `include-personal-collections`: Controls whether items in personal collections are included (default: false)\n - `sort-column`: Sort column - `:name`, `:location`, `:dependents-errors`, or `:dependents-with-errors` (default: `:name`)\n - `sort-direction`: Sort direction - `:asc` or `:desc` (default: `:asc`)\n - `offset`: Default 0\n - `limit`: Default 50\n\n Returns a map with:\n - `data`: List of breaking source entities\n - `total`: Total count of matched items\n - `offset`: Applied offset\n - `limit`: Applied limit",
"parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
+ "in" : "query",
+ "name" : "types",
+ "required" : false,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.run-id"
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
+ }, {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
+ }
+ } ]
}
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "success" : {
- "type" : "boolean"
- }
- },
- "required" : [ "success" ]
- }
+ }, {
+ "in" : "query",
+ "name" : "card-types",
+ "required" : false,
+ "schema" : {
+ "anyOf" : [ {
+ "type" : "string",
+ "enum" : [ "question", "metric", "model" ]
+ }, {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "enum" : [ "question", "metric", "model" ]
}
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ } ]
}
- },
- "tags" : [ "/api/ee/replacement" ]
- }
- },
- "/api/ee/scim/api_key" : {
- "get" : {
- "operationId" : "get-api-ee-scim-api_key",
- "summary" : "GET /api/ee/scim/api_key",
- "description" : "Fetch the SCIM API key if one exists. Does *not* return an unmasked key, since we don't have access\n to that after it is created.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ }, {
+ "in" : "query",
+ "name" : "query",
+ "required" : false,
+ "schema" : {
+ "type" : "string"
}
- },
- "tags" : [ "/api/ee/scim" ]
- },
- "post" : {
- "operationId" : "post-api-ee-scim-api_key",
- "summary" : "POST /api/ee/scim/api_key",
- "description" : "Create a new SCIM API key, or refresh one that already exists. When called for the first time,\n this is equivalent to enabling SCIM.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ }, {
+ "in" : "query",
+ "name" : "archived",
+ "required" : false,
+ "schema" : {
+ "type" : "boolean"
}
- },
- "tags" : [ "/api/ee/scim" ]
- }
- },
- "/api/ee/scim/v2/Groups" : {
- "get" : {
- "operationId" : "get-api-ee-scim-v2-Groups",
- "summary" : "GET /api/ee/scim/v2/Groups",
- "description" : "Fetch a list of groups.",
- "parameters" : [ {
+ }, {
"in" : "query",
- "name" : "startIndex",
+ "name" : "include-personal-collections",
"required" : false,
"schema" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
+ "type" : "boolean"
}
}, {
"in" : "query",
- "name" : "count",
+ "name" : "sort-column",
"required" : false,
"schema" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
+ "type" : "string",
+ "enum" : [ "dependents-with-errors", "dependents-errors", "name", "location" ]
}
}, {
"in" : "query",
- "name" : "filter",
+ "name" : "sort-direction",
"required" : false,
"schema" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
+ "type" : "string",
+ "enum" : [ "desc", "asc" ]
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/ee/scim/v2" ]
- },
- "post" : {
- "operationId" : "post-api-ee-scim-v2-Groups",
- "summary" : "POST /api/ee/scim/v2/Groups",
- "description" : "Create a single group, and populates it if necessary.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "data" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.entity"
+ }
+ },
+ "limit" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "offset" : {
+ "type" : "integer",
+ "minimum" : 0
+ },
+ "total" : {
+ "type" : "integer",
+ "minimum" : 0
+ }
+ },
+ "required" : [ "data", "total", "offset", "limit" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -29935,158 +24555,97 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "displayName" : {
- "type" : "string",
- "minLength" : 1
- },
- "id" : {
- "type" : "string",
- "minLength" : 1
- },
- "members" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "$ref" : {
- "type" : "string",
- "minLength" : 1
- },
- "value" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "value" ]
- }
- },
- "schemas" : {
- "type" : "array",
- "items" : {
- "type" : "string",
- "minLength" : 1
- }
- }
- },
- "required" : [ "schemas", "displayName" ]
- }
- }
- }
- },
- "tags" : [ "/api/ee/scim/v2" ]
+ "tags" : [ "/api/ee/dependencies" ]
}
},
- "/api/ee/scim/v2/Groups/{id}" : {
+ "/api/ee/dependencies/graph/broken" : {
"get" : {
- "operationId" : "get-api-ee-scim-v2-Groups-id",
- "summary" : "GET /api/ee/scim/v2/Groups/{id}",
- "description" : "Fetch a single group.",
+ "operationId" : "get-api-ee-dependencies-graph-broken",
+ "summary" : "GET /api/ee/dependencies/graph/broken",
+ "description" : "Returns the broken dependents for a specific source entity.\n These are entities that have validation errors traced back to the specified source.\n\n Required parameters:\n - `id`: The ID of the source entity\n - `type`: The type of the source entity (card, table)\n\n Optional parameters:\n - `dependent-types`: Dependency types to filter by. Can be single value or array.\n - `dependent-card-types`: Card types to filter by when dependent-types includes :card.\n - `include-personal-collections`: Include items in personal collections (default: false)\n - `sort-column`: Column to sort by - name, location, or view-count (default: name)\n - `sort-direction`: Sort direction - asc or desc (default: asc)",
"parameters" : [ {
- "in" : "path",
+ "in" : "query",
"name" : "id",
"required" : true,
"schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
+ "type" : "integer",
+ "minimum" : 1
},
- "5XX" : {
- "description" : "Server error response"
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "query",
+ "name" : "type",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
}
- },
- "tags" : [ "/api/ee/scim/v2" ]
- },
- "put" : {
- "operationId" : "put-api-ee-scim-v2-Groups-id",
- "summary" : "PUT /api/ee/scim/v2/Groups/{id}",
- "description" : "Update a group.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ }, {
+ "in" : "query",
+ "name" : "dependent-types",
+ "required" : false,
+ "schema" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
+ }, {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
+ }
+ } ]
}
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "displayName" : {
- "type" : "string",
- "minLength" : 1
- },
- "id" : {
- "type" : "string",
- "minLength" : 1
- },
- "members" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "$ref" : {
- "type" : "string",
- "minLength" : 1
- },
- "value" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "value" ]
- }
- },
- "schemas" : {
- "type" : "array",
- "items" : {
- "type" : "string",
- "minLength" : 1
- }
- }
- },
- "required" : [ "schemas", "displayName" ]
+ }, {
+ "in" : "query",
+ "name" : "dependent-card-types",
+ "required" : false,
+ "schema" : {
+ "anyOf" : [ {
+ "type" : "string",
+ "enum" : [ "question", "metric", "model" ]
+ }, {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "enum" : [ "question", "metric", "model" ]
}
- }
+ } ]
}
- },
- "tags" : [ "/api/ee/scim/v2" ]
- },
- "delete" : {
- "operationId" : "delete-api-ee-scim-v2-Groups-id",
- "summary" : "DELETE /api/ee/scim/v2/Groups/{id}",
- "description" : "Delete a group.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
+ }, {
+ "in" : "query",
+ "name" : "include-personal-collections",
+ "required" : false,
+ "schema" : {
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "sort-column",
+ "required" : false,
"schema" : {
"type" : "string",
- "minLength" : 1
+ "enum" : [ "name", "view-count", "location" ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "sort-direction",
+ "required" : false,
+ "schema" : {
+ "type" : "string",
+ "enum" : [ "desc", "asc" ]
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.broken-dependent-entity"
+ }
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -30095,193 +24654,118 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/scim/v2" ]
+ "tags" : [ "/api/ee/dependencies" ]
}
},
- "/api/ee/scim/v2/Users" : {
+ "/api/ee/dependencies/graph/dependents" : {
"get" : {
- "operationId" : "get-api-ee-scim-v2-Users",
- "summary" : "GET /api/ee/scim/v2/Users",
- "description" : "Fetch a list of users.",
+ "operationId" : "get-api-ee-dependencies-graph-dependents",
+ "summary" : "GET /api/ee/dependencies/graph/dependents",
+ "description" : "Returns a list of dependents for the specified entity.\n\n Required parameters:\n - `id`: The ID of the entity\n - `type`: The type of the entity (card, table, dashboard, etc.)\n\n Optional parameters:\n - `dependent-types`: Dependency types to filter by. Can be single value or array.\n If not provided, returns all types. Example: ?dependent-types=card&dependent-types=dashboard\n - `dependent-card-types`: Card types to filter by when dependent-types includes :card.\n Ignored if dependent-types doesn't include :card. Example: ?dependent-card-types=question&dependent-card-types=model\n - `archived`: Include entities in archived collections (default: false)\n - `broken`: Return only broken entities (default: false)\n - `query`: Search string to filter results by name or location (case-insensitive)\n - `include-personal-collections`: Include items in personal collections (default: false)\n - `sort-column`: Column to sort by - name, location, or view-count (default: name)\n - `sort-direction`: Sort direction - asc or desc (default: asc)",
"parameters" : [ {
"in" : "query",
- "name" : "startIndex",
- "required" : false,
+ "name" : "id",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "query",
+ "name" : "type",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
}
}, {
"in" : "query",
- "name" : "count",
+ "name" : "dependent-types",
"required" : false,
"schema" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
}, {
- "type" : "null"
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
+ }
} ]
}
}, {
"in" : "query",
- "name" : "filter",
+ "name" : "dependent-card-types",
"required" : false,
"schema" : {
- "oneOf" : [ {
+ "anyOf" : [ {
"type" : "string",
- "minLength" : 1
+ "enum" : [ "question", "metric", "model" ]
}, {
- "type" : "null"
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "enum" : [ "question", "metric", "model" ]
+ }
} ]
}
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ }, {
+ "in" : "query",
+ "name" : "archived",
+ "required" : false,
+ "schema" : {
+ "type" : "boolean"
}
- },
- "tags" : [ "/api/ee/scim/v2" ]
- },
- "post" : {
- "operationId" : "post-api-ee-scim-v2-Users",
- "summary" : "POST /api/ee/scim/v2/Users",
- "description" : "Create a single user.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ }, {
+ "in" : "query",
+ "name" : "broken",
+ "required" : false,
+ "schema" : {
+ "type" : "boolean"
}
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "type" : "boolean"
- },
- "emails" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "primary" : {
- "type" : "boolean"
- },
- "type" : {
- "type" : "string",
- "minLength" : 1
- },
- "value" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "value" ]
- }
- },
- "groups" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "$ref" : {
- "type" : "string",
- "minLength" : 1
- },
- "display" : {
- "type" : "string",
- "minLength" : 1
- },
- "value" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "value", "display" ]
- }
- },
- "id" : {
- "type" : "string",
- "minLength" : 1
- },
- "locale" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "object",
- "properties" : {
- "familyName" : {
- "type" : "string"
- },
- "givenName" : {
- "type" : "string"
- }
- },
- "required" : [ "givenName", "familyName" ]
- },
- "schemas" : {
- "type" : "array",
- "items" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "userName" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "schemas", "userName", "name", "emails" ]
- }
- }
+ }, {
+ "in" : "query",
+ "name" : "query",
+ "required" : false,
+ "schema" : {
+ "type" : "string"
}
- },
- "tags" : [ "/api/ee/scim/v2" ]
- }
- },
- "/api/ee/scim/v2/Users/{id}" : {
- "get" : {
- "operationId" : "get-api-ee-scim-v2-Users-id",
- "summary" : "GET /api/ee/scim/v2/Users/{id}",
- "description" : "Fetch a single user.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
+ }, {
+ "in" : "query",
+ "name" : "include-personal-collections",
+ "required" : false,
+ "schema" : {
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "sort-column",
+ "required" : false,
"schema" : {
"type" : "string",
- "minLength" : 1
+ "enum" : [ "name", "view-count", "location" ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "sort-direction",
+ "required" : false,
+ "schema" : {
+ "type" : "string",
+ "enum" : [ "desc", "asc" ]
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.entity"
+ }
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -30290,130 +24774,131 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/scim/v2" ]
- },
- "put" : {
- "operationId" : "put-api-ee-scim-v2-Users-id",
- "summary" : "PUT /api/ee/scim/v2/Users/{id}",
- "description" : "Update a user.",
- "parameters" : [ ],
+ "tags" : [ "/api/ee/dependencies" ]
+ }
+ },
+ "/api/ee/dependencies/graph/unreferenced" : {
+ "get" : {
+ "operationId" : "get-api-ee-dependencies-graph-unreferenced",
+ "summary" : "GET /api/ee/dependencies/graph/unreferenced",
+ "description" : "Returns a list of all unreferenced items in the instance.\n An unreferenced item is one that is not a dependency of any other item.\n\n Accepts optional parameters for filtering:\n - `types`: List of entity types to include (e.g., [:card :transform :snippet :dashboard])\n - `card-types`: List of card types to include when filtering cards (e.g., [:question :model :metric])\n - `query`: Search string to filter by name or location\n - `archived`: Controls whether archived entities are included\n - `include-personal-collections`: Controls whether items in personal collections are included (default: false)\n - `sort-column`: Sort column - `:name`, `:location`, `:dependents-errors`, or `:dependents-with-errors` (default: `:name`)\n - `sort-direction`: Sort direction - `:asc` or `:desc` (default: `:asc`)\n - `offset`: Default 0\n - `limit`: Default 50\n\n Returns a map with:\n - `data`: List of unreferenced items, each with `:id`, `:type`, and `:data` fields\n - `total`: Total count of matched items\n - `offset`: Applied offset\n - `limit`: Applied limit",
+ "parameters" : [ {
+ "in" : "query",
+ "name" : "types",
+ "required" : false,
+ "schema" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
+ }, {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.dependency-types.dependency-types"
+ }
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "card-types",
+ "required" : false,
+ "schema" : {
+ "anyOf" : [ {
+ "type" : "string",
+ "enum" : [ "question", "metric", "model" ]
+ }, {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "enum" : [ "question", "metric", "model" ]
+ }
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "query",
+ "required" : false,
+ "schema" : {
+ "type" : "string"
+ }
+ }, {
+ "in" : "query",
+ "name" : "archived",
+ "required" : false,
+ "schema" : {
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "include-personal-collections",
+ "required" : false,
+ "schema" : {
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "sort-column",
+ "required" : false,
+ "schema" : {
+ "type" : "string",
+ "enum" : [ "dependents-with-errors", "dependents-errors", "name", "location" ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "sort-direction",
+ "required" : false,
+ "schema" : {
+ "type" : "string",
+ "enum" : [ "desc", "asc" ]
+ }
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "active" : {
- "type" : "boolean"
- },
- "emails" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "primary" : {
- "type" : "boolean"
- },
- "type" : {
- "type" : "string",
- "minLength" : 1
- },
- "value" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "value" ]
- }
- },
- "groups" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "$ref" : {
- "type" : "string",
- "minLength" : 1
- },
- "display" : {
- "type" : "string",
- "minLength" : 1
- },
- "value" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "value", "display" ]
- }
- },
- "id" : {
- "type" : "string",
- "minLength" : 1
- },
- "locale" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "object",
- "properties" : {
- "familyName" : {
- "type" : "string"
- },
- "givenName" : {
- "type" : "string"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "data" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.dependencies.api.entity"
}
},
- "required" : [ "givenName", "familyName" ]
- },
- "schemas" : {
- "type" : "array",
- "items" : {
- "type" : "string",
- "minLength" : 1
+ "limit" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "offset" : {
+ "type" : "integer",
+ "minimum" : 0
+ },
+ "total" : {
+ "type" : "integer",
+ "minimum" : 0
}
},
- "userName" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "schemas", "userName", "name", "emails" ]
+ "required" : [ "data", "total", "offset", "limit" ]
+ }
}
}
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/ee/scim/v2" ]
- },
- "patch" : {
- "operationId" : "patch-api-ee-scim-v2-Users-id",
- "summary" : "PATCH /api/ee/scim/v2/Users/{id}",
- "description" : "Activate or deactivate a user. Supports specific replace operations, but not arbitrary patches.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
+ "tags" : [ "/api/ee/dependencies" ]
+ }
+ },
+ "/api/ee/email/override" : {
+ "put" : {
+ "operationId" : "put-api-ee-email-override",
+ "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"
@@ -30431,58 +24916,52 @@
"schema" : {
"type" : "object",
"properties" : {
- "Operations" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "op" : {
- "type" : "string",
- "minLength" : 1
- },
- "value" : {
- "anyOf" : [ {
- "type" : "object",
- "additionalProperties" : {
- "anyOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "boolean"
- } ]
- }
- }, {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "boolean"
- } ]
- }
- },
- "required" : [ "op", "value" ]
- }
+ "email-smtp-host-override" : {
+ "anyOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "schemas" : {
- "type" : "array",
- "items" : {
- "type" : "string",
- "minLength" : 1
- }
+ "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"
+ } ]
+ },
+ "email-smtp-username-override" : {
+ "anyOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
}
- },
- "required" : [ "schemas", "Operations" ]
+ }
}
}
}
},
- "tags" : [ "/api/ee/scim/v2" ]
- }
- },
- "/api/ee/semantic-search/status" : {
- "get" : {
- "operationId" : "get-api-ee-semantic-search-status",
- "summary" : "GET /api/ee/semantic-search/status",
- "description" : "Fetch the indexing status of the currently active semantic search index table.\n\n Returns a map with keys:\n :indexed_count <number of indexed items>\n :total_est <estimated total number of items to index>\n\n If no index is active, returns an empty map.",
+ "tags" : [ "/api/ee/email" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-ee-email-override",
+ "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" : {
@@ -30495,111 +24974,83 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/semantic-search" ]
+ "tags" : [ "/api/ee/email" ]
}
},
- "/api/ee/serialization/export" : {
- "post" : {
- "operationId" : "post-api-ee-serialization-export",
- "summary" : "POST /api/ee/serialization/export",
- "description" : "Serialize and retrieve Metabase instance.\n\n Outputs `.tar.gz` file with serialization results and an `export.log` file.\n On error outputs serialization logs directly.",
- "parameters" : [ {
- "in" : "query",
- "name" : "dirname",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "description" : "name of directory and archive file (default: `<instance-name>-<YYYY-MM-dd_HH-mm>`)"
- }, {
- "in" : "query",
- "name" : "collection",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "anyOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "string",
- "pattern" : "^.{21}$"
- }, {
- "type" : "string",
- "pattern" : "^eid:.{21}$"
- } ]
- }
- }, {
- "type" : "null"
- } ]
- },
- "description" : "collections' db ids/entity-ids to serialize"
- }, {
- "in" : "query",
- "name" : "all_collections",
- "required" : true,
- "schema" : {
- "default" : true,
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "settings",
- "required" : true,
- "schema" : {
- "default" : true,
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "data_model",
- "required" : true,
- "schema" : {
- "default" : true,
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "field_values",
- "required" : true,
- "schema" : {
- "default" : false,
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "database_secrets",
- "required" : true,
- "schema" : {
- "default" : false,
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "continue_on_error",
- "required" : true,
- "schema" : {
- "default" : false,
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "full_stacktrace",
- "required" : true,
- "schema" : {
- "default" : false,
- "type" : "boolean"
- }
- } ],
+ "/api/ee/embedding-hub/checklist" : {
+ "get" : {
+ "operationId" : "get-api-ee-embedding-hub-checklist",
+ "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"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "checklist" : {
+ "type" : "object",
+ "properties" : {
+ "enable-tenants" : {
+ "type" : "boolean"
+ },
+ "create-models" : {
+ "type" : "boolean"
+ },
+ "sso-configured" : {
+ "type" : "boolean"
+ },
+ "configure-row-column-security" : {
+ "type" : "boolean"
+ },
+ "create-test-embed" : {
+ "type" : "boolean"
+ },
+ "data-permissions-and-enable-tenants" : {
+ "type" : "boolean"
+ },
+ "embed-production" : {
+ "type" : "boolean"
+ },
+ "create-dashboard" : {
+ "type" : "boolean"
+ },
+ "move-dashboard-to-shared" : {
+ "type" : "boolean"
+ },
+ "setup-data-segregation-strategy" : {
+ "type" : "boolean"
+ },
+ "create-tenants" : {
+ "type" : "boolean"
+ },
+ "add-data" : {
+ "type" : "boolean"
+ },
+ "sso-auth-manual-tested" : {
+ "type" : "boolean"
+ }
+ },
+ "required" : [ "add-data", "create-dashboard", "create-models", "configure-row-column-security", "create-test-embed", "embed-production", "sso-configured", "data-permissions-and-enable-tenants", "enable-tenants", "move-dashboard-to-shared", "create-tenants", "setup-data-segregation-strategy", "sso-auth-manual-tested" ],
+ "additionalProperties" : false
+ },
+ "data-isolation-strategy" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "row-column-level-security", "connection-impersonation", "database-routing" ]
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "checklist", "data-isolation-strategy" ],
+ "additionalProperties" : false
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -30608,42 +25059,25 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/serialization" ]
+ "tags" : [ "/api/ee/embedding-hub" ]
}
},
- "/api/ee/serialization/import" : {
+ "/api/ee/gsheets/connection" : {
"post" : {
- "operationId" : "post-api-ee-serialization-import",
- "summary" : "POST /api/ee/serialization/import",
- "description" : "Deserialize Metabase instance from an archive generated by /export.\n\n Parameters:\n - `file`: archive encoded as `multipart/form-data` (required).\n\n Returns logs of deserialization.",
- "parameters" : [ {
- "in" : "query",
- "name" : "continue_on_error",
- "required" : true,
- "schema" : {
- "default" : false,
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "full_stacktrace",
- "required" : true,
- "schema" : {
- "default" : false,
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "reindex",
- "required" : true,
- "schema" : {
- "default" : true,
- "type" : "boolean"
- }
- } ],
+ "operationId" : "post-api-ee-gsheets-connection",
+ "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" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/gsheets.response"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -30654,93 +25088,184 @@
},
"requestBody" : {
"content" : {
- "multipart/form-data" : {
+ "application/json" : {
"schema" : {
"type" : "object",
"properties" : {
- "file" : {
- "description" : ".tgz with serialization data",
- "type" : "object",
- "properties" : {
- "content-type" : {
- "type" : "string"
- },
- "filename" : {
- "type" : "string"
- },
- "size" : {
- "type" : "integer"
- },
- "tempfile" : { }
- },
- "required" : [ "content-type", "filename", "size", "tempfile" ],
- "additionalProperties" : false
+ "url" : {
+ "type" : "string",
+ "minLength" : 1
}
},
- "required" : [ "file" ]
+ "required" : [ "url" ]
}
}
}
},
- "tags" : [ "/api/ee/serialization" ]
- }
- },
- "/api/ee/stale/{id}" : {
+ "tags" : [ "/api/ee/gsheets" ]
+ },
"get" : {
- "operationId" : "get-api-ee-stale-id",
- "summary" : "GET /api/ee/stale/{id}",
- "description" : "A flexible endpoint that returns stale entities, in the same shape as collections/items, with the following options:\n - `before_date` - only return entities that were last edited before this date (default: 6 months ago)\n - `is_recursive` - if true, return entities from all children of the collection, not just the direct children (default: false)\n - `sort_column` - the column to sort by (default: name)\n - `sort_direction` - the direction to sort by (default: asc)",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "anyOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "const" : "root"
- } ]
+ "operationId" : "get-api-ee-gsheets-connection",
+ "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",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/gsheets.response"
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
- }, {
- "in" : "query",
- "name" : "before_date",
- "required" : false,
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ },
+ "tags" : [ "/api/ee/gsheets" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-ee-gsheets-connection",
+ "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"
}
- }, {
- "in" : "query",
- "name" : "is_recursive",
- "required" : true,
- "schema" : {
- "default" : false,
- "type" : "boolean"
+ },
+ "tags" : [ "/api/ee/gsheets" ]
+ }
+ },
+ "/api/ee/gsheets/connection/sync" : {
+ "post" : {
+ "operationId" : "post-api-ee-gsheets-connection-sync",
+ "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" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
- }, {
- "in" : "query",
- "name" : "sort_column",
- "required" : true,
- "schema" : {
- "default" : "name",
- "type" : "string",
- "enum" : [ "name", "last_used_at" ]
+ },
+ "tags" : [ "/api/ee/gsheets" ]
+ }
+ },
+ "/api/ee/gsheets/service-account" : {
+ "get" : {
+ "operationId" : "get-api-ee-gsheets-service-account",
+ "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",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "email" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "email" ]
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
- }, {
- "in" : "query",
- "name" : "sort_direction",
- "required" : true,
- "schema" : {
- "default" : "asc",
- "type" : "string",
- "enum" : [ "asc", "desc" ]
+ },
+ "tags" : [ "/api/ee/gsheets" ]
+ }
+ },
+ "/api/ee/library" : {
+ "post" : {
+ "operationId" : "post-api-ee-library",
+ "summary" : "POST /api/ee/library",
+ "description" : "Creates the Library if it doesn't exist. Returns the created collection.\n\n Requires data analyst or superuser permissions.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/library" ]
+ },
+ "get" : {
+ "operationId" : "get-api-ee-library",
+ "summary" : "GET /api/ee/library",
+ "description" : "Get the Library. If no library exists, it doesn't fail but returns an empty response",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase.collections.schema.CollectionItem"
+ }, {
+ "type" : "object",
+ "properties" : {
+ "data" : {
+ "type" : "null"
+ }
+ },
+ "required" : [ "data" ]
+ } ]
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
- } ],
+ },
+ "tags" : [ "/api/ee/library" ]
+ }
+ },
+ "/api/ee/library/tree" : {
+ "get" : {
+ "operationId" : "get-api-ee-library-tree",
+ "summary" : "GET /api/ee/library/tree",
+ "description" : "This matches /api/collection/tree but only returns the library collection.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -30752,25 +25277,27 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/stale" ]
+ "tags" : [ "/api/ee/library" ]
}
},
- "/api/ee/support-access-grant" : {
- "post" : {
- "operationId" : "post-api-ee-support-access-grant",
- "summary" : "POST /api/ee/support-access-grant",
- "description" : "Create a new support access grant.\n\n Requires superuser permissions. Only one active grant can exist at a time.",
- "parameters" : [ ],
+ "/api/ee/logs/query_execution/{yyyy-mm}" : {
+ "get" : {
+ "operationId" : "get-api-ee-logs-query_execution-yyyy-mm",
+ "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",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.support-access-grants.schema.grant-response"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -30779,55 +25306,36 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.support-access-grants.schema.create-grant-request"
- }
- }
- }
- },
- "tags" : [ "/api/ee/support-access-grant" ]
- },
+ "tags" : [ "/api/ee/logs" ]
+ }
+ },
+ "/api/ee/permission_debug" : {
"get" : {
- "operationId" : "get-api-ee-support-access-grant",
- "summary" : "GET /api/ee/support-access-grant",
- "description" : "List support access grants with optional filtering and pagination.\n\n Requires superuser permissions.\n\n Query parameters:\n - ticket-number: Filter by ticket number\n - user-id: Filter by user who created the grant\n - include-revoked: Include revoked grants (default false)",
+ "operationId" : "get-api-ee-permission_debug",
+ "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" : "ticket-number",
- "required" : false,
+ "name" : "user_id",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "type" : "integer",
+ "minimum" : 1
}
}, {
"in" : "query",
- "name" : "user-id",
- "required" : false,
+ "name" : "model_id",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
+ "type" : "string"
}
}, {
"in" : "query",
- "name" : "include-revoked",
- "required" : false,
+ "name" : "action_type",
+ "required" : true,
"schema" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
+ "type" : "string",
+ "enum" : [ "card/read", "card/query", "card/download-data" ]
}
} ],
"responses" : {
@@ -30836,7 +25344,7 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.support-access-grants.schema.list-grants-response"
+ "$ref" : "#/components/schemas/metabase-enterprise.permission-debug.impl.perm-debug-info"
}
}
}
@@ -30848,14 +25356,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/support-access-grant" ]
+ "tags" : [ "/api/ee/permission_debug" ]
}
},
- "/api/ee/support-access-grant/current" : {
+ "/api/ee/remote-sync/branches" : {
"get" : {
- "operationId" : "get-api-ee-support-access-grant-current",
- "summary" : "GET /api/ee/support-access-grant/current",
- "description" : "Get the currently active support access grant, if one exists.\n\n Requires superuser permissions.",
+ "operationId" : "get-api-ee-remote-sync-branches",
+ "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" : {
@@ -30863,7 +25371,16 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.support-access-grants.schema.current-grant-response"
+ "type" : "object",
+ "properties" : {
+ "items" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }
+ },
+ "required" : [ "items" ]
}
}
}
@@ -30875,31 +25392,152 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/support-access-grant" ]
+ "tags" : [ "/api/ee/remote-sync" ]
}
},
- "/api/ee/support-access-grant/{id}/revoke" : {
- "put" : {
- "operationId" : "put-api-ee-support-access-grant-id-revoke",
- "summary" : "PUT /api/ee/support-access-grant/{id}/revoke",
- "description" : "Revoke an existing support access grant.\n\n Requires superuser permissions. Any admin can revoke any grant.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
+ "/api/ee/remote-sync/create-branch" : {
+ "post" : {
+ "operationId" : "post-api-ee-remote-sync-create-branch",
+ "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",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "message" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "status", "message" ]
+ }
+ }
+ }
},
- "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" : {
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "name" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/remote-sync" ]
+ }
+ },
+ "/api/ee/remote-sync/current-task" : {
+ "get" : {
+ "operationId" : "get-api-ee-remote-sync-current-task",
+ "summary" : "GET /api/ee/remote-sync/current-task",
+ "description" : "Get the current sync task",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.support-access-grants.schema.grant-response"
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "progress" : {
+ "oneOf" : [ {
+ "type" : "number",
+ "minimum" : 0.0,
+ "maximum" : 1.0
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "conflicts" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "last_progress_report_at" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "started_at" : { },
+ "ended_at" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
+ },
+ "initiated_by" : {
+ "oneOf" : [ {
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "cancelled" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "running", "successful", "errored", "cancelled", "timed-out", "conflict" ]
+ },
+ "error_message" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "sync_task_type" : {
+ "type" : "string",
+ "enum" : [ "import", "export" ]
+ },
+ "version" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "id", "sync_task_type", "progress", "started_at", "status" ]
+ }, {
+ "type" : "null"
+ } ]
}
}
}
@@ -30911,14 +25549,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/support-access-grant" ]
+ "tags" : [ "/api/ee/remote-sync" ]
}
},
- "/api/ee/tenant" : {
+ "/api/ee/remote-sync/current-task/cancel" : {
"post" : {
- "operationId" : "post-api-ee-tenant",
- "summary" : "POST /api/ee/tenant",
- "description" : "Create a new Tenant",
+ "operationId" : "post-api-ee-remote-sync-current-task-cancel",
+ "summary" : "POST /api/ee/remote-sync/current-task/cancel",
+ "description" : "Cancels the current task if one is running",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -30928,45 +25566,79 @@
"schema" : {
"type" : "object",
"properties" : {
- "attributes" : {
+ "progress" : {
"oneOf" : [ {
- "type" : "object",
- "additionalProperties" : {
+ "type" : "number",
+ "minimum" : 0.0,
+ "maximum" : 1.0
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "conflicts" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
"type" : "string"
}
}, {
"type" : "null"
} ]
},
+ "last_progress_report_at" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
+ },
"id" : {
- "description" : "value must be an integer greater than zero.",
"type" : "integer",
"minimum" : 1
},
- "is_active" : {
- "type" : "boolean"
+ "started_at" : { },
+ "ended_at" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
},
- "member_count" : {
- "description" : "value must be an integer.",
- "type" : "integer"
+ "initiated_by" : {
+ "oneOf" : [ {
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
},
- "name" : {
+ "cancelled" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "status" : {
"type" : "string",
- "minLength" : 1
+ "enum" : [ "running", "successful", "errored", "cancelled", "timed-out", "conflict" ]
},
- "slug" : {
- "description" : "invalid slug",
+ "error_message" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "sync_task_type" : {
"type" : "string",
- "pattern" : "^[-_a-z0-9]{1,255}$"
+ "enum" : [ "import", "export" ]
},
- "tenant_collection_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "version" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "id", "name", "slug", "is_active", "member_count", "attributes", "tenant_collection_id" ],
- "additionalProperties" : false
+ "required" : [ "id", "sync_task_type", "progress", "started_at", "status" ]
}
}
}
@@ -30978,52 +25650,15 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "attributes" : {
- "oneOf" : [ {
- "type" : "object",
- "additionalProperties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "slug" : {
- "description" : "invalid slug",
- "type" : "string",
- "pattern" : "^[-_a-z0-9]{1,255}$"
- }
- },
- "required" : [ "name", "slug" ],
- "additionalProperties" : false
- }
- }
- }
- },
- "tags" : [ "/api/ee/tenant" ]
- },
+ "tags" : [ "/api/ee/remote-sync" ]
+ }
+ },
+ "/api/ee/remote-sync/dirty" : {
"get" : {
- "operationId" : "get-api-ee-tenant",
- "summary" : "GET /api/ee/tenant",
- "description" : "Get all tenants",
- "parameters" : [ {
- "in" : "query",
- "name" : "status",
- "required" : true,
- "schema" : {
- "default" : "all",
- "type" : "string",
- "enum" : [ "all", "deactivated", "active" ]
- }
- } ],
+ "operationId" : "get-api-ee-remote-sync-dirty",
+ "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",
@@ -31032,55 +25667,90 @@
"schema" : {
"type" : "object",
"properties" : {
- "data" : {
+ "dirty" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
- "attributes" : {
+ "table_name" : {
"oneOf" : [ {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string"
- }
+ "type" : "string"
}, {
"type" : "null"
} ]
},
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "model" : {
+ "type" : "string"
},
- "is_active" : {
- "type" : "boolean"
+ "authority_level" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "member_count" : {
- "description" : "value must be an integer.",
+ "id" : {
"type" : "integer"
},
"name" : {
- "type" : "string",
- "minLength" : 1
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "slug" : {
- "description" : "invalid slug",
- "type" : "string",
- "pattern" : "^[-_a-z0-9]{1,255}$"
+ "updated_at" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
},
- "tenant_collection_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "table_id" : {
+ "oneOf" : [ {
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "query_type" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_id" : {
+ "oneOf" : [ {
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "created_at" : { },
+ "display" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "sync_status" : {
+ "type" : "string"
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "id", "name", "slug", "is_active", "member_count", "attributes", "tenant_collection_id" ],
- "additionalProperties" : false
+ "required" : [ "id", "name", "model", "sync_status" ]
}
}
},
- "required" : [ "data" ],
- "additionalProperties" : false
+ "required" : [ "dirty" ]
}
}
}
@@ -31092,24 +25762,15 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/tenant" ]
+ "tags" : [ "/api/ee/remote-sync" ]
}
},
- "/api/ee/tenant/{id}" : {
- "put" : {
- "operationId" : "put-api-ee-tenant-id",
- "summary" : "PUT /api/ee/tenant/{id}",
- "description" : "Update a tenant, can set name, attributes, or whether this tenant is active.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- } ],
+ "/api/ee/remote-sync/export" : {
+ "post" : {
+ "operationId" : "post-api-ee-remote-sync-export",
+ "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",
@@ -31118,45 +25779,15 @@
"schema" : {
"type" : "object",
"properties" : {
- "attributes" : {
- "oneOf" : [ {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string"
- }
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "is_active" : {
- "type" : "boolean"
- },
- "member_count" : {
- "description" : "value must be an integer.",
- "type" : "integer"
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "slug" : {
- "description" : "invalid slug",
- "type" : "string",
- "pattern" : "^[-_a-z0-9]{1,255}$"
+ "message" : {
+ "type" : "string"
},
- "tenant_collection_id" : {
- "description" : "value must be an integer greater than zero.",
+ "task_id" : {
"type" : "integer",
"minimum" : 1
}
},
- "required" : [ "id", "name", "slug", "is_active", "member_count", "attributes", "tenant_collection_id" ],
- "additionalProperties" : false
+ "required" : [ "message", "task_id" ]
}
}
}
@@ -31168,56 +25799,21 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "attributes" : {
- "oneOf" : [ {
- "type" : "object",
- "additionalProperties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "is_active" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "additionalProperties" : false
- }
- }
- }
- },
- "tags" : [ "/api/ee/tenant" ]
- },
+ "tags" : [ "/api/ee/remote-sync" ]
+ }
+ },
+ "/api/ee/remote-sync/has-remote-changes" : {
"get" : {
- "operationId" : "get-api-ee-tenant-id",
- "summary" : "GET /api/ee/tenant/{id}",
- "description" : "Get info about a tenant",
+ "operationId" : "get-api-ee-remote-sync-has-remote-changes",
+ "summary" : "GET /api/ee/remote-sync/has-remote-changes",
+ "description" : "Check if there are new changes on the remote branch that can be pulled.\n Uses in-memory caching (configurable TTL via remote-sync-check-changes-cache-ttl-seconds setting).\n\n Returns:\n - has_changes: true if remote version differs from last imported version, or if never imported\n - remote_version: current Git SHA on remote branch\n - local_version: Git SHA of last successful import (nil if never imported)\n - cached: true if result was served from cache",
"parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
+ "in" : "query",
+ "name" : "force-refresh",
+ "required" : false,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "type" : "boolean"
+ }
} ],
"responses" : {
"2XX" : {
@@ -31227,45 +25823,28 @@
"schema" : {
"type" : "object",
"properties" : {
- "attributes" : {
+ "cached" : {
+ "type" : "boolean"
+ },
+ "has_changes" : {
+ "type" : "boolean"
+ },
+ "local_version" : {
"oneOf" : [ {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string"
- }
+ "type" : "string"
}, {
"type" : "null"
} ]
},
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "is_active" : {
- "type" : "boolean"
- },
- "member_count" : {
- "description" : "value must be an integer.",
- "type" : "integer"
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "slug" : {
- "description" : "invalid slug",
- "type" : "string",
- "pattern" : "^[-_a-z0-9]{1,255}$"
- },
- "tenant_collection_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "remote_version" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "id", "name", "slug", "is_active", "member_count", "attributes", "tenant_collection_id" ],
- "additionalProperties" : false
+ "required" : [ "has_changes", "remote_version", "local_version", "cached" ]
}
}
}
@@ -31277,84 +25856,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/tenant" ]
- }
- },
- "/api/ee/transforms-python/library/{path}" : {
- "get" : {
- "operationId" : "get-api-ee-transforms-python-library-path",
- "summary" : "GET /api/ee/transforms-python/library/{path}",
- "description" : "Get the Python library for user modules.",
- "parameters" : [ {
- "in" : "path",
- "name" : "path",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/ee/transforms-python" ]
- },
- "put" : {
- "operationId" : "put-api-ee-transforms-python-library-path",
- "summary" : "PUT /api/ee/transforms-python/library/{path}",
- "description" : "Update the Python library source code for user modules.",
- "parameters" : [ {
- "in" : "path",
- "name" : "path",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "source" : {
- "type" : "string"
- }
- },
- "required" : [ "source" ],
- "additionalProperties" : false
- }
- }
- }
- },
- "tags" : [ "/api/ee/transforms-python" ]
+ "tags" : [ "/api/ee/remote-sync" ]
}
},
- "/api/ee/transforms-python/test-run" : {
+ "/api/ee/remote-sync/import" : {
"post" : {
- "operationId" : "post-api-ee-transforms-python-test-run",
- "summary" : "POST /api/ee/transforms-python/test-run",
- "description" : "Evaluate an ad-hoc python transform on a sample of input data.\n Intended for short runs for early feedback. Input/output/timeout limits apply.",
+ "operationId" : "post-api-ee-remote-sync-import",
+ "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" : {
@@ -31364,42 +25873,26 @@
"schema" : {
"type" : "object",
"properties" : {
- "error" : {
- "type" : "object",
- "properties" : {
- "message" : {
- "anyOf" : [ { }, { } ]
- }
- },
- "required" : [ "message" ]
+ "message" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
},
- "logs" : {
- "type" : "string"
+ "status" : {
+ "const" : "success"
},
- "output" : {
- "type" : "object",
- "properties" : {
- "cols" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "name" ]
- }
- },
- "rows" : {
- "type" : "array",
- "items" : { }
- }
- },
- "required" : [ "cols", "rows" ]
+ "task_id" : {
+ "oneOf" : [ {
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "logs" ]
+ "required" : [ "status", "task_id" ]
}
}
}
@@ -31417,69 +25910,40 @@
"schema" : {
"type" : "object",
"properties" : {
- "code" : {
- "type" : "string"
- },
- "output_row_limit" : {
- "allOf" : [ {
- "type" : "integer"
- }, {
- "type" : "number",
- "exclusiveMinimum" : 1
- }, {
- "type" : "number",
- "maximum" : 100
- } ]
- },
- "per_input_row_limit" : {
- "allOf" : [ {
- "type" : "integer"
- }, {
- "type" : "number",
- "exclusiveMinimum" : 1
- }, {
- "type" : "number",
- "maximum" : 100
- } ]
+ "branch" : {
+ "type" : "string",
+ "minLength" : 1
},
- "source_tables" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.transforms-base.util.source-table-entry"
- },
- "minItems" : 1
+ "force" : {
+ "type" : "boolean"
}
- },
- "required" : [ "code", "source_tables" ]
+ }
}
}
}
},
- "tags" : [ "/api/ee/transforms-python" ]
+ "tags" : [ "/api/ee/remote-sync" ]
}
},
- "/api/ee/transforms/{id}/inspect" : {
+ "/api/ee/remote-sync/is-dirty" : {
"get" : {
- "operationId" : "get-api-ee-transforms-id-inspect",
- "summary" : "GET /api/ee/transforms/{id}/inspect",
- "description" : "Phase 1: Discover available lenses for a transform.\n Returns structural metadata and available lens types.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- } ],
+ "operationId" : "get-api-ee-remote-sync-is-dirty",
+ "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",
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.transforms-inspector.schema.discovery-response"
+ "type" : "object",
+ "properties" : {
+ "is_dirty" : {
+ "type" : "boolean"
+ }
+ },
+ "required" : [ "is_dirty" ]
}
}
}
@@ -31491,39 +25955,32 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/transforms" ]
+ "tags" : [ "/api/ee/remote-sync" ]
}
},
- "/api/ee/transforms/{id}/inspect/{lens-id}" : {
- "get" : {
- "operationId" : "get-api-ee-transforms-id-inspect-lens-id",
- "summary" : "GET /api/ee/transforms/{id}/inspect/{lens-id}",
- "description" : "Phase 2: Get full lens contents for a transform.\n Returns sections, cards with dataset_query, and trigger definitions.\n Accepts optional params for drill lenses as query params.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- }, {
- "in" : "path",
- "name" : "lens-id",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
+ "/api/ee/remote-sync/settings" : {
+ "put" : {
+ "operationId" : "put-api-ee-remote-sync-settings",
+ "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",
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.transforms-inspector.schema.lens"
+ "type" : "object",
+ "properties" : {
+ "success" : {
+ "type" : "boolean"
+ },
+ "task_id" : {
+ "type" : "integer",
+ "minimum" : 1
+ }
+ },
+ "required" : [ "success" ]
}
}
}
@@ -31535,39 +25992,99 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/transforms" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "collections" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "boolean"
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "remote-sync-auto-import" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "remote-sync-branch" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "remote-sync-token" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "remote-sync-transforms" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "remote-sync-type" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "enum" : [ "read-only", "read-write" ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "remote-sync-url" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/remote-sync" ]
}
},
- "/api/ee/transforms/{id}/inspect/{lens-id}/query" : {
+ "/api/ee/remote-sync/stash" : {
"post" : {
- "operationId" : "post-api-ee-transforms-id-inspect-lens-id-query",
- "summary" : "POST /api/ee/transforms/{id}/inspect/{lens-id}/query",
- "description" : "Execute a query in the context of a transform inspector lens.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- }, {
- "in" : "path",
- "name" : "lens-id",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
+ "operationId" : "post-api-ee-remote-sync-stash",
+ "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" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase.query-processor.schema.query-result"
+ "type" : "object",
+ "properties" : {
+ "message" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string"
+ },
+ "task_id" : {
+ "type" : "integer",
+ "minimum" : 1
+ }
+ },
+ "required" : [ "status", "message", "task_id" ]
}
}
}
@@ -31585,44 +26102,39 @@
"schema" : {
"type" : "object",
"properties" : {
- "lens_params" : {
- "oneOf" : [ {
- "type" : "object",
- "additionalProperties" : { }
- }, {
- "type" : "null"
- } ]
+ "message" : {
+ "type" : "string",
+ "minLength" : 1
},
- "query" : {
- "type" : "object",
- "properties" : {
- "database" : {
- "oneOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
- }
- }
+ "new_branch" : {
+ "type" : "string",
+ "minLength" : 1
}
},
- "required" : [ "query" ]
+ "required" : [ "new_branch", "message" ]
}
}
}
},
- "tags" : [ "/api/ee/transforms" ]
+ "tags" : [ "/api/ee/remote-sync" ]
}
},
- "/api/ee/upload-management/tables" : {
- "get" : {
- "operationId" : "get-api-ee-upload-management-tables",
- "summary" : "GET /api/ee/upload-management/tables",
- "description" : "Get all `Tables` visible to the current user which were created by uploading a file.",
+ "/api/ee/replacement/check-replace-source" : {
+ "post" : {
+ "operationId" : "post-api-ee-replacement-check-replace-source",
+ "summary" : "POST /api/ee/replacement/check-replace-source",
+ "description" : "Check whether a source entity can be replaced by a target entity. Returns compatibility\n errors describing column mismatches, type mismatches, primary key mismatches, and foreign\n key mismatches.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.check-replace-source-response"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -31631,55 +26143,38 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/upload-management" ]
- }
- },
- "/api/ee/upload-management/tables/{id}" : {
- "delete" : {
- "operationId" : "delete-api-ee-upload-management-tables-id",
- "summary" : "DELETE /api/ee/upload-management/tables/{id}",
- "description" : "Delete the uploaded table from the database, optionally archiving cards for which it is the primary source.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- }, {
- "in" : "query",
- "name" : "archive-cards",
- "required" : false,
- "schema" : {
- "default" : false,
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- } ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "source_entity_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-id"
+ },
+ "source_entity_type" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-type"
+ },
+ "target_entity_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-id"
+ },
+ "target_entity_type" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-type"
+ }
+ },
+ "required" : [ "source_entity_id", "source_entity_type", "target_entity_id", "target_entity_type" ]
+ }
+ }
}
},
- "tags" : [ "/api/ee/upload-management" ]
+ "tags" : [ "/api/ee/replacement" ]
}
},
- "/api/ee/workspace" : {
- "get" : {
- "operationId" : "get-api-ee-workspace",
- "summary" : "GET /api/ee/workspace",
- "description" : "Get a list of all workspaces",
+ "/api/ee/replacement/replace-model-with-transform" : {
+ "post" : {
+ "operationId" : "post-api-ee-replacement-replace-model-with-transform",
+ "summary" : "POST /api/ee/replacement/replace-model-with-transform",
+ "description" : "Create a transform from a model, execute it, and replace all usages of the model\n with the output table. Un-persists the model and converts it to a saved question.\n Returns 202 with a run_id for polling.\n\n If there is an error during the transform execution, no replacement will be\n performed and the model will remain unchanged.\n\n If there is an error during the source swap, the transform and the output\n table will be retained, and the model will remain unchanged. We cannot delete\n the transform or the output table because they can be used by other queries at\n this point.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -31689,50 +26184,21 @@
"schema" : {
"type" : "object",
"properties" : {
- "items" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "database_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string"
- },
- "status" : {
- "type" : "string",
- "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
- },
- "updated_at" : {
- "type" : "string",
- "format" : "date-time"
- }
- },
- "required" : [ "id", "database_id", "name", "status", "updated_at" ],
- "additionalProperties" : false
- }
- },
- "limit" : {
- "oneOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
+ "body" : {
+ "type" : "object",
+ "properties" : {
+ "run_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.run-id"
+ }
+ },
+ "required" : [ "run_id" ],
+ "additionalProperties" : false
},
- "offset" : {
- "oneOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
+ "status" : {
+ "const" : 202
}
},
- "required" : [ "items", "limit", "offset" ],
- "additionalProperties" : false
+ "required" : [ "status", "body" ]
}
}
}
@@ -31744,47 +26210,78 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
- },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "card_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-id"
+ },
+ "target_collection_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "transform_name" : {
+ "type" : "string"
+ },
+ "transform_tag_ids" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "integer",
+ "minimum" : 1
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "transform_target" : {
+ "type" : "object",
+ "properties" : { }
+ }
+ },
+ "required" : [ "card_id", "transform_name", "transform_target" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/replacement" ]
+ }
+ },
+ "/api/ee/replacement/replace-source" : {
"post" : {
- "operationId" : "post-api-ee-workspace",
- "summary" : "POST /api/ee/workspace",
- "description" : "Create a new workspace\n\n Potential payload:\n {:name \"a\" :database_id 2}}",
+ "operationId" : "post-api-ee-replacement-replace-source",
+ "summary" : "POST /api/ee/replacement/replace-source",
+ "description" : "Replace all usages of a source entity with a target entity asynchronously.\n Returns 202 with a run_id for polling. Returns 409 if a replacement is already running.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "collection_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "created_at" : {
- "type" : "string",
- "format" : "date-time"
- },
- "database_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "body" : {
+ "type" : "object",
+ "properties" : {
+ "run_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.run-id"
+ }
+ },
+ "required" : [ "run_id" ],
+ "additionalProperties" : false
},
"status" : {
- "type" : "string",
- "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
- },
- "updated_at" : {
- "type" : "string",
- "format" : "date-time"
+ "const" : 202
}
},
- "required" : [ "id", "name", "collection_id", "database_id", "status", "created_at", "updated_at" ]
+ "required" : [ "status", "body" ]
}
}
}
@@ -31802,35 +26299,43 @@
"schema" : {
"type" : "object",
"properties" : {
- "database_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "source_entity_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-id"
},
- "name" : {
- "type" : "string",
- "minLength" : 1
+ "source_entity_type" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-type"
+ },
+ "target_entity_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-id"
+ },
+ "target_entity_type" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.source-entity-type"
}
- }
+ },
+ "required" : [ "source_entity_id", "source_entity_type", "target_entity_id", "target_entity_type" ]
}
}
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/replacement" ]
}
},
- "/api/ee/workspace/checkout" : {
+ "/api/ee/replacement/runs" : {
"get" : {
- "operationId" : "get-api-ee-workspace-checkout",
- "summary" : "GET /api/ee/workspace/checkout",
- "description" : "Get checkout status for a global transform.\n\n Returns:\n - checkout_disabled: Why this transform cannot be checked out (nil if allowed)\n - workspaces: All workspaces for this transform's database, with checkout status\n - transforms: (DEPRECATED) Use :workspaces instead",
+ "operationId" : "get-api-ee-replacement-runs",
+ "summary" : "GET /api/ee/replacement/runs",
+ "description" : "List replacement runs, optionally filtered by is-active.",
"parameters" : [ {
"in" : "query",
- "name" : "transform-id",
- "required" : true,
+ "name" : "is-active",
+ "required" : false,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
} ],
"responses" : {
"2XX" : {
@@ -31838,82 +26343,10 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "checkout_disabled" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "mbql", "card-reference", "unknown-type" ]
- }, {
- "type" : "null"
- } ]
- },
- "transforms" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- },
- "name" : {
- "type" : "string"
- },
- "workspace" : {
- "type" : "object",
- "properties" : {
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name" ]
- }
- },
- "required" : [ "id", "name", "workspace" ]
- }
- },
- "workspaces" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "existing" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "name" : {
- "type" : "string"
- },
- "ref_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- },
- "required" : [ "ref_id", "name" ]
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string"
- },
- "status" : {
- "type" : "string",
- "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
- }
- },
- "required" : [ "id", "name", "status", "existing" ]
- }
- }
- },
- "required" : [ "checkout_disabled", "workspaces", "transforms" ]
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.run"
+ }
}
}
}
@@ -31925,15 +26358,56 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/replacement" ]
}
},
- "/api/ee/workspace/database" : {
+ "/api/ee/replacement/runs/{id}" : {
"get" : {
- "operationId" : "get-api-ee-workspace-database",
- "summary" : "GET /api/ee/workspace/database",
- "description" : "Get a list supported databases, and whether they're enabled and have required permissions.",
- "parameters" : [ ],
+ "operationId" : "get-api-ee-replacement-runs-id",
+ "summary" : "GET /api/ee/replacement/runs/{id}",
+ "description" : "Get the status of a source replacement run.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.run-id"
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.run"
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/replacement" ]
+ }
+ },
+ "/api/ee/replacement/runs/{id}/cancel" : {
+ "post" : {
+ "operationId" : "post-api-ee-replacement-runs-id-cancel",
+ "summary" : "POST /api/ee/replacement/runs/{id}/cancel",
+ "description" : "Cancel a running source replacement.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.replacement.schema.run-id"
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response",
@@ -31942,43 +26416,11 @@
"schema" : {
"type" : "object",
"properties" : {
- "databases" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "enabled" : {
- "type" : "boolean"
- },
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "name" : {
- "type" : "string"
- },
- "permissions_status" : {
- "type" : "object",
- "properties" : {
- "checked_at" : {
- "type" : "string"
- },
- "error" : {
- "type" : "string"
- },
- "status" : {
- "type" : "string"
- }
- },
- "required" : [ "status", "checked_at" ]
- }
- },
- "required" : [ "id", "name", "enabled" ]
- }
+ "success" : {
+ "type" : "boolean"
}
},
- "required" : [ "databases" ]
+ "required" : [ "success" ]
}
}
}
@@ -31990,43 +26432,94 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/replacement" ]
+ }
+ },
+ "/api/ee/scim/api_key" : {
+ "get" : {
+ "operationId" : "get-api-ee-scim-api_key",
+ "summary" : "GET /api/ee/scim/api_key",
+ "description" : "Fetch the SCIM API key if one exists. Does *not* return an unmasked key, since we don't have access\n to that after it is created.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/scim" ]
+ },
+ "post" : {
+ "operationId" : "post-api-ee-scim-api_key",
+ "summary" : "POST /api/ee/scim/api_key",
+ "description" : "Create a new SCIM API key, or refresh one that already exists. When called for the first time,\n this is equivalent to enabling SCIM.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/scim" ]
}
},
- "/api/ee/workspace/enabled" : {
+ "/api/ee/scim/v2/Groups" : {
"get" : {
- "operationId" : "get-api-ee-workspace-enabled",
- "summary" : "GET /api/ee/workspace/enabled",
- "description" : "Test whether the current user can use Workspaces. Optionally takes a specific database.\n Factors include: driver support, database user privileges, metabase permissions.",
+ "operationId" : "get-api-ee-scim-v2-Groups",
+ "summary" : "GET /api/ee/scim/v2/Groups",
+ "description" : "Fetch a list of groups.",
"parameters" : [ {
"in" : "query",
- "name" : "database-id",
+ "name" : "startIndex",
"required" : false,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "count",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "filter",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "reason" : {
- "type" : "string"
- },
- "supported" : {
- "type" : "boolean"
- }
- },
- "required" : [ "supported" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -32035,61 +26528,16 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
- }
- },
- "/api/ee/workspace/{ws-id}" : {
- "get" : {
- "operationId" : "get-api-ee-workspace-ws-id",
- "summary" : "GET /api/ee/workspace/{ws-id}",
- "description" : "Get a single workspace by ID",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- } ],
+ "tags" : [ "/api/ee/scim/v2" ]
+ },
+ "post" : {
+ "operationId" : "post-api-ee-scim-v2-Groups",
+ "summary" : "POST /api/ee/scim/v2/Groups",
+ "description" : "Create a single group, and populates it if necessary.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "collection_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "created_at" : {
- "type" : "string",
- "format" : "date-time"
- },
- "database_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string"
- },
- "status" : {
- "type" : "string",
- "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
- },
- "updated_at" : {
- "type" : "string",
- "format" : "date-time"
- }
- },
- "required" : [ "id", "name", "collection_id", "database_id", "status", "created_at", "updated_at" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -32098,59 +26546,88 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
- },
- "put" : {
- "operationId" : "put-api-ee-workspace-ws-id",
- "summary" : "PUT /api/ee/workspace/{ws-id}",
- "description" : "Update simple workspace properties.\n\n Can set database_id only on uninitialized workspaces.",
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "displayName" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "id" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "members" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "$ref" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "value" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "value" ]
+ }
+ },
+ "schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }
+ },
+ "required" : [ "schemas", "displayName" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/scim/v2" ]
+ }
+ },
+ "/api/ee/scim/v2/Groups/{id}" : {
+ "get" : {
+ "operationId" : "get-api-ee-scim-v2-Groups-id",
+ "summary" : "GET /api/ee/scim/v2/Groups/{id}",
+ "description" : "Fetch a single group.",
"parameters" : [ {
"in" : "path",
- "name" : "ws-id",
+ "name" : "id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "type" : "string",
+ "minLength" : 1
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "collection_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "created_at" : {
- "type" : "string",
- "format" : "date-time"
- },
- "database_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string"
- },
- "status" : {
- "type" : "string",
- "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
- },
- "updated_at" : {
- "type" : "string",
- "format" : "date-time"
- }
- },
- "required" : [ "id", "name", "collection_id", "database_id", "status", "created_at", "updated_at" ]
- }
- }
- }
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/scim/v2" ]
+ },
+ "put" : {
+ "operationId" : "put-api-ee-scim-v2-Groups-id",
+ "summary" : "PUT /api/ee/scim/v2/Groups/{id}",
+ "description" : "Update a group.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -32165,51 +26642,62 @@
"schema" : {
"type" : "object",
"properties" : {
- "database_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "displayName" : {
+ "type" : "string",
+ "minLength" : 1
},
- "name" : {
+ "id" : {
"type" : "string",
"minLength" : 1
+ },
+ "members" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "$ref" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "value" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "value" ]
+ }
+ },
+ "schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
}
},
- "additionalProperties" : false
+ "required" : [ "schemas", "displayName" ]
}
}
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/scim/v2" ]
},
"delete" : {
- "operationId" : "delete-api-ee-workspace-ws-id",
- "summary" : "DELETE /api/ee/workspace/{ws-id}",
- "description" : "Delete a workspace and all its contents, including mirrored entities.",
+ "operationId" : "delete-api-ee-scim-v2-Groups-id",
+ "summary" : "DELETE /api/ee/scim/v2/Groups/{id}",
+ "description" : "Delete a group.",
"parameters" : [ {
"in" : "path",
- "name" : "ws-id",
+ "name" : "id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "type" : "string",
+ "minLength" : 1
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "ok" : {
- "const" : true
- }
- },
- "required" : [ "ok" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -32218,130 +26706,193 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/scim/v2" ]
}
},
- "/api/ee/workspace/{ws-id}/archive" : {
- "post" : {
- "operationId" : "post-api-ee-workspace-ws-id-archive",
- "summary" : "POST /api/ee/workspace/{ws-id}/archive",
- "description" : "Archive a workspace. Deletes the isolated schema and tables, but preserves mirrored entities.",
+ "/api/ee/scim/v2/Users" : {
+ "get" : {
+ "operationId" : "get-api-ee-scim-v2-Users",
+ "summary" : "GET /api/ee/scim/v2/Users",
+ "description" : "Fetch a list of users.",
"parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
+ "in" : "query",
+ "name" : "startIndex",
+ "required" : false,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "count",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "filter",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "collection_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "created_at" : {
- "type" : "string",
- "format" : "date-time"
- },
- "database_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string"
- },
- "status" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/scim/v2" ]
+ },
+ "post" : {
+ "operationId" : "post-api-ee-scim-v2-Users",
+ "summary" : "POST /api/ee/scim/v2/Users",
+ "description" : "Create a single user.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "active" : {
+ "type" : "boolean"
+ },
+ "emails" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "primary" : {
+ "type" : "boolean"
+ },
+ "type" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "value" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "value" ]
+ }
+ },
+ "groups" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "$ref" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "display" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "value" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "value", "display" ]
+ }
+ },
+ "id" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "locale" : {
+ "oneOf" : [ {
"type" : "string",
- "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "object",
+ "properties" : {
+ "familyName" : {
+ "type" : "string"
+ },
+ "givenName" : {
+ "type" : "string"
+ }
},
- "updated_at" : {
+ "required" : [ "givenName", "familyName" ]
+ },
+ "schemas" : {
+ "type" : "array",
+ "items" : {
"type" : "string",
- "format" : "date-time"
+ "minLength" : 1
}
},
- "required" : [ "id", "name", "collection_id", "database_id", "status", "created_at", "updated_at" ]
- }
+ "userName" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "schemas", "userName", "name", "emails" ]
}
}
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/scim/v2" ]
}
},
- "/api/ee/workspace/{ws-id}/external/transform" : {
+ "/api/ee/scim/v2/Users/{id}" : {
"get" : {
- "operationId" : "get-api-ee-workspace-ws-id-external-transform",
- "summary" : "GET /api/ee/workspace/{ws-id}/external/transform",
- "description" : "Get transforms that are external to the workspace, i.e. no matching workspace_transform row exists.",
+ "operationId" : "get-api-ee-scim-v2-Users-id",
+ "summary" : "GET /api/ee/scim/v2/Users/{id}",
+ "description" : "Fetch a single user.",
"parameters" : [ {
"in" : "path",
- "name" : "ws-id",
+ "name" : "id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "query",
- "name" : "database-id",
- "required" : false,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "type" : "string",
+ "minLength" : 1
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "transforms" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "checkout_disabled" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string"
- },
- "source_type" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name", "source_type", "checkout_disabled" ]
- }
- }
- },
- "required" : [ "transforms" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -32350,98 +26901,203 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
- }
- },
- "/api/ee/workspace/{ws-id}/graph" : {
- "get" : {
- "operationId" : "get-api-ee-workspace-ws-id-graph",
- "summary" : "GET /api/ee/workspace/{ws-id}/graph",
- "description" : "Display the dependency graph between the Changeset and the (potentially external) entities that they depend on.",
+ "tags" : [ "/api/ee/scim/v2" ]
+ },
+ "put" : {
+ "operationId" : "put-api-ee-scim-v2-Users-id",
+ "summary" : "PUT /api/ee/scim/v2/Users/{id}",
+ "description" : "Update a user.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "active" : {
+ "type" : "boolean"
+ },
+ "emails" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "primary" : {
+ "type" : "boolean"
+ },
+ "type" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "value" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "value" ]
+ }
+ },
+ "groups" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "$ref" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "display" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "value" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "value", "display" ]
+ }
+ },
+ "id" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "locale" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "object",
+ "properties" : {
+ "familyName" : {
+ "type" : "string"
+ },
+ "givenName" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "givenName", "familyName" ]
+ },
+ "schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "userName" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "schemas", "userName", "name", "emails" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/scim/v2" ]
+ },
+ "patch" : {
+ "operationId" : "patch-api-ee-scim-v2-Users-id",
+ "summary" : "PATCH /api/ee/scim/v2/Users/{id}",
+ "description" : "Activate or deactivate a user. Supports specific replace operations, but not arbitrary patches.",
"parameters" : [ {
"in" : "path",
- "name" : "ws-id",
+ "name" : "id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "type" : "string",
+ "minLength" : 1
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "edges" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "from_entity_id" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- } ]
- },
- "from_entity_type" : {
- "type" : "string"
- },
- "to_entity_id" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- } ]
- },
- "to_entity_type" : {
- "type" : "string"
- }
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "Operations" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "op" : {
+ "type" : "string",
+ "minLength" : 1
},
- "required" : [ "from_entity_id", "from_entity_type", "to_entity_id", "to_entity_type" ]
- }
- },
- "nodes" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "data" : {
- "type" : "object",
- "properties" : { }
- },
- "dependents_count" : {
+ "value" : {
+ "anyOf" : [ {
"type" : "object",
"additionalProperties" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "anyOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "boolean"
+ } ]
}
- },
- "id" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- } ]
- },
- "type" : {
+ }, {
"type" : "string",
- "enum" : [ "input-table", "external-transform", "workspace-transform" ]
- }
- },
- "required" : [ "id", "type", "dependents_count", "data" ]
- }
+ "minLength" : 1
+ }, {
+ "type" : "boolean"
+ } ]
+ }
+ },
+ "required" : [ "op", "value" ]
}
},
- "required" : [ "nodes", "edges" ]
- }
+ "schemas" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }
+ },
+ "required" : [ "schemas", "Operations" ]
}
}
+ }
+ },
+ "tags" : [ "/api/ee/scim/v2" ]
+ }
+ },
+ "/api/ee/semantic-search/status" : {
+ "get" : {
+ "operationId" : "get-api-ee-semantic-search-status",
+ "summary" : "GET /api/ee/semantic-search/status",
+ "description" : "Fetch the indexing status of the currently active semantic search index table.\n\n Returns a map with keys:\n :indexed_count <number of indexed items>\n :total_est <estimated total number of items to index>\n\n If no index is active, returns an empty map.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -32450,83 +27106,155 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/semantic-search" ]
}
},
- "/api/ee/workspace/{ws-id}/input/grant" : {
+ "/api/ee/serialization/export" : {
"post" : {
- "operationId" : "post-api-ee-workspace-ws-id-input-grant",
- "summary" : "POST /api/ee/workspace/{ws-id}/input/grant",
- "description" : "Grant read access to input tables by table coordinates. Superuser only.\n Idempotent - returns which tables were already granted vs newly granted.",
+ "operationId" : "post-api-ee-serialization-export",
+ "summary" : "POST /api/ee/serialization/export",
+ "description" : "Serialize and retrieve Metabase instance.\n\n Outputs `.tar.gz` file with serialization results and an `export.log` file.\n On error outputs serialization logs directly.",
"parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
+ "in" : "query",
+ "name" : "dirname",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : "name of directory and archive file (default: `<instance-name>-<YYYY-MM-dd_HH-mm>`)"
+ }, {
+ "in" : "query",
+ "name" : "collection",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "anyOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "string",
+ "pattern" : "^.{21}$"
+ }, {
+ "type" : "string",
+ "pattern" : "^eid:.{21}$"
+ } ]
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : "collections' db ids/entity-ids to serialize"
+ }, {
+ "in" : "query",
+ "name" : "all_collections",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "default" : true,
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "settings",
+ "required" : true,
+ "schema" : {
+ "default" : true,
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "data_model",
+ "required" : true,
+ "schema" : {
+ "default" : true,
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "field_values",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "database_secrets",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "continue_on_error",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "full_stacktrace",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "type" : "boolean"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "already_granted" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "db_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "table" : {
- "type" : "string"
- }
- },
- "required" : [ "db_id", "schema", "table" ]
- }
- },
- "newly_granted" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "db_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "table" : {
- "type" : "string"
- }
- },
- "required" : [ "db_id", "schema", "table" ]
- }
- }
- },
- "required" : [ "already_granted", "newly_granted" ]
- }
- }
- }
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/serialization" ]
+ }
+ },
+ "/api/ee/serialization/import" : {
+ "post" : {
+ "operationId" : "post-api-ee-serialization-import",
+ "summary" : "POST /api/ee/serialization/import",
+ "description" : "Deserialize Metabase instance from an archive generated by /export.\n\n Parameters:\n - `file`: archive encoded as `multipart/form-data` (required).\n\n Returns logs of deserialization.",
+ "parameters" : [ {
+ "in" : "query",
+ "name" : "continue_on_error",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "full_stacktrace",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "reindex",
+ "required" : true,
+ "schema" : {
+ "default" : true,
+ "type" : "boolean"
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -32537,91 +27265,96 @@
},
"requestBody" : {
"content" : {
- "application/json" : {
+ "multipart/form-data" : {
"schema" : {
"type" : "object",
"properties" : {
- "tables" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "db_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "table" : {
- "type" : "string"
- }
+ "file" : {
+ "description" : ".tgz with serialization data",
+ "type" : "object",
+ "properties" : {
+ "content-type" : {
+ "type" : "string"
},
- "required" : [ "db_id", "schema", "table" ]
- }
+ "filename" : {
+ "type" : "string"
+ },
+ "size" : {
+ "type" : "integer"
+ },
+ "tempfile" : { }
+ },
+ "required" : [ "content-type", "filename", "size", "tempfile" ],
+ "additionalProperties" : false
}
},
- "required" : [ "tables" ]
+ "required" : [ "file" ]
}
}
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/serialization" ]
}
},
- "/api/ee/workspace/{ws-id}/input/pending" : {
+ "/api/ee/stale/{id}" : {
"get" : {
- "operationId" : "get-api-ee-workspace-ws-id-input-pending",
- "summary" : "GET /api/ee/workspace/{ws-id}/input/pending",
- "description" : "List all input tables that haven't been granted access yet, excluding tables shadowed by workspace outputs.",
+ "operationId" : "get-api-ee-stale-id",
+ "summary" : "GET /api/ee/stale/{id}",
+ "description" : "A flexible endpoint that returns stale entities, in the same shape as collections/items, with the following options:\n - `before_date` - only return entities that were last edited before this date (default: 6 months ago)\n - `is_recursive` - if true, return entities from all children of the collection, not just the direct children (default: false)\n - `sort_column` - the column to sort by (default: name)\n - `sort_direction` - the direction to sort by (default: asc)",
"parameters" : [ {
"in" : "path",
- "name" : "ws-id",
+ "name" : "id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "anyOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "const" : "root"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "before_date",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "is_recursive",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "sort_column",
+ "required" : true,
+ "schema" : {
+ "default" : "name",
+ "type" : "string",
+ "enum" : [ "name", "last_used_at" ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "sort_direction",
+ "required" : true,
+ "schema" : {
+ "default" : "asc",
+ "type" : "string",
+ "enum" : [ "asc", "desc" ]
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "inputs" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "db_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "table" : {
- "type" : "string"
- }
- },
- "required" : [ "db_id", "schema", "table" ]
- }
- }
- },
- "required" : [ "inputs" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -32630,88 +27363,22 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/stale" ]
}
},
- "/api/ee/workspace/{ws-id}/log" : {
- "get" : {
- "operationId" : "get-api-ee-workspace-ws-id-log",
- "summary" : "GET /api/ee/workspace/{ws-id}/log",
- "description" : "Get workspace creation status and recent log entries for polling during async setup",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- } ],
+ "/api/ee/support-access-grant" : {
+ "post" : {
+ "operationId" : "post-api-ee-support-access-grant",
+ "summary" : "POST /api/ee/support-access-grant",
+ "description" : "Create a new support access grant.\n\n Requires superuser permissions. Only one active grant can exist at a time.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "last_completed_at" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- },
- "logs" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "completed_at" : {
- "oneOf" : [ { }, {
- "type" : "null"
- } ]
- },
- "description" : { },
- "id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "message" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "started_at" : { },
- "status" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "task" : {
- "type" : "string"
- },
- "updated_at" : { }
- },
- "required" : [ "id", "task", "description", "started_at", "updated_at", "completed_at", "status", "message" ]
- }
- },
- "status" : {
- "type" : "string",
- "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
- },
- "updated_at" : { },
- "workspace_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }
- },
- "required" : [ "workspace_id", "status", "updated_at", "last_completed_at", "logs" ]
+ "$ref" : "#/components/schemas/metabase-enterprise.support-access-grants.schema.grant-response"
}
}
}
@@ -32723,20 +27390,55 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
- }
- },
- "/api/ee/workspace/{ws-id}/merge" : {
- "post" : {
- "operationId" : "post-api-ee-workspace-ws-id-merge",
- "summary" : "POST /api/ee/workspace/{ws-id}/merge",
- "description" : "This will:\n 1. Update original transforms with workspace versions\n 2. Archive the workspace and clean up isolated resources\n Returns a report of merged entities, or error in errors key.\n\n Request body may include:\n - commit-message: A description of what changes are being merged (optional, will be required in future)",
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.support-access-grants.schema.create-grant-request"
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/support-access-grant" ]
+ },
+ "get" : {
+ "operationId" : "get-api-ee-support-access-grant",
+ "summary" : "GET /api/ee/support-access-grant",
+ "description" : "List support access grants with optional filtering and pagination.\n\n Requires superuser permissions.\n\n Query parameters:\n - ticket-number: Filter by ticket number\n - user-id: Filter by user who created the grant\n - include-revoked: Include revoked grants (default false)",
"parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
+ "in" : "query",
+ "name" : "ticket-number",
+ "required" : false,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "user-id",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }, {
+ "in" : "query",
+ "name" : "include-revoked",
+ "required" : false,
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
}
} ],
"responses" : {
@@ -32745,78 +27447,7 @@
"content" : {
"application/json" : {
"schema" : {
- "anyOf" : [ {
- "type" : "object",
- "properties" : {
- "errors" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "global_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "op" : {
- "type" : "string",
- "enum" : [ "create", "delete", "update", "noop" ]
- },
- "ref_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- },
- "required" : [ "op", "ref_id" ]
- }
- },
- "merged" : {
- "type" : "object",
- "properties" : {
- "transforms" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "global_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "op" : {
- "type" : "string",
- "enum" : [ "create", "delete", "update", "noop" ]
- },
- "ref_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- },
- "required" : [ "op", "ref_id" ]
- }
- }
- },
- "required" : [ "transforms" ]
- },
- "workspace" : {
- "type" : "object",
- "properties" : {
- "id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "name" ]
- }
- },
- "required" : [ "merged", "errors", "workspace" ]
- }, {
- "type" : "string"
- } ]
+ "$ref" : "#/components/schemas/metabase-enterprise.support-access-grants.schema.list-grants-response"
}
}
}
@@ -32828,49 +27459,22 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "commit-message" : {
- "type" : "string",
- "minLength" : 1
- }
- }
- }
- }
- }
- },
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/support-access-grant" ]
}
},
- "/api/ee/workspace/{ws-id}/problem" : {
+ "/api/ee/support-access-grant/current" : {
"get" : {
- "operationId" : "get-api-ee-workspace-ws-id-problem",
- "summary" : "GET /api/ee/workspace/{ws-id}/problem",
- "description" : "Detect problems in the workspace that would affect downstream transforms after merge.\n\n Returns a list of problems, each with:\n - category: the problem category (e.g. 'unused', 'internal-downstream', 'external-downstream')\n - problem: the specific problem (e.g. 'not-run', 'stale', 'removed-field')\n - severity: :error, :warning, or :info\n - block-merge: whether this problem prevents merging\n - data: extra information, shape depends on the problem type\n\n See `metabase-enterprise.workspaces.types/problem-types` for the full list.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- } ],
+ "operationId" : "get-api-ee-support-access-grant-current",
+ "summary" : "GET /api/ee/support-access-grant/current",
+ "description" : "Get the currently active support access grant, if one exists.\n\n Requires superuser permissions.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.problem"
- }
+ "$ref" : "#/components/schemas/metabase-enterprise.support-access-grants.schema.current-grant-response"
}
}
}
@@ -32882,21 +27486,23 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/support-access-grant" ]
}
},
- "/api/ee/workspace/{ws-id}/query" : {
- "post" : {
- "operationId" : "post-api-ee-workspace-ws-id-query",
- "summary" : "POST /api/ee/workspace/{ws-id}/query",
- "description" : "Execute an arbitrary SQL query in the workspace's isolated database context.\n Table references are remapped to isolated workspace tables.\n Returns the first 2000 rows of query results.",
+ "/api/ee/support-access-grant/{id}/revoke" : {
+ "put" : {
+ "operationId" : "put-api-ee-support-access-grant-id-revoke",
+ "summary" : "PUT /api/ee/support-access-grant/{id}/revoke",
+ "description" : "Revoke an existing support access grant.\n\n Requires superuser permissions. Any admin can revoke any grant.",
"parameters" : [ {
"in" : "path",
- "name" : "ws-id",
+ "name" : "id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -32904,7 +27510,7 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.query-result"
+ "$ref" : "#/components/schemas/metabase-enterprise.support-access-grants.schema.grant-response"
}
}
}
@@ -32916,38 +27522,15 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "sql" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "sql" ]
- }
- }
- }
- },
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/support-access-grant" ]
}
},
- "/api/ee/workspace/{ws-id}/run" : {
+ "/api/ee/tenant" : {
"post" : {
- "operationId" : "post-api-ee-workspace-ws-id-run",
- "summary" : "POST /api/ee/workspace/{ws-id}/run",
- "description" : "Execute all transforms in the workspace in dependency order.\n Returns which transforms succeeded, failed, and were not run.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- } ],
+ "operationId" : "post-api-ee-tenant",
+ "summary" : "POST /api/ee/tenant",
+ "description" : "Create a new Tenant",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response",
@@ -32956,26 +27539,45 @@
"schema" : {
"type" : "object",
"properties" : {
- "failed" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
+ "attributes" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ }, {
+ "type" : "null"
+ } ]
},
- "not_run" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "is_active" : {
+ "type" : "boolean"
+ },
+ "member_count" : {
+ "description" : "value must be an integer.",
+ "type" : "integer"
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "slug" : {
+ "description" : "invalid slug",
+ "type" : "string",
+ "pattern" : "^[-_a-z0-9]{1,255}$"
},
- "succeeded" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
+ "tenant_collection_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}
},
- "required" : [ "succeeded", "failed", "not_run" ]
+ "required" : [ "id", "name", "slug", "is_active", "member_count", "attributes", "tenant_collection_id" ],
+ "additionalProperties" : false
}
}
}
@@ -32993,31 +27595,45 @@
"schema" : {
"type" : "object",
"properties" : {
- "stale_only" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.flag"
+ "attributes" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "additionalProperties" : { }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "slug" : {
+ "description" : "invalid slug",
+ "type" : "string",
+ "pattern" : "^[-_a-z0-9]{1,255}$"
}
- }
+ },
+ "required" : [ "name", "slug" ],
+ "additionalProperties" : false
}
}
}
},
- "tags" : [ "/api/ee/workspace" ]
- }
- },
- "/api/ee/workspace/{ws-id}/table" : {
+ "tags" : [ "/api/ee/tenant" ]
+ },
"get" : {
- "operationId" : "get-api-ee-workspace-ws-id-table",
- "summary" : "GET /api/ee/workspace/{ws-id}/table",
- "description" : "Get workspace tables",
+ "operationId" : "get-api-ee-tenant",
+ "summary" : "GET /api/ee/tenant",
+ "description" : "Get all tenants",
"parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
+ "in" : "query",
+ "name" : "status",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "default" : "all",
+ "type" : "string",
+ "enum" : [ "all", "deactivated", "active" ]
+ }
} ],
"responses" : {
"2XX" : {
@@ -33027,105 +27643,54 @@
"schema" : {
"type" : "object",
"properties" : {
- "inputs" : {
+ "data" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
- "db_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "schema" : {
+ "attributes" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
}, {
"type" : "null"
} ]
},
- "table" : {
- "type" : "string"
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "table_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "db_id", "schema", "table", "table_id" ]
- }
- },
- "outputs" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "db_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "is_active" : {
+ "type" : "boolean"
},
- "global" : {
- "type" : "object",
- "properties" : {
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "table" : {
- "type" : "string"
- },
- "table_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "transform_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "transform_id", "schema", "table", "table_id" ]
+ "member_count" : {
+ "description" : "value must be an integer.",
+ "type" : "integer"
},
- "isolated" : {
- "type" : "object",
- "properties" : {
- "schema" : {
- "type" : "string"
- },
- "table" : {
- "type" : "string"
- },
- "table_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "transform_id" : {
- "anyOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }, {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- } ]
- }
- },
- "required" : [ "transform_id", "schema", "table", "table_id" ]
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "slug" : {
+ "description" : "invalid slug",
+ "type" : "string",
+ "pattern" : "^[-_a-z0-9]{1,255}$"
+ },
+ "tenant_collection_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}
},
- "required" : [ "db_id", "global", "isolated" ]
+ "required" : [ "id", "name", "slug", "is_active", "member_count", "attributes", "tenant_collection_id" ],
+ "additionalProperties" : false
}
}
},
- "required" : [ "inputs", "outputs" ],
+ "required" : [ "data" ],
"additionalProperties" : false
}
}
@@ -33138,21 +27703,23 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/tenant" ]
}
},
- "/api/ee/workspace/{ws-id}/transform" : {
- "post" : {
- "operationId" : "post-api-ee-workspace-ws-id-transform",
- "summary" : "POST /api/ee/workspace/{ws-id}/transform",
- "description" : "Add another transform to the Changeset. This could be a fork of an existing global transform, or something new.",
+ "/api/ee/tenant/{id}" : {
+ "put" : {
+ "operationId" : "put-api-ee-tenant-id",
+ "summary" : "PUT /api/ee/tenant/{id}",
+ "description" : "Update a tenant, can set name, attributes, or whether this tenant is active.",
"parameters" : [ {
"in" : "path",
- "name" : "ws-id",
+ "name" : "id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -33162,71 +27729,45 @@
"schema" : {
"type" : "object",
"properties" : {
- "last_run_at" : { },
- "target_stale" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "last_run_status" : {
+ "attributes" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
}, {
"type" : "null"
} ]
},
- "workspace_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "updated_at" : { },
- "archived_at" : { },
- "source" : {
- "type" : "object",
- "properties" : { }
- },
- "last_run_message" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
},
- "target" : {
- "type" : "object",
- "properties" : { }
+ "is_active" : {
+ "type" : "boolean"
},
- "created_at" : { },
- "global_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
+ "member_count" : {
+ "description" : "value must be an integer.",
+ "type" : "integer"
},
- "creator_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
},
- "ref_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ "slug" : {
+ "description" : "invalid slug",
+ "type" : "string",
+ "pattern" : "^[-_a-z0-9]{1,255}$"
},
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "tenant_collection_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}
},
- "required" : [ "ref_id", "global_id", "name", "description", "source", "target", "target_stale", "workspace_id", "creator_id", "archived_at", "created_at", "updated_at", "last_run_at", "last_run_status", "last_run_message" ]
+ "required" : [ "id", "name", "slug", "is_active", "member_count", "attributes", "tenant_collection_id" ],
+ "additionalProperties" : false
}
}
}
@@ -33244,103 +27785,50 @@
"schema" : {
"type" : "object",
"properties" : {
- "description" : {
+ "attributes" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "object",
+ "additionalProperties" : { }
}, {
"type" : "null"
} ]
},
- "name" : {
- "type" : "string"
- },
- "source" : {
+ "is_active" : {
"oneOf" : [ {
- "type" : "object",
- "properties" : {
- "query" : {
- "$ref" : "#/components/schemas/metabase.queries.schema.query"
- },
- "type" : {
- "const" : "query"
- }
- },
- "required" : [ "type", "query" ]
+ "type" : "boolean"
}, {
- "type" : "object",
- "properties" : {
- "body" : {
- "type" : "string"
- },
- "source-database" : {
- "type" : "integer"
- },
- "source-tables" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.transforms-base.util.source-table-entry"
- }
- },
- "type" : {
- "const" : "python"
- }
- },
- "required" : [ "source-tables", "type", "body" ],
- "additionalProperties" : false
+ "type" : "null"
} ]
},
- "target" : {
- "type" : "object",
- "properties" : {
- "database" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "table_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "type" : {
- "type" : "string",
- "enum" : [ "table" ]
- }
- },
- "required" : [ "type", "name" ],
- "additionalProperties" : false
+ "name" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "name", "source", "target" ]
+ "additionalProperties" : false
}
}
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/tenant" ]
},
"get" : {
- "operationId" : "get-api-ee-workspace-ws-id-transform",
- "summary" : "GET /api/ee/workspace/{ws-id}/transform",
- "description" : "Get all transforms in a workspace.",
+ "operationId" : "get-api-ee-tenant-id",
+ "summary" : "GET /api/ee/tenant/{id}",
+ "description" : "Get info about a tenant",
"parameters" : [ {
"in" : "path",
- "name" : "ws-id",
+ "name" : "id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -33350,45 +27838,45 @@
"schema" : {
"type" : "object",
"properties" : {
- "transforms" : {
- "type" : "array",
- "items" : {
+ "attributes" : {
+ "oneOf" : [ {
"type" : "object",
- "properties" : {
- "creator_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "global_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "ref_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- },
- "source_type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "ref_id", "global_id", "name", "source_type", "creator_id" ],
- "additionalProperties" : false
- }
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "is_active" : {
+ "type" : "boolean"
+ },
+ "member_count" : {
+ "description" : "value must be an integer.",
+ "type" : "integer"
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "slug" : {
+ "description" : "invalid slug",
+ "type" : "string",
+ "pattern" : "^[-_a-z0-9]{1,255}$"
+ },
+ "tenant_collection_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}
},
- "required" : [ "transforms" ]
+ "required" : [ "id", "name", "slug", "is_active", "member_count", "attributes", "tenant_collection_id" ],
+ "additionalProperties" : false
}
}
}
@@ -33400,29 +27888,85 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/tenant" ]
+ }
+ },
+ "/api/ee/transforms-python/library/{path}" : {
+ "get" : {
+ "operationId" : "get-api-ee-transforms-python-library-path",
+ "summary" : "GET /api/ee/transforms-python/library/{path}",
+ "description" : "Get the Python library for user modules.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "path",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/transforms-python" ]
+ },
+ "put" : {
+ "operationId" : "put-api-ee-transforms-python-library-path",
+ "summary" : "PUT /api/ee/transforms-python/library/{path}",
+ "description" : "Update the Python library source code for user modules.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "path",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "source" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "source" ],
+ "additionalProperties" : false
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/transforms-python" ]
}
},
- "/api/ee/workspace/{ws-id}/transform/validate/target" : {
+ "/api/ee/transforms-python/test-run" : {
"post" : {
- "operationId" : "post-api-ee-workspace-ws-id-transform-validate-target",
- "summary" : "POST /api/ee/workspace/{ws-id}/transform/validate/target",
- "description" : "Validate the target table for a workspace transform",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "query",
- "name" : "transform-id",
- "required" : false,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- } ],
+ "operationId" : "post-api-ee-transforms-python-test-run",
+ "summary" : "POST /api/ee/transforms-python/test-run",
+ "description" : "Evaluate an ad-hoc python transform on a sample of input data.\n Intended for short runs for early feedback. Input/output/timeout limits apply.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response",
@@ -33431,18 +27975,42 @@
"schema" : {
"type" : "object",
"properties" : {
- "body" : {
- "anyOf" : [ {
- "type" : "string"
- }, {
- "anyOf" : [ { }, { } ]
- } ]
+ "error" : {
+ "type" : "object",
+ "properties" : {
+ "message" : {
+ "anyOf" : [ { }, { } ]
+ }
+ },
+ "required" : [ "message" ]
},
- "status" : {
- "type" : "integer"
+ "logs" : {
+ "type" : "string"
+ },
+ "output" : {
+ "type" : "object",
+ "properties" : {
+ "cols" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "name" ]
+ }
+ },
+ "rows" : {
+ "type" : "array",
+ "items" : { }
+ }
+ },
+ "required" : [ "cols", "rows" ]
}
},
- "required" : [ "status", "body" ]
+ "required" : [ "logs" ]
}
}
}
@@ -33460,58 +28028,104 @@
"schema" : {
"type" : "object",
"properties" : {
- "db_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "code" : {
+ "type" : "string"
},
- "target" : {
- "type" : "object",
- "properties" : {
- "database" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string"
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "type" : {
- "type" : "string"
- }
+ "output_row_limit" : {
+ "allOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "number",
+ "exclusiveMinimum" : 1
+ }, {
+ "type" : "number",
+ "maximum" : 100
+ } ]
+ },
+ "per_input_row_limit" : {
+ "allOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "number",
+ "exclusiveMinimum" : 1
+ }, {
+ "type" : "number",
+ "maximum" : 100
+ } ]
+ },
+ "source_tables" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.transforms-base.util.source-table-entry"
},
- "required" : [ "type", "schema", "name" ]
+ "minItems" : 1
}
},
- "required" : [ "target" ]
+ "required" : [ "code", "source_tables" ]
}
}
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/transforms-python" ]
}
},
- "/api/ee/workspace/{ws-id}/transform/{tx-id}" : {
+ "/api/ee/transforms/{id}/inspect" : {
"get" : {
- "operationId" : "get-api-ee-workspace-ws-id-transform-tx-id",
- "summary" : "GET /api/ee/workspace/{ws-id}/transform/{tx-id}",
- "description" : "Get a specific transform in a workspace.",
+ "operationId" : "get-api-ee-transforms-id-inspect",
+ "summary" : "GET /api/ee/transforms/{id}/inspect",
+ "description" : "Phase 1: Discover available lenses for a transform.\n Returns structural metadata and available lens types.",
"parameters" : [ {
"in" : "path",
- "name" : "ws-id",
+ "name" : "id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.transforms-inspector.schema.discovery-response"
+ }
+ }
+ }
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
+ },
+ "tags" : [ "/api/ee/transforms" ]
+ }
+ },
+ "/api/ee/transforms/{id}/inspect/{lens-id}" : {
+ "get" : {
+ "operationId" : "get-api-ee-transforms-id-inspect-lens-id",
+ "summary" : "GET /api/ee/transforms/{id}/inspect/{lens-id}",
+ "description" : "Phase 2: Get full lens contents for a transform.\n Returns sections, cards with dataset_query, and trigger definitions.\n Accepts optional params for drill lenses as query params.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
}, {
"in" : "path",
- "name" : "tx-id",
+ "name" : "lens-id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ "type" : "string",
+ "minLength" : 1
}
} ],
"responses" : {
@@ -33520,73 +28134,7 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "last_run_at" : { },
- "target_stale" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "last_run_status" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "workspace_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "updated_at" : { },
- "archived_at" : { },
- "source" : {
- "type" : "object",
- "properties" : { }
- },
- "last_run_message" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "target" : {
- "type" : "object",
- "properties" : { }
- },
- "created_at" : { },
- "global_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "creator_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "ref_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "ref_id", "global_id", "name", "description", "source", "target", "target_stale", "workspace_id", "creator_id", "archived_at", "created_at", "updated_at", "last_run_at", "last_run_status", "last_run_message" ]
+ "$ref" : "#/components/schemas/metabase-enterprise.transforms-inspector.schema.lens"
}
}
}
@@ -33595,28 +28143,33 @@
"description" : "Client error response"
},
"5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/ee/workspace" ]
- },
- "put" : {
- "operationId" : "put-api-ee-workspace-ws-id-transform-tx-id",
- "summary" : "PUT /api/ee/workspace/{ws-id}/transform/{tx-id}",
- "description" : "Update or create a transform in a workspace.\n If the transform exists, updates it. If it doesn't exist, creates a new transform with the provided ref_id.\n For creation, name, source, and target are required.",
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/transforms" ]
+ }
+ },
+ "/api/ee/transforms/{id}/inspect/{lens-id}/query" : {
+ "post" : {
+ "operationId" : "post-api-ee-transforms-id-inspect-lens-id-query",
+ "summary" : "POST /api/ee/transforms/{id}/inspect/{lens-id}/query",
+ "description" : "Execute a query in the context of a transform inspector lens.",
"parameters" : [ {
"in" : "path",
- "name" : "ws-id",
+ "name" : "id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
}, {
"in" : "path",
- "name" : "tx-id",
+ "name" : "lens-id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ "type" : "string",
+ "minLength" : 1
}
} ],
"responses" : {
@@ -33625,73 +28178,7 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "object",
- "properties" : {
- "last_run_at" : { },
- "target_stale" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "last_run_status" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "workspace_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "updated_at" : { },
- "archived_at" : { },
- "source" : {
- "type" : "object",
- "properties" : { }
- },
- "last_run_message" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "target" : {
- "type" : "object",
- "properties" : { }
- },
- "created_at" : { },
- "global_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "creator_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }, {
- "type" : "null"
- } ]
- },
- "ref_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "ref_id", "global_id", "name", "description", "source", "target", "target_stale", "workspace_id", "creator_id", "archived_at", "created_at", "updated_at", "last_run_at", "last_run_status", "last_run_message" ]
+ "$ref" : "#/components/schemas/metabase.query-processor.schema.query-result"
}
}
}
@@ -33709,120 +28196,85 @@
"schema" : {
"type" : "object",
"properties" : {
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string"
- },
- "source" : {
+ "lens_params" : {
"oneOf" : [ {
"type" : "object",
- "properties" : {
- "query" : {
- "$ref" : "#/components/schemas/metabase.queries.schema.query"
- },
- "type" : {
- "const" : "query"
- }
- },
- "required" : [ "type", "query" ]
+ "additionalProperties" : { }
}, {
- "type" : "object",
- "properties" : {
- "body" : {
- "type" : "string"
- },
- "source-database" : {
- "type" : "integer"
- },
- "source-tables" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.transforms-base.util.source-table-entry"
- }
- },
- "type" : {
- "const" : "python"
- }
- },
- "required" : [ "source-tables", "type", "body" ],
- "additionalProperties" : false
+ "type" : "null"
} ]
},
- "target" : {
+ "query" : {
"type" : "object",
"properties" : {
"database" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "schema" : {
"oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "table_id" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "type" : "integer"
}, {
"type" : "null"
} ]
- },
- "type" : {
- "type" : "string",
- "enum" : [ "table" ]
}
- },
- "required" : [ "type", "name" ],
- "additionalProperties" : false
+ }
}
- }
+ },
+ "required" : [ "query" ]
}
}
}
},
- "tags" : [ "/api/ee/workspace" ]
- },
+ "tags" : [ "/api/ee/transforms" ]
+ }
+ },
+ "/api/ee/upload-management/tables" : {
+ "get" : {
+ "operationId" : "get-api-ee-upload-management-tables",
+ "summary" : "GET /api/ee/upload-management/tables",
+ "description" : "Get all `Tables` visible to the current user which were created by uploading a file.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/upload-management" ]
+ }
+ },
+ "/api/ee/upload-management/tables/{id}" : {
"delete" : {
- "operationId" : "delete-api-ee-workspace-ws-id-transform-tx-id",
- "summary" : "DELETE /api/ee/workspace/{ws-id}/transform/{tx-id}",
- "description" : "Discard a transform from the changeset.\n Equivalent to resetting a checked-out transform to its global definition, or deleting a provisional transform.",
+ "operationId" : "delete-api-ee-upload-management-tables-id",
+ "summary" : "DELETE /api/ee/upload-management/tables/{id}",
+ "description" : "Delete the uploaded table from the database, optionally archiving cards for which it is the primary source.",
"parameters" : [ {
"in" : "path",
- "name" : "ws-id",
+ "name" : "id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
}, {
- "in" : "path",
- "name" : "tx-id",
- "required" : true,
+ "in" : "query",
+ "name" : "archive-cards",
+ "required" : false,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ "default" : false,
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "null"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -33831,36 +28283,67 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/ee/workspace" ]
+ "tags" : [ "/api/ee/upload-management" ]
}
},
- "/api/ee/workspace/{ws-id}/transform/{tx-id}/archive" : {
- "post" : {
- "operationId" : "post-api-ee-workspace-ws-id-transform-tx-id-archive",
- "summary" : "POST /api/ee/workspace/{ws-id}/transform/{tx-id}/archive",
- "description" : "Mark the given transform to be archived when the workspace is merged.\n For provisional transforms we will skip even creating it in the first place.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "path",
- "name" : "tx-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- } ],
+ "/api/ee/workspace" : {
+ "get" : {
+ "operationId" : "get-api-ee-workspace",
+ "summary" : "GET /api/ee/workspace",
+ "description" : "Get a list of all workspaces",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "type" : "null"
+ "type" : "object",
+ "properties" : {
+ "items" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ },
+ "updated_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ }
+ },
+ "required" : [ "id", "database_id", "name", "status", "updated_at" ],
+ "additionalProperties" : false
+ }
+ },
+ "limit" : {
+ "oneOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "offset" : {
+ "oneOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "items", "limit", "offset" ],
+ "additionalProperties" : false
}
}
}
@@ -33873,35 +28356,46 @@
}
},
"tags" : [ "/api/ee/workspace" ]
- }
- },
- "/api/ee/workspace/{ws-id}/transform/{tx-id}/dry-run" : {
+ },
"post" : {
- "operationId" : "post-api-ee-workspace-ws-id-transform-tx-id-dry-run",
- "summary" : "POST /api/ee/workspace/{ws-id}/transform/{tx-id}/dry-run",
- "description" : "Dry-run a transform in a workspace without persisting to the target table.\n\n Returns the first 2000 rows of transform output for preview purposes.\n Does not update last_run_at or create any database tables.\n\n When run_stale_ancestors is true, any stale ancestor transforms will be executed first\n in dependency order (these ARE persisted). If any ancestor fails, execution stops and\n the dry-run will not proceed.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "path",
- "name" : "tx-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- } ],
+ "operationId" : "post-api-ee-workspace",
+ "summary" : "POST /api/ee/workspace",
+ "description" : "Create a new workspace\n\n Potential payload:\n {:name \"a\" :database_id 2}}",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.query-result"
+ "type" : "object",
+ "properties" : {
+ "collection_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "created_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ },
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ },
+ "updated_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ }
+ },
+ "required" : [ "id", "name", "collection_id", "database_id", "status", "created_at", "updated_at" ]
}
}
}
@@ -33919,8 +28413,12 @@
"schema" : {
"type" : "object",
"properties" : {
- "run_stale_ancestors" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.flag"
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
}
}
}
@@ -33930,25 +28428,20 @@
"tags" : [ "/api/ee/workspace" ]
}
},
- "/api/ee/workspace/{ws-id}/transform/{tx-id}/merge" : {
- "post" : {
- "operationId" : "post-api-ee-workspace-ws-id-transform-tx-id-merge",
- "summary" : "POST /api/ee/workspace/{ws-id}/transform/{tx-id}/merge",
- "description" : "Merge single transform from workspace back to the core. If workspace transform is archived\n the corresponding core transform is deleted.\n\n Request body may include:\n - commit-message: A description of what changes are being merged (optional, will be required in future)",
+ "/api/ee/workspace/checkout" : {
+ "get" : {
+ "operationId" : "get-api-ee-workspace-checkout",
+ "summary" : "GET /api/ee/workspace/checkout",
+ "description" : "Get checkout status for a global transform.\n\n Returns:\n - checkout_disabled: Why this transform cannot be checked out (nil if allowed)\n - workspaces: All workspaces for this transform's database, with checkout status\n - transforms: (DEPRECATED) Use :workspaces instead",
"parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "path",
- "name" : "tx-id",
+ "in" : "query",
+ "name" : "transform-id",
"required" : true,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -33958,25 +28451,80 @@
"schema" : {
"type" : "object",
"properties" : {
- "global_id" : {
+ "checkout_disabled" : {
"oneOf" : [ {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ "type" : "string",
+ "enum" : [ "mbql", "card-reference", "unknown-type" ]
}, {
"type" : "null"
} ]
},
- "message" : {
- "type" : "string"
- },
- "op" : {
- "type" : "string",
- "enum" : [ "create", "delete", "update", "noop" ]
+ "transforms" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "workspace" : {
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "name" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "id", "name" ]
+ }
+ },
+ "required" : [ "id", "name", "workspace" ]
+ }
},
- "ref_id" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ "workspaces" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "existing" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "ref_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
+ },
+ "required" : [ "ref_id", "name" ]
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ }
+ },
+ "required" : [ "id", "name", "status", "existing" ]
+ }
}
},
- "required" : [ "op", "global_id", "ref_id" ]
+ "required" : [ "checkout_disabled", "workspaces", "transforms" ]
}
}
}
@@ -33988,51 +28536,60 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "commit-message" : {
- "type" : "string",
- "minLength" : 1
- }
- }
- }
- }
- }
- },
"tags" : [ "/api/ee/workspace" ]
}
},
- "/api/ee/workspace/{ws-id}/transform/{tx-id}/run" : {
- "post" : {
- "operationId" : "post-api-ee-workspace-ws-id-transform-tx-id-run",
- "summary" : "POST /api/ee/workspace/{ws-id}/transform/{tx-id}/run",
- "description" : "Run a transform in a workspace.\n\n App DB changes are rolled back. Warehouse DB changes persist.\n\n When run_stale_ancestors is true, any stale ancestor transforms will be executed first\n in dependency order. If any ancestor fails, execution stops and remaining ancestors\n are marked as not_run. The target transform will not run if any ancestor failed.",
- "parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "path",
- "name" : "tx-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
- } ],
+ "/api/ee/workspace/database" : {
+ "get" : {
+ "operationId" : "get-api-ee-workspace-database",
+ "summary" : "GET /api/ee/workspace/database",
+ "description" : "Get a list supported databases, and whether they're enabled and have required permissions.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.execution-result"
+ "type" : "object",
+ "properties" : {
+ "databases" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "enabled" : {
+ "type" : "boolean"
+ },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "permissions_status" : {
+ "type" : "object",
+ "properties" : {
+ "checked_at" : {
+ "type" : "string"
+ },
+ "error" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "status", "checked_at" ]
+ }
+ },
+ "required" : [ "id", "name", "enabled" ]
+ }
+ }
+ },
+ "required" : [ "databases" ]
}
}
}
@@ -34044,42 +28601,23 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "run_stale_ancestors" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.flag"
- }
- }
- }
- }
- }
- },
"tags" : [ "/api/ee/workspace" ]
}
},
- "/api/ee/workspace/{ws-id}/transform/{tx-id}/unarchive" : {
- "post" : {
- "operationId" : "post-api-ee-workspace-ws-id-transform-tx-id-unarchive",
- "summary" : "POST /api/ee/workspace/{ws-id}/transform/{tx-id}/unarchive",
- "description" : "Unmark the given transform for archival. This will recall the last definition it had within the workspace.",
+ "/api/ee/workspace/enabled" : {
+ "get" : {
+ "operationId" : "get-api-ee-workspace-enabled",
+ "summary" : "GET /api/ee/workspace/enabled",
+ "description" : "Test whether the current user can use Workspaces. Optionally takes a specific database.\n Factors include: driver support, database user privileges, metabase permissions.",
"parameters" : [ {
- "in" : "path",
- "name" : "ws-id",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
- }
- }, {
- "in" : "path",
- "name" : "tx-id",
- "required" : true,
+ "in" : "query",
+ "name" : "database-id",
+ "required" : false,
"schema" : {
- "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -34087,7 +28625,16 @@
"content" : {
"application/json" : {
"schema" : {
- "type" : "null"
+ "type" : "object",
+ "properties" : {
+ "reason" : {
+ "type" : "string"
+ },
+ "supported" : {
+ "type" : "boolean"
+ }
+ },
+ "required" : [ "supported" ]
}
}
}
@@ -34102,11 +28649,11 @@
"tags" : [ "/api/ee/workspace" ]
}
},
- "/api/ee/workspace/{ws-id}/unarchive" : {
- "post" : {
- "operationId" : "post-api-ee-workspace-ws-id-unarchive",
- "summary" : "POST /api/ee/workspace/{ws-id}/unarchive",
- "description" : "Restore an archived workspace. Recreates the isolated schema and tables.",
+ "/api/ee/workspace/{ws-id}" : {
+ "get" : {
+ "operationId" : "get-api-ee-workspace-ws-id",
+ "summary" : "GET /api/ee/workspace/{ws-id}",
+ "description" : "Get a single workspace by ID",
"parameters" : [ {
"in" : "path",
"name" : "ws-id",
@@ -34156,171 +28703,65 @@
}
},
"4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/ee/workspace" ]
- }
- },
- "/api/eid-translation/translate" : {
- "post" : {
- "operationId" : "post-api-eid-translation-translate",
- "summary" : "POST /api/eid-translation/translate",
- "description" : "Translate entity IDs to model IDs.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "entity_ids" : {
- "type" : "object",
- "properties" : { }
- }
- },
- "required" : [ "entity_ids" ]
- }
- }
- }
- },
- "tags" : [ "/api/eid-translation" ]
- }
- },
- "/api/email" : {
- "put" : {
- "operationId" : "put-api-email",
- "summary" : "PUT /api/email",
- "description" : "Update multiple email Settings. You must be a superuser or have `setting` permission to do this.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "email-smtp-host" : {
- "anyOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "email-smtp-password" : {
- "anyOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "email-smtp-port" : {
- "anyOf" : [ {
- "type" : "integer"
- }, {
- "type" : "null"
- } ]
- },
- "email-smtp-security" : {
- "anyOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "email-smtp-username" : {
- "anyOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- }
- }
- }
- }
- },
- "tags" : [ "/api/email" ]
- },
- "delete" : {
- "operationId" : "delete-api-email",
- "summary" : "DELETE /api/email",
- "description" : "Clear all email related settings. You must be a superuser or have `setting` permission to do this.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/email" ]
- }
- },
- "/api/email/test" : {
- "post" : {
- "operationId" : "post-api-email-test",
- "summary" : "POST /api/email/test",
- "description" : "Send a test email using the SMTP Settings. You must be a superuser or have `setting` permission to do this.\n Returns `{:ok true}` if we were able to send the message successfully, otherwise a standard 400 error response.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/email" ]
- }
- },
- "/api/embed/card/{token}" : {
- "get" : {
- "operationId" : "get-api-embed-card-token",
- "summary" : "GET /api/embed/card/{token}",
- "description" : "Fetch a Card via a JSON Web Token signed with the `embedding-secret-key`.\n\n Token should have the following format:\n\n {:resource {:question <card-id>}}",
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/workspace" ]
+ },
+ "put" : {
+ "operationId" : "put-api-ee-workspace-ws-id",
+ "summary" : "PUT /api/ee/workspace/{ws-id}",
+ "description" : "Update simple workspace properties.\n\n Can set database_id only on uninitialized workspaces.",
"parameters" : [ {
"in" : "path",
- "name" : "token",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "collection_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "created_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ },
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ },
+ "updated_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ }
+ },
+ "required" : [ "id", "name", "collection_id", "database_id", "status", "created_at", "updated_at" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34329,40 +28770,57 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
- }
- },
- "/api/embed/card/{token}/params/{param-key}/remapping" : {
- "get" : {
- "operationId" : "get-api-embed-card-token-params-param-key-remapping",
- "summary" : "GET /api/embed/card/{token}/params/{param-key}/remapping",
- "description" : "Embedded version of api.card filter values endpoint.",
- "parameters" : [ {
- "in" : "path",
- "name" : "token",
- "required" : true,
- "schema" : {
- "type" : "string"
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "additionalProperties" : false
+ }
+ }
}
- }, {
+ },
+ "tags" : [ "/api/ee/workspace" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-ee-workspace-ws-id",
+ "summary" : "DELETE /api/ee/workspace/{ws-id}",
+ "description" : "Delete a workspace and all its contents, including mirrored entities.",
+ "parameters" : [ {
"in" : "path",
- "name" : "param-key",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- }, {
- "in" : "query",
- "name" : "value",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "ok" : {
+ "const" : true
+ }
+ },
+ "required" : [ "ok" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34371,41 +28829,61 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/card/{token}/params/{param-key}/search/{prefix}" : {
- "get" : {
- "operationId" : "get-api-embed-card-token-params-param-key-search-prefix",
- "summary" : "GET /api/embed/card/{token}/params/{param-key}/search/{prefix}",
- "description" : "Embedded version of chain filter search endpoint.",
+ "/api/ee/workspace/{ws-id}/archive" : {
+ "post" : {
+ "operationId" : "post-api-ee-workspace-ws-id-archive",
+ "summary" : "POST /api/ee/workspace/{ws-id}/archive",
+ "description" : "Archive a workspace. Deletes the isolated schema and tables, but preserves mirrored entities.",
"parameters" : [ {
"in" : "path",
- "name" : "token",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- }, {
- "in" : "path",
- "name" : "param-key",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- }, {
- "in" : "path",
- "name" : "prefix",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string",
- "minLength" : 1
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "collection_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "created_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ },
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ },
+ "updated_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ }
+ },
+ "required" : [ "id", "name", "collection_id", "database_id", "status", "created_at", "updated_at" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34414,33 +28892,67 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/card/{token}/params/{param-key}/values" : {
+ "/api/ee/workspace/{ws-id}/external/transform" : {
"get" : {
- "operationId" : "get-api-embed-card-token-params-param-key-values",
- "summary" : "GET /api/embed/card/{token}/params/{param-key}/values",
- "description" : "Embedded version of api.card filter values endpoint.",
+ "operationId" : "get-api-ee-workspace-ws-id-external-transform",
+ "summary" : "GET /api/ee/workspace/{ws-id}/external/transform",
+ "description" : "Get transforms that are external to the workspace, i.e. no matching workspace_transform row exists.",
"parameters" : [ {
"in" : "path",
- "name" : "token",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
}, {
- "in" : "path",
- "name" : "param-key",
- "required" : true,
+ "in" : "query",
+ "name" : "database-id",
+ "required" : false,
"schema" : {
- "type" : "string",
- "minLength" : 1
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "transforms" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "checkout_disabled" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "source_type" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "id", "name", "source_type", "checkout_disabled" ]
+ }
+ }
+ },
+ "required" : [ "transforms" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34449,25 +28961,98 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/card/{token}/query" : {
+ "/api/ee/workspace/{ws-id}/graph" : {
"get" : {
- "operationId" : "get-api-embed-card-token-query",
- "summary" : "GET /api/embed/card/{token}/query",
- "description" : "Fetch the results of running a Card using a JSON Web Token signed with the `embedding-secret-key`.\n\n Token should have the following format:\n\n {:resource {:question <card-id>}\n :params <parameters>}",
+ "operationId" : "get-api-ee-workspace-ws-id-graph",
+ "summary" : "GET /api/ee/workspace/{ws-id}/graph",
+ "description" : "Display the dependency graph between the Changeset and the (potentially external) entities that they depend on.",
"parameters" : [ {
"in" : "path",
- "name" : "token",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "edges" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "from_entity_id" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ } ]
+ },
+ "from_entity_type" : {
+ "type" : "string"
+ },
+ "to_entity_id" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ } ]
+ },
+ "to_entity_type" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "from_entity_id", "from_entity_type", "to_entity_id", "to_entity_type" ]
+ }
+ },
+ "nodes" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "data" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "dependents_count" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }
+ },
+ "id" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ } ]
+ },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "input-table", "external-transform", "workspace-transform" ]
+ }
+ },
+ "required" : [ "id", "type", "dependents_count", "data" ]
+ }
+ }
+ },
+ "required" : [ "nodes", "edges" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34476,48 +29061,83 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/card/{token}/query/{export-format}" : {
- "get" : {
- "operationId" : "get-api-embed-card-token-query-export-format",
- "summary" : "GET /api/embed/card/{token}/query/{export-format}",
- "description" : "Like `GET /api/embed/card/query`, but returns the results as a file in the specified format.",
+ "/api/ee/workspace/{ws-id}/input/grant" : {
+ "post" : {
+ "operationId" : "post-api-ee-workspace-ws-id-input-grant",
+ "summary" : "POST /api/ee/workspace/{ws-id}/input/grant",
+ "description" : "Grant read access to input tables by table coordinates. Superuser only.\n Idempotent - returns which tables were already granted vs newly granted.",
"parameters" : [ {
"in" : "path",
- "name" : "token",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- }, {
- "in" : "path",
- "name" : "export-format",
- "required" : true,
- "schema" : {
- "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format"
- }
- }, {
- "in" : "query",
- "name" : "format_rows",
- "required" : true,
- "schema" : {
- "default" : false,
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "pivot_results",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "default" : false,
- "type" : "boolean"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "already_granted" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "db_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "db_id", "schema", "table" ]
+ }
+ },
+ "newly_granted" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "db_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "db_id", "schema", "table" ]
+ }
+ }
+ },
+ "required" : [ "already_granted", "newly_granted" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34526,25 +29146,93 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "tables" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "db_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "db_id", "schema", "table" ]
+ }
+ }
+ },
+ "required" : [ "tables" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/dashboard/{token}" : {
+ "/api/ee/workspace/{ws-id}/input/pending" : {
"get" : {
- "operationId" : "get-api-embed-dashboard-token",
- "summary" : "GET /api/embed/dashboard/{token}",
- "description" : "Fetch a Dashboard via a JSON Web Token signed with the `embedding-secret-key`.\n\n Token should have the following format:\n\n {:resource {:dashboard <dashboard-id>}}",
+ "operationId" : "get-api-ee-workspace-ws-id-input-pending",
+ "summary" : "GET /api/ee/workspace/{ws-id}/input/pending",
+ "description" : "List all input tables that haven't been granted access yet, excluding tables shadowed by workspace outputs.",
"parameters" : [ {
"in" : "path",
- "name" : "token",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "inputs" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "db_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "db_id", "schema", "table" ]
+ }
+ }
+ },
+ "required" : [ "inputs" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34553,33 +29241,17 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}" : {
+ "/api/ee/workspace/{ws-id}/log" : {
"get" : {
- "operationId" : "get-api-embed-dashboard-token-dashcard-dashcard-id-card-card-id",
- "summary" : "GET /api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}",
- "description" : "Fetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the\n `embedding-secret-key`",
+ "operationId" : "get-api-ee-workspace-ws-id-log",
+ "summary" : "GET /api/ee/workspace/{ws-id}/log",
+ "description" : "Get workspace creation status and recent log entries for polling during async setup",
"parameters" : [ {
"in" : "path",
- "name" : "token",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- }, {
- "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" : "ws-id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -34589,7 +29261,71 @@
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "last_completed_at" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
+ },
+ "logs" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "completed_at" : {
+ "oneOf" : [ { }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : { },
+ "id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "message" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "started_at" : { },
+ "status" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "task" : {
+ "type" : "string"
+ },
+ "updated_at" : { }
+ },
+ "required" : [ "id", "task", "description", "started_at", "updated_at", "completed_at", "status", "message" ]
+ }
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ },
+ "updated_at" : { },
+ "workspace_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }
+ },
+ "required" : [ "workspace_id", "status", "updated_at", "last_completed_at", "logs" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34598,66 +29334,103 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{export-format}" : {
- "get" : {
- "operationId" : "get-api-embed-dashboard-token-dashcard-dashcard-id-card-card-id-export-format",
- "summary" : "GET /api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{export-format}",
- "description" : "Fetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the\n `embedding-secret-key` return the data in one of the export formats",
+ "/api/ee/workspace/{ws-id}/merge" : {
+ "post" : {
+ "operationId" : "post-api-ee-workspace-ws-id-merge",
+ "summary" : "POST /api/ee/workspace/{ws-id}/merge",
+ "description" : "This will:\n 1. Update original transforms with workspace versions\n 2. Archive the workspace and clean up isolated resources\n Returns a report of merged entities, or error in errors key.\n\n Request body may include:\n - commit-message: A description of what changes are being merged (optional, will be required in future)",
"parameters" : [ {
"in" : "path",
- "name" : "token",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- }, {
- "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"
- }
- }, {
- "in" : "query",
- "name" : "format_rows",
- "required" : true,
- "schema" : {
- "default" : false,
- "type" : "boolean"
- }
- }, {
- "in" : "query",
- "name" : "pivot_results",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "default" : false,
- "type" : "boolean"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "anyOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "errors" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "global_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "op" : {
+ "type" : "string",
+ "enum" : [ "create", "delete", "update", "noop" ]
+ },
+ "ref_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
+ },
+ "required" : [ "op", "ref_id" ]
+ }
+ },
+ "merged" : {
+ "type" : "object",
+ "properties" : {
+ "transforms" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "global_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "op" : {
+ "type" : "string",
+ "enum" : [ "create", "delete", "update", "noop" ]
+ },
+ "ref_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
+ },
+ "required" : [ "op", "ref_id" ]
+ }
+ }
+ },
+ "required" : [ "transforms" ]
+ },
+ "workspace" : {
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "id", "name" ]
+ }
+ },
+ "required" : [ "merged", "errors", "workspace" ]
+ }, {
+ "type" : "string"
+ } ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34666,33 +29439,52 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "commit-message" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/dashboard/{token}/params/{param-key}/remapping" : {
+ "/api/ee/workspace/{ws-id}/problem" : {
"get" : {
- "operationId" : "get-api-embed-dashboard-token-params-param-key-remapping",
- "summary" : "GET /api/embed/dashboard/{token}/params/{param-key}/remapping",
- "description" : "Embedded version of the remapped dashboard param value endpoint.",
+ "operationId" : "get-api-ee-workspace-ws-id-problem",
+ "summary" : "GET /api/ee/workspace/{ws-id}/problem",
+ "description" : "Detect problems in the workspace that would affect downstream transforms after merge.\n\n Returns a list of problems, each with:\n - category: the problem category (e.g. 'unused', 'internal-downstream', 'external-downstream')\n - problem: the specific problem (e.g. 'not-run', 'stale', 'removed-field')\n - severity: :error, :warning, or :info\n - block-merge: whether this problem prevents merging\n - data: extra information, shape depends on the problem type\n\n See `metabase-enterprise.workspaces.types/problem-types` for the full list.",
"parameters" : [ {
"in" : "path",
- "name" : "token",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- }, {
- "in" : "path",
- "name" : "param-key",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string",
- "minLength" : 1
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.problem"
+ }
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34701,41 +29493,32 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/dashboard/{token}/params/{param-key}/search/{prefix}" : {
- "get" : {
- "operationId" : "get-api-embed-dashboard-token-params-param-key-search-prefix",
- "summary" : "GET /api/embed/dashboard/{token}/params/{param-key}/search/{prefix}",
- "description" : "Embedded version of chain filter search endpoint.",
+ "/api/ee/workspace/{ws-id}/query" : {
+ "post" : {
+ "operationId" : "post-api-ee-workspace-ws-id-query",
+ "summary" : "POST /api/ee/workspace/{ws-id}/query",
+ "description" : "Execute an arbitrary SQL query in the workspace's isolated database context.\n Table references are remapped to isolated workspace tables.\n Returns the first 2000 rows of query results.",
"parameters" : [ {
"in" : "path",
- "name" : "token",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- }, {
- "in" : "path",
- "name" : "param-key",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- }, {
- "in" : "path",
- "name" : "prefix",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string",
- "minLength" : 1
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.query-result"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34744,33 +29527,69 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "sql" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "sql" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/dashboard/{token}/params/{param-key}/values" : {
- "get" : {
- "operationId" : "get-api-embed-dashboard-token-params-param-key-values",
- "summary" : "GET /api/embed/dashboard/{token}/params/{param-key}/values",
- "description" : "Embedded version of chain filter values endpoint.",
+ "/api/ee/workspace/{ws-id}/run" : {
+ "post" : {
+ "operationId" : "post-api-ee-workspace-ws-id-run",
+ "summary" : "POST /api/ee/workspace/{ws-id}/run",
+ "description" : "Execute all transforms in the workspace in dependency order.\n Returns which transforms succeeded, failed, and were not run.",
"parameters" : [ {
"in" : "path",
- "name" : "token",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- }, {
- "in" : "path",
- "name" : "param-key",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string",
- "minLength" : 1
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "failed" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
+ },
+ "not_run" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
+ },
+ "succeeded" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
+ }
+ },
+ "required" : [ "succeeded", "failed", "not_run" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34779,25 +29598,149 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "stale_only" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.flag"
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/pivot/card/{token}/query" : {
+ "/api/ee/workspace/{ws-id}/table" : {
"get" : {
- "operationId" : "get-api-embed-pivot-card-token-query",
- "summary" : "GET /api/embed/pivot/card/{token}/query",
- "description" : "Fetch the results of running a Card using a JSON Web Token signed with the `embedding-secret-key`.\n\n Token should have the following format:\n\n {:resource {:question <card-id>}\n :params <parameters>}",
+ "operationId" : "get-api-ee-workspace-ws-id-table",
+ "summary" : "GET /api/ee/workspace/{ws-id}/table",
+ "description" : "Get workspace tables",
"parameters" : [ {
"in" : "path",
- "name" : "token",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string"
- }
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "inputs" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "db_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table" : {
+ "type" : "string"
+ },
+ "table_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "db_id", "schema", "table", "table_id" ]
+ }
+ },
+ "outputs" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "db_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "global" : {
+ "type" : "object",
+ "properties" : {
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table" : {
+ "type" : "string"
+ },
+ "table_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "transform_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "transform_id", "schema", "table", "table_id" ]
+ },
+ "isolated" : {
+ "type" : "object",
+ "properties" : {
+ "schema" : {
+ "type" : "string"
+ },
+ "table" : {
+ "type" : "string"
+ },
+ "table_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "transform_id" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }, {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ } ]
+ }
+ },
+ "required" : [ "transform_id", "schema", "table", "table_id" ]
+ }
+ },
+ "required" : [ "db_id", "global", "isolated" ]
+ }
+ }
+ },
+ "required" : [ "inputs", "outputs" ],
+ "additionalProperties" : false
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34806,43 +29749,98 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/pivot/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}" : {
- "get" : {
- "operationId" : "get-api-embed-pivot-dashboard-token-dashcard-dashcard-id-card-card-id",
- "summary" : "GET /api/embed/pivot/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}",
- "description" : "Fetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the\n `embedding-secret-key`",
+ "/api/ee/workspace/{ws-id}/transform" : {
+ "post" : {
+ "operationId" : "post-api-ee-workspace-ws-id-transform",
+ "summary" : "POST /api/ee/workspace/{ws-id}/transform",
+ "description" : "Add another transform to the Changeset. This could be a fork of an existing global transform, or something new.",
"parameters" : [ {
"in" : "path",
- "name" : "token",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
- }, {
- "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"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "last_run_at" : { },
+ "target_stale" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "last_run_status" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "workspace_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "updated_at" : { },
+ "archived_at" : { },
+ "source" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "last_run_message" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "target" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "created_at" : { },
+ "global_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "creator_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "ref_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "ref_id", "global_id", "name", "description", "source", "target", "target_stale", "workspace_id", "creator_id", "archived_at", "created_at", "updated_at", "last_run_at", "last_run_status", "last_run_message" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34851,71 +29849,160 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
- }
- },
- "/api/embed/tiles/card/{token}/{zoom}/{x}/{y}" : {
- "get" : {
- "operationId" : "get-api-embed-tiles-card-token-zoom-x-y",
- "summary" : "GET /api/embed/tiles/card/{token}/{zoom}/{x}/{y}",
- "description" : "Generates a single tile image for an embedded Card using the map visualization.",
- "parameters" : [ {
- "in" : "path",
- "name" : "token",
- "required" : true,
- "schema" : {
- "type" : "string"
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "source" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "query" : {
+ "$ref" : "#/components/schemas/metabase.queries.schema.query"
+ },
+ "type" : {
+ "const" : "query"
+ }
+ },
+ "required" : [ "type", "query" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "body" : {
+ "type" : "string"
+ },
+ "source-database" : {
+ "type" : "integer"
+ },
+ "source-tables" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.transforms-base.util.source-table-entry"
+ }
+ },
+ "type" : {
+ "const" : "python"
+ }
+ },
+ "required" : [ "source-tables", "type", "body" ],
+ "additionalProperties" : false
+ } ]
+ },
+ "target" : {
+ "type" : "object",
+ "properties" : {
+ "database" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "table" ]
+ }
+ },
+ "required" : [ "type", "name" ],
+ "additionalProperties" : false
+ }
+ },
+ "required" : [ "name", "source", "target" ]
+ }
+ }
}
- }, {
- "in" : "path",
- "name" : "zoom",
- "required" : true,
- "schema" : {
- "type" : "integer"
- },
- "description" : "value must be an integer."
- }, {
- "in" : "path",
- "name" : "x",
- "required" : true,
- "schema" : {
- "type" : "integer"
- },
- "description" : "value must be an integer."
- }, {
+ },
+ "tags" : [ "/api/ee/workspace" ]
+ },
+ "get" : {
+ "operationId" : "get-api-ee-workspace-ws-id-transform",
+ "summary" : "GET /api/ee/workspace/{ws-id}/transform",
+ "description" : "Get all transforms in a workspace.",
+ "parameters" : [ {
"in" : "path",
- "name" : "y",
- "required" : true,
- "schema" : {
- "type" : "integer"
- },
- "description" : "value must be an integer."
- }, {
- "in" : "query",
- "name" : "parameters",
- "required" : false,
- "schema" : {
- "type" : "string"
- },
- "description" : "value must be a valid JSON string."
- }, {
- "in" : "query",
- "name" : "latField",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- }, {
- "in" : "query",
- "name" : "lonField",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "transforms" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "creator_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "global_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "ref_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ },
+ "source_type" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "ref_id", "global_id", "name", "source_type", "creator_id" ],
+ "additionalProperties" : false
+ }
+ }
+ },
+ "required" : [ "transforms" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -34924,89 +30011,52 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/embed/tiles/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}" : {
- "get" : {
- "operationId" : "get-api-embed-tiles-dashboard-token-dashcard-dashcard-id-card-card-id-zoom-x-y",
- "summary" : "GET /api/embed/tiles/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}",
- "description" : "Generates a single tile image for a Card on an embedded Dashboard using the map visualization.",
+ "/api/ee/workspace/{ws-id}/transform/validate/target" : {
+ "post" : {
+ "operationId" : "post-api-ee-workspace-ws-id-transform-validate-target",
+ "summary" : "POST /api/ee/workspace/{ws-id}/transform/validate/target",
+ "description" : "Validate the target table for a workspace transform",
"parameters" : [ {
"in" : "path",
- "name" : "token",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "string"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
- }, {
- "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" : "zoom",
- "required" : true,
- "schema" : {
- "type" : "integer"
- },
- "description" : "value must be an integer."
- }, {
- "in" : "path",
- "name" : "x",
- "required" : true,
- "schema" : {
- "type" : "integer"
- },
- "description" : "value must be an integer."
- }, {
- "in" : "path",
- "name" : "y",
- "required" : true,
- "schema" : {
- "type" : "integer"
- },
- "description" : "value must be an integer."
}, {
"in" : "query",
- "name" : "parameters",
+ "name" : "transform-id",
"required" : false,
"schema" : {
- "type" : "string"
- },
- "description" : "value must be a valid JSON string."
- }, {
- "in" : "query",
- "name" : "latField",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- }, {
- "in" : "query",
- "name" : "lonField",
- "required" : true,
- "schema" : {
- "type" : "string"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "body" : {
+ "anyOf" : [ {
+ "type" : "string"
+ }, {
+ "anyOf" : [ { }, { } ]
+ } ]
+ },
+ "status" : {
+ "type" : "integer"
+ }
+ },
+ "required" : [ "status", "body" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -35015,35 +30065,142 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/embed" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "db_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "target" : {
+ "type" : "object",
+ "properties" : {
+ "database" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "type" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "type", "schema", "name" ]
+ }
+ },
+ "required" : [ "target" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/field/{id}" : {
+ "/api/ee/workspace/{ws-id}/transform/{tx-id}" : {
"get" : {
- "operationId" : "get-api-field-id",
- "summary" : "GET /api/field/{id}",
- "description" : "Get `Field` with ID.",
+ "operationId" : "get-api-ee-workspace-ws-id-transform-tx-id",
+ "summary" : "GET /api/ee/workspace/{ws-id}/transform/{tx-id}",
+ "description" : "Get a specific transform in a workspace.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "name" : "ws-id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
}, {
- "in" : "query",
- "name" : "include_editable_data_model",
+ "in" : "path",
+ "name" : "tx-id",
"required" : true,
"schema" : {
- "default" : false,
- "type" : "boolean"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "last_run_at" : { },
+ "target_stale" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "last_run_status" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "workspace_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "updated_at" : { },
+ "archived_at" : { },
+ "source" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "last_run_message" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "target" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "created_at" : { },
+ "global_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "creator_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "ref_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "ref_id", "global_id", "name", "description", "source", "target", "target_stale", "workspace_id", "creator_id", "archived_at", "created_at", "updated_at", "last_run_at", "last_run_status", "last_run_message" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -35052,162 +30209,103 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/field" ]
+ "tags" : [ "/api/ee/workspace" ]
},
"put" : {
- "operationId" : "put-api-field-id",
- "summary" : "PUT /api/field/{id}",
- "description" : "Update `Field` with ID.",
+ "operationId" : "put-api-ee-workspace-ws-id-transform-tx-id",
+ "summary" : "PUT /api/ee/workspace/{ws-id}/transform/{tx-id}",
+ "description" : "Update or create a transform in a workspace.\n If the transform exists, updates it. If it doesn't exist, creates a new transform with the provided ref_id.\n For creation, name, source, and target are required.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
+ }, {
+ "in" : "path",
+ "name" : "tx-id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "points_of_interest" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "settings" : {
- "oneOf" : [ {
- "description" : "Value must be a map.",
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "last_run_at" : { },
+ "target_stale" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "last_run_status" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "workspace_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "updated_at" : { },
+ "archived_at" : { },
+ "source" : {
"type" : "object",
"properties" : { }
- }, {
- "type" : "null"
- } ]
- },
- "visibility_type" : {
- "oneOf" : [ {
- "type" : "string",
- "enum" : [ "retired", "sensitive", "normal", "hidden", "details-only" ]
- }, {
- "type" : "null"
- } ]
- },
- "coercion_strategy" : {
- "oneOf" : [ {
- "description" : "value must be a valid coercion strategy (keyword or string)."
- }, {
- "type" : "null"
- } ]
- },
- "json_unfolding" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "semantic_type" : {
- "oneOf" : [ {
- "description" : "value must be a valid field semantic or relation type (keyword or string)."
- }, {
- "type" : "null"
- } ]
- },
- "has_field_values" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.has-field-values"
- }, {
- "type" : "null"
- } ]
- },
- "display_name" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "nfc_path" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "type" : "string",
- "minLength" : 1
- }
- }, {
- "type" : "null"
- } ]
- },
- "caveats" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
+ },
+ "last_run_message" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "target" : {
+ "type" : "object",
+ "properties" : { }
+ },
+ "created_at" : { },
+ "global_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "creator_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "ref_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
},
- "fk_target_field_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
+ "required" : [ "ref_id", "global_id", "name", "description", "source", "target", "target_stale", "workspace_id", "creator_id", "archived_at", "created_at", "updated_at", "last_run_at", "last_run_status", "last_run_message" ]
}
}
}
- }
- },
- "tags" : [ "/api/field" ]
- }
- },
- "/api/field/{id}/dimension" : {
- "post" : {
- "operationId" : "post-api-field-id-dimension",
- "summary" : "POST /api/field/{id}/dimension",
- "description" : "Sets the dimension for the given field at 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"
@@ -35222,48 +30320,120 @@
"schema" : {
"type" : "object",
"properties" : {
- "human_readable_field_id" : {
+ "description" : {
"oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
+ "type" : "string"
}, {
"type" : "null"
} ]
},
"name" : {
- "type" : "string",
- "minLength" : 1
+ "type" : "string"
},
- "type" : {
- "type" : "string",
- "enum" : [ "internal", "external" ]
+ "source" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "query" : {
+ "$ref" : "#/components/schemas/metabase.queries.schema.query"
+ },
+ "type" : {
+ "const" : "query"
+ }
+ },
+ "required" : [ "type", "query" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "body" : {
+ "type" : "string"
+ },
+ "source-database" : {
+ "type" : "integer"
+ },
+ "source-tables" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.transforms-base.util.source-table-entry"
+ }
+ },
+ "type" : {
+ "const" : "python"
+ }
+ },
+ "required" : [ "source-tables", "type", "body" ],
+ "additionalProperties" : false
+ } ]
+ },
+ "target" : {
+ "type" : "object",
+ "properties" : {
+ "database" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "table_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "table" ]
+ }
+ },
+ "required" : [ "type", "name" ],
+ "additionalProperties" : false
}
- },
- "required" : [ "type", "name" ]
+ }
}
}
}
},
- "tags" : [ "/api/field" ]
+ "tags" : [ "/api/ee/workspace" ]
},
"delete" : {
- "operationId" : "delete-api-field-id-dimension",
- "summary" : "DELETE /api/field/{id}/dimension",
- "description" : "Remove the dimension associated to field at ID",
+ "operationId" : "delete-api-ee-workspace-ws-id-transform-tx-id",
+ "summary" : "DELETE /api/ee/workspace/{ws-id}/transform/{tx-id}",
+ "description" : "Discard a transform from the changeset.\n Equivalent to resetting a checked-out transform to its global definition, or deleting a provisional transform.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
+ }, {
+ "in" : "path",
+ "name" : "tx-id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "null"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -35272,56 +30442,39 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/field" ]
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/field/{id}/discard_values" : {
+ "/api/ee/workspace/{ws-id}/transform/{tx-id}/archive" : {
"post" : {
- "operationId" : "post-api-field-id-discard_values",
- "summary" : "POST /api/field/{id}/discard_values",
- "description" : "Discard the FieldValues belonging to this Field. Only applies to fields that have FieldValues. If this Field's\n Database is set up to automatically sync FieldValues, they will be recreated during the next cycle.",
+ "operationId" : "post-api-ee-workspace-ws-id-transform-tx-id-archive",
+ "summary" : "POST /api/ee/workspace/{ws-id}/transform/{tx-id}/archive",
+ "description" : "Mark the given transform to be archived when the workspace is merged.\n For provisional transforms we will skip even creating it in the first place.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "ws-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"
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
}
- },
- "tags" : [ "/api/field" ]
- }
- },
- "/api/field/{id}/related" : {
- "get" : {
- "operationId" : "get-api-field-id-related",
- "summary" : "GET /api/field/{id}/related",
- "description" : "Return related entities.",
- "parameters" : [ {
+ }, {
"in" : "path",
- "name" : "id",
+ "name" : "tx-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "null"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -35330,44 +30483,39 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/field" ]
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/field/{id}/remapping/{remapped-id}" : {
- "get" : {
- "operationId" : "get-api-field-id-remapping-remapped-id",
- "summary" : "GET /api/field/{id}/remapping/{remapped-id}",
- "description" : "Fetch remapped Field values.",
+ "/api/ee/workspace/{ws-id}/transform/{tx-id}/dry-run" : {
+ "post" : {
+ "operationId" : "post-api-ee-workspace-ws-id-transform-tx-id-dry-run",
+ "summary" : "POST /api/ee/workspace/{ws-id}/transform/{tx-id}/dry-run",
+ "description" : "Dry-run a transform in a workspace without persisting to the target table.\n\n Returns the first 2000 rows of transform output for preview purposes.\n Does not update last_run_at or create any database tables.\n\n When run_stale_ancestors is true, any stale ancestor transforms will be executed first\n in dependency order (these ARE persisted). If any ancestor fails, execution stops and\n the dry-run will not proceed.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
}, {
"in" : "path",
- "name" : "remapped-id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- }, {
- "in" : "query",
- "name" : "value",
+ "name" : "tx-id",
"required" : true,
"schema" : {
- "type" : "string",
- "minLength" : 1
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.query-result"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -35376,27 +30524,73 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/field" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "run_stale_ancestors" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.flag"
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/field/{id}/rescan_values" : {
+ "/api/ee/workspace/{ws-id}/transform/{tx-id}/merge" : {
"post" : {
- "operationId" : "post-api-field-id-rescan_values",
- "summary" : "POST /api/field/{id}/rescan_values",
- "description" : "Manually trigger an update for the FieldValues for this Field. Only applies to Fields that are eligible for\n FieldValues.",
+ "operationId" : "post-api-ee-workspace-ws-id-transform-tx-id-merge",
+ "summary" : "POST /api/ee/workspace/{ws-id}/transform/{tx-id}/merge",
+ "description" : "Merge single transform from workspace back to the core. If workspace transform is archived\n the corresponding core transform is deleted.\n\n Request body may include:\n - commit-message: A description of what changes are being merged (optional, will be required in future)",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
+ }, {
+ "in" : "path",
+ "name" : "tx-id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "global_id" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "message" : {
+ "type" : "string"
+ },
+ "op" : {
+ "type" : "string",
+ "enum" : [ "create", "delete", "update", "noop" ]
+ },
+ "ref_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
+ },
+ "required" : [ "op", "global_id", "ref_id" ]
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -35405,44 +30599,54 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/field" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "commit-message" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/field/{id}/search/{search-id}" : {
- "get" : {
- "operationId" : "get-api-field-id-search-search-id",
- "summary" : "GET /api/field/{id}/search/{search-id}",
- "description" : "Search for values of a Field with `search-id` that start with `value`. See docstring for\n [[metabase.parameters.field/search-values]] for a more detailed explanation.",
+ "/api/ee/workspace/{ws-id}/transform/{tx-id}/run" : {
+ "post" : {
+ "operationId" : "post-api-ee-workspace-ws-id-transform-tx-id-run",
+ "summary" : "POST /api/ee/workspace/{ws-id}/transform/{tx-id}/run",
+ "description" : "Run a transform in a workspace.\n\n App DB changes are rolled back. Warehouse DB changes persist.\n\n When run_stale_ancestors is true, any stale ancestor transforms will be executed first\n in dependency order. If any ancestor fails, execution stops and remaining ancestors\n are marked as not_run. The target transform will not run if any ancestor failed.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
}, {
"in" : "path",
- "name" : "search-id",
+ "name" : "tx-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
- }, {
- "in" : "query",
- "name" : "value",
- "required" : false,
- "schema" : {
- "type" : "string",
- "minLength" : 1
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
}
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.execution-result"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -35451,27 +30655,53 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/field" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "run_stale_ancestors" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.flag"
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/field/{id}/summary" : {
- "get" : {
- "operationId" : "get-api-field-id-summary",
- "summary" : "GET /api/field/{id}/summary",
- "description" : "Get the count and distinct count of `Field` with ID.",
+ "/api/ee/workspace/{ws-id}/transform/{tx-id}/unarchive" : {
+ "post" : {
+ "operationId" : "post-api-ee-workspace-ws-id-transform-tx-id-unarchive",
+ "summary" : "POST /api/ee/workspace/{ws-id}/transform/{tx-id}/unarchive",
+ "description" : "Unmark the given transform for archival. This will recall the last definition it had within the workspace.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "ws-id",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ }
+ }, {
+ "in" : "path",
+ "name" : "tx-id",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.ref-id"
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "null"
+ }
+ }
+ }
},
"4XX" : {
"description" : "Client error response"
@@ -35480,17 +30710,17 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/field" ]
+ "tags" : [ "/api/ee/workspace" ]
}
},
- "/api/field/{id}/values" : {
- "get" : {
- "operationId" : "get-api-field-id-values",
- "summary" : "GET /api/field/{id}/values",
- "description" : "If a Field's value of `has_field_values` is `:list`, return a list of all the distinct values of the Field (or\n remapped Field), and (if defined by a User) a map of human-readable remapped values. If `has_field_values` is not\n `:list`, checks whether we should create FieldValues for this Field; if so, creates and returns them.",
+ "/api/ee/workspace/{ws-id}/unarchive" : {
+ "post" : {
+ "operationId" : "post-api-ee-workspace-ws-id-unarchive",
+ "summary" : "POST /api/ee/workspace/{ws-id}/unarchive",
+ "description" : "Restore an archived workspace. Recreates the isolated schema and tables.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "ws-id",
"required" : true,
"schema" : {
"type" : "integer",
@@ -35500,31 +30730,58 @@
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/field" ]
- },
- "post" : {
- "operationId" : "post-api-field-id-values",
- "summary" : "POST /api/field/{id}/values",
- "description" : "Update the fields values and human-readable values for a `Field` whose semantic type is\n `category`/`city`/`state`/`country` or whose base type is `type/Boolean`. The human-readable values are optional.",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "collection_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "created_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ },
+ "database_id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "id" : {
+ "$ref" : "#/components/schemas/metabase-enterprise.workspaces.types.appdb-id"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "archived", "ready", "broken", "pending", "uninitialized" ]
+ },
+ "updated_at" : {
+ "type" : "string",
+ "format" : "date-time"
+ }
+ },
+ "required" : [ "id", "name", "collection_id", "database_id", "status", "created_at", "updated_at" ]
+ }
+ }
+ }
},
- "description" : "value must be an integer greater than zero."
- } ],
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/ee/workspace" ]
+ }
+ },
+ "/api/eid-translation/translate" : {
+ "post" : {
+ "operationId" : "post-api-eid-translation-translate",
+ "summary" : "POST /api/eid-translation/translate",
+ "description" : "Translate entity IDs to model IDs.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -35542,35 +30799,24 @@
"schema" : {
"type" : "object",
"properties" : {
- "values" : {
- "type" : "array",
- "items" : {
- "anyOf" : [ {
- "type" : "array",
- "prefixItems" : [ { } ]
- }, {
- "type" : "array",
- "prefixItems" : [ { }, {
- "type" : "string",
- "minLength" : 1
- } ]
- } ]
- }
+ "entity_ids" : {
+ "type" : "object",
+ "properties" : { }
}
},
- "required" : [ "values" ]
+ "required" : [ "entity_ids" ]
}
}
}
},
- "tags" : [ "/api/field" ]
+ "tags" : [ "/api/eid-translation" ]
}
},
- "/api/frontend-errors" : {
- "post" : {
- "operationId" : "post-api-frontend-errors",
- "summary" : "POST /api/frontend-errors",
- "description" : "Endpoint for the frontend to report errors. Increments a Prometheus counter\n with the given `type` label.",
+ "/api/email" : {
+ "put" : {
+ "operationId" : "put-api-email",
+ "summary" : "PUT /api/email",
+ "description" : "Update multiple email Settings. You must be a superuser or have `setting` permission to do this.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -35589,32 +30835,53 @@
"schema" : {
"type" : "object",
"properties" : {
- "type" : {
- "$ref" : "#/components/schemas/metabase.frontend-errors.api.frontend-error-type"
+ "email-smtp-host" : {
+ "anyOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "email-smtp-password" : {
+ "anyOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "email-smtp-port" : {
+ "anyOf" : [ {
+ "type" : "integer"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "email-smtp-security" : {
+ "anyOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "email-smtp-username" : {
+ "anyOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
}
- },
- "required" : [ "type" ]
+ }
}
}
}
},
- "tags" : [ "/api/frontend-errors" ]
- }
- },
- "/api/geojson" : {
- "get" : {
- "operationId" : "get-api-geojson",
- "summary" : "GET /api/geojson",
- "description" : "Load a custom GeoJSON file based on a URL or file path provided as a query parameter.\n This behaves similarly to /api/geojson/:key but doesn't require the custom map to be saved to the DB first.",
- "parameters" : [ {
- "in" : "query",
- "name" : "url",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
+ "tags" : [ "/api/email" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-email",
+ "summary" : "DELETE /api/email",
+ "description" : "Clear all email related settings. You must be a superuser or have `setting` permission to do this.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -35626,23 +30893,15 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/geojson" ]
+ "tags" : [ "/api/email" ]
}
},
- "/api/geojson/{key}" : {
- "get" : {
- "operationId" : "get-api-geojson-key",
- "summary" : "GET /api/geojson/{key}",
- "description" : "Fetch a custom GeoJSON file as defined in the [[metabase.geojson.settings/custom-geojson]] setting. (This just acts\n as a simple proxy for the file specified for `key`).",
- "parameters" : [ {
- "in" : "path",
- "name" : "key",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
- } ],
+ "/api/email/test" : {
+ "post" : {
+ "operationId" : "post-api-email-test",
+ "summary" : "POST /api/email/test",
+ "description" : "Send a test email using the SMTP Settings. You must be a superuser or have `setting` permission to do this.\n Returns `{:ok true}` if we were able to send the message successfully, otherwise a standard 400 error response.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -35654,33 +30913,22 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/geojson" ]
+ "tags" : [ "/api/email" ]
}
},
- "/api/glossary" : {
+ "/api/embed/card/{token}" : {
"get" : {
- "operationId" : "get-api-glossary",
- "summary" : "GET /api/glossary",
- "description" : "Fetch all glossary entries, optionally filtered by search term.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
+ "operationId" : "get-api-embed-card-token",
+ "summary" : "GET /api/embed/card/{token}",
+ "description" : "Fetch a Card via a JSON Web Token signed with the `embedding-secret-key`.\n\n Token should have the following format:\n\n {:resource {:question <card-id>}}",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
}
- },
- "tags" : [ "/api/glossary" ]
- },
- "post" : {
- "operationId" : "post-api-glossary",
- "summary" : "POST /api/glossary",
- "description" : "Create a new glossary entry.",
- "parameters" : [ ],
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -35692,43 +30940,36 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "definition" : {
- "type" : "string",
- "minLength" : 1
- },
- "term" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "term", "definition" ]
- }
- }
- }
- },
- "tags" : [ "/api/glossary" ]
+ "tags" : [ "/api/embed" ]
}
},
- "/api/glossary/{id}" : {
- "put" : {
- "operationId" : "put-api-glossary-id",
- "summary" : "PUT /api/glossary/{id}",
- "description" : "Update an existing glossary entry.",
+ "/api/embed/card/{token}/params/{param-key}/remapping" : {
+ "get" : {
+ "operationId" : "get-api-embed-card-token-params-param-key-remapping",
+ "summary" : "GET /api/embed/card/{token}/params/{param-key}/remapping",
+ "description" : "Embedded version of api.card filter values endpoint.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "token",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "type" : "string"
+ }
+ }, {
+ "in" : "path",
+ "name" : "param-key",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }, {
+ "in" : "query",
+ "name" : "value",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
} ],
"responses" : {
"2XX" : {
@@ -35741,41 +30982,37 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "definition" : {
- "type" : "string",
- "minLength" : 1
- },
- "term" : {
- "type" : "string",
- "minLength" : 1
- }
- },
- "required" : [ "term", "definition" ]
- }
- }
- }
- },
- "tags" : [ "/api/glossary" ]
- },
- "delete" : {
- "operationId" : "delete-api-glossary-id",
- "summary" : "DELETE /api/glossary/{id}",
- "description" : "Delete a glossary entry.",
+ "tags" : [ "/api/embed" ]
+ }
+ },
+ "/api/embed/card/{token}/params/{param-key}/search/{prefix}" : {
+ "get" : {
+ "operationId" : "get-api-embed-card-token-params-param-key-search-prefix",
+ "summary" : "GET /api/embed/card/{token}/params/{param-key}/search/{prefix}",
+ "description" : "Embedded version of chain filter search endpoint.",
"parameters" : [ {
"in" : "path",
- "name" : "id",
+ "name" : "token",
"required" : true,
"schema" : {
- "type" : "integer",
- "minimum" : 1
- },
- "description" : "value must be an integer greater than zero."
+ "type" : "string"
+ }
+ }, {
+ "in" : "path",
+ "name" : "param-key",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }, {
+ "in" : "path",
+ "name" : "prefix",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
} ],
"responses" : {
"2XX" : {
@@ -35788,15 +31025,30 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/glossary" ]
+ "tags" : [ "/api/embed" ]
}
},
- "/api/google/settings" : {
- "put" : {
- "operationId" : "put-api-google-settings",
- "summary" : "PUT /api/google/settings",
- "description" : "Update Google Sign-In related settings. You must be a superuser to do this.",
- "parameters" : [ ],
+ "/api/embed/card/{token}/params/{param-key}/values" : {
+ "get" : {
+ "operationId" : "get-api-embed-card-token-params-param-key-values",
+ "summary" : "GET /api/embed/card/{token}/params/{param-key}/values",
+ "description" : "Embedded version of api.card filter values endpoint.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ }, {
+ "in" : "path",
+ "name" : "param-key",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -35808,47 +31060,22 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "google-auth-auto-create-accounts-domain" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "google-auth-client-id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "google-auth-enabled" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- }
- }
- }
- }
- }
- },
- "tags" : [ "/api/google" ]
+ "tags" : [ "/api/embed" ]
}
},
- "/api/ldap/settings" : {
- "put" : {
- "operationId" : "put-api-ldap-settings",
- "summary" : "PUT /api/ldap/settings",
- "description" : "Update LDAP related settings. You must be a superuser to do this.",
- "parameters" : [ ],
+ "/api/embed/card/{token}/query" : {
+ "get" : {
+ "operationId" : "get-api-embed-card-token-query",
+ "summary" : "GET /api/embed/card/{token}/query",
+ "description" : "Fetch the results of running a Card using a JSON Web Token signed with the `embedding-secret-key`.\n\n Token should have the following format:\n\n {:resource {:question <card-id>}\n :params <parameters>}",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -35860,154 +31087,48 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "ldap-enabled" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "ldap-host" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "ldap-password" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "ldap-port" : {
- "oneOf" : [ {
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- }
- }
- }
- }
- }
- },
- "tags" : [ "/api/ldap" ]
- }
- },
- "/api/llm/extract-tables" : {
- "post" : {
- "operationId" : "post-api-llm-extract-tables",
- "summary" : "POST /api/llm/extract-tables",
- "description" : "Parse SQL and return referenced tables with their columns.\n\n Uses Macaw to parse the SQL, resolves table names to IDs,\n and returns permission-filtered tables with column metadata.\n\n This is a lightweight endpoint that does not trigger fingerprinting\n or field value fetching.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "tables" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "columns" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "database_type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "fk_target" : {
- "type" : "object",
- "properties" : {
- "field_name" : {
- "type" : "string"
- },
- "table_name" : {
- "type" : "string"
- }
- },
- "required" : [ "table_name", "field_name" ]
- },
- "id" : {
- "type" : "integer",
- "minimum" : 1
- },
- "name" : {
- "type" : "string"
- },
- "semantic_type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "id", "name" ]
- }
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "display_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer",
- "minimum" : 1
- },
- "name" : {
- "type" : "string"
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "id", "name", "columns" ]
- }
- }
- },
- "required" : [ "tables" ]
- }
- }
- }
+ "tags" : [ "/api/embed" ]
+ }
+ },
+ "/api/embed/card/{token}/query/{export-format}" : {
+ "get" : {
+ "operationId" : "get-api-embed-card-token-query-export-format",
+ "summary" : "GET /api/embed/card/{token}/query/{export-format}",
+ "description" : "Like `GET /api/embed/card/query`, but returns the results as a file in the specified format.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ }, {
+ "in" : "path",
+ "name" : "export-format",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.query-processor.schema.export-format"
+ }
+ }, {
+ "in" : "query",
+ "name" : "format_rows",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "pivot_results",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -36016,139 +31137,25 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "database_id" : {
- "type" : "integer",
- "minimum" : 1
- },
- "sql" : {
- "type" : "string"
- }
- },
- "required" : [ "database_id", "sql" ]
- }
- }
- }
- },
- "tags" : [ "/api/llm" ]
+ "tags" : [ "/api/embed" ]
}
},
- "/api/llm/generate-sql" : {
- "post" : {
- "operationId" : "post-api-llm-generate-sql",
- "summary" : "POST /api/llm/generate-sql",
- "description" : "Generate SQL from a natural language prompt.\n\n Requires:\n - LLM to be configured (Anthropic API key set in admin settings)\n - At least one table reference (explicit @mention or implicit from source_sql)\n - A database_id parameter\n\n Returns generated SQL and the list of tables used for context.",
- "parameters" : [ ],
+ "/api/embed/dashboard/{token}" : {
+ "get" : {
+ "operationId" : "get-api-embed-dashboard-token",
+ "summary" : "GET /api/embed/dashboard/{token}",
+ "description" : "Fetch a Dashboard via a JSON Web Token signed with the `embedding-secret-key`.\n\n Token should have the following format:\n\n {:resource {:dashboard <dashboard-id>}}",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "referenced_entities" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "columns" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "database_type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "fk_target" : {
- "type" : "object",
- "properties" : {
- "field_name" : {
- "type" : "string"
- },
- "table_name" : {
- "type" : "string"
- }
- },
- "required" : [ "table_name", "field_name" ]
- },
- "id" : {
- "type" : "integer",
- "minimum" : 1
- },
- "name" : {
- "type" : "string"
- },
- "semantic_type" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "id", "name" ]
- }
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "display_name" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "id" : {
- "type" : "integer",
- "minimum" : 1
- },
- "model" : {
- "type" : "string"
- },
- "name" : {
- "type" : "string"
- },
- "schema" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "model", "id", "name", "columns" ]
- }
- },
- "sql" : {
- "type" : "string"
- }
- },
- "required" : [ "sql", "referenced_entities" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -36157,81 +31164,111 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "database_id" : {
- "type" : "integer",
- "minimum" : 1
- },
- "prompt" : {
- "type" : "string"
- },
- "referenced_entities" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "id" : {
- "type" : "integer",
- "minimum" : 1
- },
- "model" : {
- "type" : "string"
- }
- },
- "required" : [ "model", "id" ]
- }
- },
- "source_sql" : {
- "type" : "string"
- }
- },
- "required" : [ "prompt", "database_id" ]
- }
- }
+ "tags" : [ "/api/embed" ]
+ }
+ },
+ "/api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}" : {
+ "get" : {
+ "operationId" : "get-api-embed-dashboard-token-dashcard-dashcard-id-card-card-id",
+ "summary" : "GET /api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}",
+ "description" : "Fetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the\n `embedding-secret-key`",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ }, {
+ "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"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/llm" ]
+ "tags" : [ "/api/embed" ]
}
},
- "/api/llm/list-models" : {
+ "/api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{export-format}" : {
"get" : {
- "operationId" : "get-api-llm-list-models",
- "summary" : "GET /api/llm/list-models",
- "description" : "List available LLM models from the configured provider.\n\n Requires LLM to be configured (Anthropic API key set in admin settings).",
- "parameters" : [ ],
+ "operationId" : "get-api-embed-dashboard-token-dashcard-dashcard-id-card-card-id-export-format",
+ "summary" : "GET /api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{export-format}",
+ "description" : "Fetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the\n `embedding-secret-key` return the data in one of the export formats",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ }, {
+ "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"
+ }
+ }, {
+ "in" : "query",
+ "name" : "format_rows",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ }, {
+ "in" : "query",
+ "name" : "pivot_results",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "type" : "boolean"
+ }
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "models" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "display_name" : {
- "type" : "string"
- },
- "id" : {
- "type" : "string"
- }
- },
- "required" : [ "id", "display_name" ]
- }
- }
- },
- "required" : [ "models" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -36240,15 +31277,30 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/llm" ]
+ "tags" : [ "/api/embed" ]
}
},
- "/api/logger/adjustment" : {
- "post" : {
- "operationId" : "post-api-logger-adjustment",
- "summary" : "POST /api/logger/adjustment",
- "description" : "Temporarily adjust the log levels.",
- "parameters" : [ ],
+ "/api/embed/dashboard/{token}/params/{param-key}/remapping" : {
+ "get" : {
+ "operationId" : "get-api-embed-dashboard-token-params-param-key-remapping",
+ "summary" : "GET /api/embed/dashboard/{token}/params/{param-key}/remapping",
+ "description" : "Embedded version of the remapped dashboard param value endpoint.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ }, {
+ "in" : "path",
+ "name" : "param-key",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -36260,32 +31312,38 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "duration" : {
- "type" : "integer"
- },
- "duration_unit" : {
- "$ref" : "#/components/schemas/metabase.logger.api.time-unit"
- },
- "log_levels" : { }
- },
- "required" : [ "duration", "duration_unit", "log_levels" ]
- }
- }
+ "tags" : [ "/api/embed" ]
+ }
+ },
+ "/api/embed/dashboard/{token}/params/{param-key}/search/{prefix}" : {
+ "get" : {
+ "operationId" : "get-api-embed-dashboard-token-params-param-key-search-prefix",
+ "summary" : "GET /api/embed/dashboard/{token}/params/{param-key}/search/{prefix}",
+ "description" : "Embedded version of chain filter search endpoint.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
}
- },
- "tags" : [ "/api/logger" ]
- },
- "delete" : {
- "operationId" : "delete-api-logger-adjustment",
- "summary" : "DELETE /api/logger/adjustment",
- "description" : "Undo any log level adjustments.",
- "parameters" : [ ],
+ }, {
+ "in" : "path",
+ "name" : "param-key",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }, {
+ "in" : "path",
+ "name" : "prefix",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -36297,15 +31355,30 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/logger" ]
+ "tags" : [ "/api/embed" ]
}
},
- "/api/logger/logs" : {
+ "/api/embed/dashboard/{token}/params/{param-key}/values" : {
"get" : {
- "operationId" : "get-api-logger-logs",
- "summary" : "GET /api/logger/logs",
- "description" : "Logs.",
- "parameters" : [ ],
+ "operationId" : "get-api-embed-dashboard-token-params-param-key-values",
+ "summary" : "GET /api/embed/dashboard/{token}/params/{param-key}/values",
+ "description" : "Embedded version of chain filter values endpoint.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ }, {
+ "in" : "path",
+ "name" : "param-key",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -36317,52 +31390,25 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/logger" ]
+ "tags" : [ "/api/embed" ]
}
},
- "/api/logger/presets" : {
+ "/api/embed/pivot/card/{token}/query" : {
"get" : {
- "operationId" : "get-api-logger-presets",
- "summary" : "GET /api/logger/presets",
- "description" : "Get all known presets.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "display_name" : {
- "type" : "string"
- },
- "id" : {
- "type" : "string"
- },
- "loggers" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "level" : {
- "$ref" : "#/components/schemas/metabase.logger.api.log-level"
- },
- "name" : {
- "type" : "string"
- }
- },
- "required" : [ "name", "level" ]
- }
- }
- },
- "required" : [ "id", "display_name", "loggers" ]
- }
- }
- }
- }
+ "operationId" : "get-api-embed-pivot-card-token-query",
+ "summary" : "GET /api/embed/pivot/card/{token}/query",
+ "description" : "Fetch the results of running a Card using a JSON Web Token signed with the `embedding-secret-key`.\n\n Token should have the following format:\n\n {:resource {:question <card-id>}\n :params <parameters>}",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -36371,15 +31417,40 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/logger" ]
+ "tags" : [ "/api/embed" ]
}
},
- "/api/login-history/current" : {
+ "/api/embed/pivot/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}" : {
"get" : {
- "operationId" : "get-api-login-history-current",
- "summary" : "GET /api/login-history/current",
- "description" : "Fetch recent logins for the current user.",
- "parameters" : [ ],
+ "operationId" : "get-api-embed-pivot-dashboard-token-dashcard-dashcard-id-card-card-id",
+ "summary" : "GET /api/embed/pivot/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}",
+ "description" : "Fetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the\n `embedding-secret-key`",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ }, {
+ "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"
@@ -36391,25 +31462,71 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/login-history" ]
+ "tags" : [ "/api/embed" ]
}
},
- "/api/measure" : {
- "post" : {
- "operationId" : "post-api-measure",
- "summary" : "POST /api/measure",
- "description" : "Create a new `Measure`.",
- "parameters" : [ ],
+ "/api/embed/tiles/card/{token}/{zoom}/{x}/{y}" : {
+ "get" : {
+ "operationId" : "get-api-embed-tiles-card-token-zoom-x-y",
+ "summary" : "GET /api/embed/tiles/card/{token}/{zoom}/{x}/{y}",
+ "description" : "Generates a single tile image for an embedded Card using the map visualization.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ }, {
+ "in" : "path",
+ "name" : "zoom",
+ "required" : true,
+ "schema" : {
+ "type" : "integer"
+ },
+ "description" : "value must be an integer."
+ }, {
+ "in" : "path",
+ "name" : "x",
+ "required" : true,
+ "schema" : {
+ "type" : "integer"
+ },
+ "description" : "value must be an integer."
+ }, {
+ "in" : "path",
+ "name" : "y",
+ "required" : true,
+ "schema" : {
+ "type" : "integer"
+ },
+ "description" : "value must be an integer."
+ }, {
+ "in" : "query",
+ "name" : "parameters",
+ "required" : false,
+ "schema" : {
+ "type" : "string"
+ },
+ "description" : "value must be a valid JSON string."
+ }, {
+ "in" : "query",
+ "name" : "latField",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ }, {
+ "in" : "query",
+ "name" : "lonField",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.measures.api.measure"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -36418,59 +31535,89 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "definition" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "table_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }
- },
- "required" : [ "name", "table_id", "definition" ]
- }
- }
- }
- },
- "tags" : [ "/api/measure" ]
- },
+ "tags" : [ "/api/embed" ]
+ }
+ },
+ "/api/embed/tiles/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}" : {
"get" : {
- "operationId" : "get-api-measure",
- "summary" : "GET /api/measure",
- "description" : "Fetch *all* `Measures`.",
- "parameters" : [ ],
+ "operationId" : "get-api-embed-tiles-dashboard-token-dashcard-dashcard-id-card-card-id-zoom-x-y",
+ "summary" : "GET /api/embed/tiles/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}",
+ "description" : "Generates a single tile image for a Card on an embedded Dashboard using the map visualization.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "token",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ }, {
+ "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" : "zoom",
+ "required" : true,
+ "schema" : {
+ "type" : "integer"
+ },
+ "description" : "value must be an integer."
+ }, {
+ "in" : "path",
+ "name" : "x",
+ "required" : true,
+ "schema" : {
+ "type" : "integer"
+ },
+ "description" : "value must be an integer."
+ }, {
+ "in" : "path",
+ "name" : "y",
+ "required" : true,
+ "schema" : {
+ "type" : "integer"
+ },
+ "description" : "value must be an integer."
+ }, {
+ "in" : "query",
+ "name" : "parameters",
+ "required" : false,
+ "schema" : {
+ "type" : "string"
+ },
+ "description" : "value must be a valid JSON string."
+ }, {
+ "in" : "query",
+ "name" : "latField",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ }, {
+ "in" : "query",
+ "name" : "lonField",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ } ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.measures.api.measure"
- }
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -36479,14 +31626,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/measure" ]
+ "tags" : [ "/api/embed" ]
}
},
- "/api/measure/{id}" : {
+ "/api/field/{id}" : {
"get" : {
- "operationId" : "get-api-measure-id",
- "summary" : "GET /api/measure/{id}",
- "description" : "Fetch `Measure` with ID.",
+ "operationId" : "get-api-field-id",
+ "summary" : "GET /api/field/{id}",
+ "description" : "Get `Field` with ID.",
"parameters" : [ {
"in" : "path",
"name" : "id",
@@ -36496,17 +31643,18 @@
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "query",
+ "name" : "include_editable_data_model",
+ "required" : true,
+ "schema" : {
+ "default" : false,
+ "type" : "boolean"
+ }
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.measures.api.measure"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -36515,12 +31663,12 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/measure" ]
+ "tags" : [ "/api/field" ]
},
"put" : {
- "operationId" : "put-api-measure-id",
- "summary" : "PUT /api/measure/{id}",
- "description" : "Update a `Measure` with ID.",
+ "operationId" : "put-api-field-id",
+ "summary" : "PUT /api/field/{id}",
+ "description" : "Update `Field` with ID.",
"parameters" : [ {
"in" : "path",
"name" : "id",
@@ -36533,14 +31681,7 @@
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.measures.api.measure"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -36555,29 +31696,60 @@
"schema" : {
"type" : "object",
"properties" : {
- "archived" : {
+ "points_of_interest" : {
"oneOf" : [ {
- "type" : "boolean"
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
},
- "definition" : {
+ "settings" : {
"oneOf" : [ {
+ "description" : "Value must be a map.",
"type" : "object",
"properties" : { }
}, {
"type" : "null"
} ]
},
- "description" : {
+ "visibility_type" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "string",
+ "enum" : [ "retired", "sensitive", "normal", "hidden", "details-only" ]
}, {
"type" : "null"
} ]
},
- "name" : {
+ "coercion_strategy" : {
+ "oneOf" : [ {
+ "description" : "value must be a valid coercion strategy (keyword or string)."
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "json_unfolding" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "semantic_type" : {
+ "oneOf" : [ {
+ "description" : "value must be a valid field semantic or relation type (keyword or string)."
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "has_field_values" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.has-field-values"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display_name" : {
"oneOf" : [ {
"type" : "string",
"minLength" : 1
@@ -36585,24 +31757,55 @@
"type" : "null"
} ]
},
- "revision_message" : {
- "type" : "string",
- "minLength" : 1
+ "nfc_path" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "caveats" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "fk_target_field_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
}
- },
- "required" : [ "revision_message" ]
+ }
}
}
}
},
- "tags" : [ "/api/measure" ]
+ "tags" : [ "/api/field" ]
}
},
- "/api/measure/{id}/dimension/{dimension-key}/remapping" : {
- "get" : {
- "operationId" : "get-api-measure-id-dimension-dimension-key-remapping",
- "summary" : "GET /api/measure/{id}/dimension/{dimension-key}/remapping",
- "description" : "Fetch remapped value for a specific dimension value.\n\n Returns a pair [value, display-name] if remapping exists, or [value] otherwise.",
+ "/api/field/{id}/dimension" : {
+ "post" : {
+ "operationId" : "post-api-field-id-dimension",
+ "summary" : "POST /api/field/{id}/dimension",
+ "description" : "Sets the dimension for the given field at ID",
"parameters" : [ {
"in" : "path",
"name" : "id",
@@ -36612,33 +31815,66 @@
"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" : {
+ "human_readable_field_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "internal", "external" ]
+ }
+ },
+ "required" : [ "type", "name" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/field" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-field-id-dimension",
+ "summary" : "DELETE /api/field/{id}/dimension",
+ "description" : "Remove the dimension associated to field at ID",
+ "parameters" : [ {
"in" : "path",
- "name" : "dimension-key",
+ "name" : "id",
"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}"
+ "type" : "integer",
+ "minimum" : 1
},
- "description" : "value must be a valid UUID."
- }, {
- "in" : "query",
- "name" : "value",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.measures.api.RemappedValueResponse"
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -36647,14 +31883,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/measure" ]
+ "tags" : [ "/api/field" ]
}
},
- "/api/measure/{id}/dimension/{dimension-key}/search" : {
- "get" : {
- "operationId" : "get-api-measure-id-dimension-dimension-key-search",
- "summary" : "GET /api/measure/{id}/dimension/{dimension-key}/search",
- "description" : "Search for values of a dimension that contain the query string.\n\n Returns field values matching the search query in the same format as the field values API.",
+ "/api/field/{id}/discard_values" : {
+ "post" : {
+ "operationId" : "post-api-field-id-discard_values",
+ "summary" : "POST /api/field/{id}/discard_values",
+ "description" : "Discard the FieldValues belonging to this Field. Only applies to fields that have FieldValues. If this Field's\n Database is set up to automatically sync FieldValues, they will be recreated during the next cycle.",
"parameters" : [ {
"in" : "path",
"name" : "id",
@@ -36664,40 +31900,10 @@
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
- }, {
- "in" : "path",
- "name" : "dimension-key",
- "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" : "query",
- "name" : "query",
- "required" : true,
- "schema" : {
- "type" : "string",
- "minLength" : 1
- }
} ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }
- }
- }
- }
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -36706,14 +31912,14 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/measure" ]
+ "tags" : [ "/api/field" ]
}
},
- "/api/measure/{id}/dimension/{dimension-key}/values" : {
+ "/api/field/{id}/related" : {
"get" : {
- "operationId" : "get-api-measure-id-dimension-dimension-key-values",
- "summary" : "GET /api/measure/{id}/dimension/{dimension-key}/values",
- "description" : "Fetch values for a dimension of a measure.\n\n Returns field values in the same format as the field values API:\n - values: list of [value] or [value, display-name] tuples\n - field_id: the underlying field ID\n - has_more_values: boolean indicating if there are more values",
+ "operationId" : "get-api-field-id-related",
+ "summary" : "GET /api/field/{id}/related",
+ "description" : "Return related entities.",
"parameters" : [ {
"in" : "path",
"name" : "id",
@@ -36723,46 +31929,10 @@
"minimum" : 1
},
"description" : "value must be an integer greater than zero."
- }, {
- "in" : "path",
- "name" : "dimension-key",
- "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" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "has_more_values" : {
- "type" : "boolean"
- },
- "values" : {
- "type" : "array",
- "items" : {
- "anyOf" : [ {
- "type" : "array",
- "prefixItems" : [ { }, {
- "type" : "string"
- } ]
- }, {
- "type" : "array",
- "prefixItems" : [ { } ]
- } ]
- }
- }
- },
- "required" : [ "has_more_values", "values" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -36771,15 +31941,41 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/measure" ]
+ "tags" : [ "/api/field" ]
}
},
- "/api/metabot/agent-streaming" : {
- "post" : {
- "operationId" : "post-api-metabot-agent-streaming",
- "summary" : "POST /api/metabot/agent-streaming",
- "description" : "Send a chat message to the LLM via the AI Proxy.",
- "parameters" : [ ],
+ "/api/field/{id}/remapping/{remapped-id}" : {
+ "get" : {
+ "operationId" : "get-api-field-id-remapping-remapped-id",
+ "summary" : "GET /api/field/{id}/remapping/{remapped-id}",
+ "description" : "Fetch remapped Field values.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "path",
+ "name" : "remapped-id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "query",
+ "name" : "value",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -36791,63 +31987,24 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "context" : {
- "$ref" : "#/components/schemas/metabase.metabot.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}"
- },
- "debug" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "history" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.metabot.client.schema.messages"
- }, {
- "type" : "null"
- } ]
- },
- "message" : {
- "type" : "string",
- "minLength" : 1
- },
- "metabot_id" : {
- "type" : "string"
- },
- "profile_id" : {
- "type" : "string"
- },
- "state" : {
- "type" : "object",
- "properties" : { }
- }
- },
- "required" : [ "message", "context", "conversation_id", "history", "state" ]
- }
- }
- }
- },
- "tags" : [ "/api/metabot" ]
+ "tags" : [ "/api/field" ]
}
},
- "/api/metabot/describe/card" : {
+ "/api/field/{id}/rescan_values" : {
"post" : {
- "operationId" : "post-api-metabot-describe-card",
- "summary" : "POST /api/metabot/describe/card",
- "description" : "Summarize a question.",
- "parameters" : [ ],
+ "operationId" : "post-api-field-id-rescan_values",
+ "summary" : "POST /api/field/{id}/rescan_values",
+ "description" : "Manually trigger an update for the FieldValues for this Field. Only applies to Fields that are eligible for\n FieldValues.",
+ "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"
@@ -36859,109 +32016,60 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "visualization_settings" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- },
- "dataset" : {
- "oneOf" : [ {
- "type" : "boolean"
- }, {
- "type" : "null"
- } ]
- },
- "dataset_query" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- },
- "parameter_mappings" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping"
- }
- }, {
- "type" : "null"
- } ]
- },
- "collection_position" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "result_metadata" : {
- "oneOf" : [ {
- "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata"
- }, {
- "type" : "null"
- } ]
- },
- "collection_id" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "cache_ttl" : {
- "oneOf" : [ {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
- },
- "display" : {
- "type" : "string",
- "minLength" : 1
- },
- "parameters" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.parameters.schema.parameter"
- }
- }, {
- "type" : "null"
- } ]
- },
- "description" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "dataset_query", "display", "visualization_settings" ]
- }
- }
+ "tags" : [ "/api/field" ]
+ }
+ },
+ "/api/field/{id}/search/{search-id}" : {
+ "get" : {
+ "operationId" : "get-api-field-id-search-search-id",
+ "summary" : "GET /api/field/{id}/search/{search-id}",
+ "description" : "Search for values of a Field with `search-id` that start with `value`. See docstring for\n [[metabase.parameters.field/search-values]] for a more detailed explanation.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "path",
+ "name" : "search-id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "query",
+ "name" : "value",
+ "required" : false,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ } ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/metabot" ]
+ "tags" : [ "/api/field" ]
}
},
- "/api/metabot/describe/dashboard/{id}" : {
- "post" : {
- "operationId" : "post-api-metabot-describe-dashboard-id",
- "summary" : "POST /api/metabot/describe/dashboard/{id}",
- "description" : "Provide a summary of a dashboard.",
+ "/api/field/{id}/summary" : {
+ "get" : {
+ "operationId" : "get-api-field-id-summary",
+ "summary" : "GET /api/field/{id}/summary",
+ "description" : "Get the count and distinct count of `Field` with ID.",
"parameters" : [ {
"in" : "path",
"name" : "id",
@@ -36983,15 +32091,51 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/metabot" ]
+ "tags" : [ "/api/field" ]
}
},
- "/api/metabot/document/generate-content" : {
+ "/api/field/{id}/values" : {
+ "get" : {
+ "operationId" : "get-api-field-id-values",
+ "summary" : "GET /api/field/{id}/values",
+ "description" : "If a Field's value of `has_field_values` is `:list`, return a list of all the distinct values of the Field (or\n remapped Field), and (if defined by a User) a map of human-readable remapped values. If `has_field_values` is not\n `:list`, checks whether we should create FieldValues for this Field; if so, creates and returns them.",
+ "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/field" ]
+ },
"post" : {
- "operationId" : "post-api-metabot-document-generate-content",
- "summary" : "POST /api/metabot/document/generate-content",
- "description" : "Create a new piece of content to insert into the document.",
- "parameters" : [ ],
+ "operationId" : "post-api-field-id-values",
+ "summary" : "POST /api/field/{id}/values",
+ "description" : "Update the fields values and human-readable values for a `Field` whose semantic type is\n `category`/`city`/`state`/`country` or whose base type is `type/Boolean`. The human-readable values are optional.",
+ "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"
@@ -37009,100 +32153,39 @@
"schema" : {
"type" : "object",
"properties" : {
- "instructions" : {
- "type" : "string",
- "minLength" : 1
- },
- "references" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
+ "values" : {
+ "type" : "array",
+ "items" : {
+ "anyOf" : [ {
+ "type" : "array",
+ "prefixItems" : [ { } ]
+ }, {
+ "type" : "array",
+ "prefixItems" : [ { }, {
+ "type" : "string",
+ "minLength" : 1
+ } ]
+ } ]
+ }
}
},
- "required" : [ "instructions" ]
+ "required" : [ "values" ]
}
}
}
},
- "tags" : [ "/api/metabot/document" ]
+ "tags" : [ "/api/field" ]
}
},
- "/api/metabot/document/native-generate-content" : {
+ "/api/frontend-errors" : {
"post" : {
- "operationId" : "post-api-metabot-document-native-generate-content",
- "summary" : "POST /api/metabot/document/native-generate-content",
- "description" : "Create a new piece of content to insert into the document using the native Clojure agent.",
+ "operationId" : "post-api-frontend-errors",
+ "summary" : "POST /api/frontend-errors",
+ "description" : "Endpoint for the frontend to report errors. Increments a Prometheus counter\n with the given `type` label.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- },
- "draft_card" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "database_id" : {
- "description" : "value must be an integer greater than zero.",
- "type" : "integer",
- "minimum" : 1
- },
- "dataset_query" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- },
- "name" : {
- "type" : "string",
- "minLength" : 1
- },
- "parameters" : {
- "oneOf" : [ {
- "type" : "array",
- "items" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }
- }, {
- "type" : "null"
- } ]
- },
- "visualization_settings" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
- }
- },
- "required" : [ "name", "dataset_query", "database_id", "parameters", "visualization_settings" ]
- }, {
- "type" : "null"
- } ]
- },
- "error" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "draft_card", "error", "description" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -37117,30 +32200,32 @@
"schema" : {
"type" : "object",
"properties" : {
- "instructions" : {
- "type" : "string",
- "minLength" : 1
- },
- "references" : {
- "description" : "Value must be a map.",
- "type" : "object",
- "properties" : { }
+ "type" : {
+ "$ref" : "#/components/schemas/metabase.frontend-errors.api.frontend-error-type"
}
},
- "required" : [ "instructions" ]
+ "required" : [ "type" ]
}
}
}
},
- "tags" : [ "/api/metabot/document" ]
+ "tags" : [ "/api/frontend-errors" ]
}
},
- "/api/metabot/feedback" : {
- "post" : {
- "operationId" : "post-api-metabot-feedback",
- "summary" : "POST /api/metabot/feedback",
- "description" : "Proxy Metabot feedback to Harbormaster, adding the premium embedding token.",
- "parameters" : [ ],
+ "/api/geojson" : {
+ "get" : {
+ "operationId" : "get-api-geojson",
+ "summary" : "GET /api/geojson",
+ "description" : "Load a custom GeoJSON file based on a URL or file path provided as a query parameter.\n This behaves similarly to /api/geojson/:key but doesn't require the custom map to be saved to the DB first.",
+ "parameters" : [ {
+ "in" : "query",
+ "name" : "url",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -37152,25 +32237,23 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : { }
- }
- }
- }
- },
- "tags" : [ "/api/metabot" ]
+ "tags" : [ "/api/geojson" ]
}
},
- "/api/metabot/metabot" : {
+ "/api/geojson/{key}" : {
"get" : {
- "operationId" : "get-api-metabot-metabot",
- "summary" : "GET /api/metabot/metabot",
- "description" : "List configured metabot instances",
- "parameters" : [ ],
+ "operationId" : "get-api-geojson-key",
+ "summary" : "GET /api/geojson/{key}",
+ "description" : "Fetch a custom GeoJSON file as defined in the [[metabase.geojson.settings/custom-geojson]] setting. (This just acts\n as a simple proxy for the file specified for `key`).",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "key",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ } ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -37182,23 +32265,15 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/metabot/metabot" ]
+ "tags" : [ "/api/geojson" ]
}
},
- "/api/metabot/metabot/{id}" : {
+ "/api/glossary" : {
"get" : {
- "operationId" : "get-api-metabot-metabot-id",
- "summary" : "GET /api/metabot/metabot/{id}",
- "description" : "Retrieve one metabot instance",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- }
- } ],
+ "operationId" : "get-api-glossary",
+ "summary" : "GET /api/glossary",
+ "description" : "Fetch all glossary entries, optionally filtered by search term.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -37210,21 +32285,13 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/metabot/metabot" ]
+ "tags" : [ "/api/glossary" ]
},
- "put" : {
- "operationId" : "put-api-metabot-metabot-id",
- "summary" : "PUT /api/metabot/metabot/{id}",
- "description" : "Update a metabot instance",
- "parameters" : [ {
- "in" : "path",
- "name" : "id",
- "required" : true,
- "schema" : {
- "type" : "integer",
- "minimum" : 1
- }
- } ],
+ "post" : {
+ "operationId" : "post-api-glossary",
+ "summary" : "POST /api/glossary",
+ "description" : "Create a new glossary entry.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -37242,31 +32309,28 @@
"schema" : {
"type" : "object",
"properties" : {
- "collection_id" : {
- "oneOf" : [ {
- "type" : "integer",
- "minimum" : 1
- }, {
- "type" : "null"
- } ]
+ "definition" : {
+ "type" : "string",
+ "minLength" : 1
},
- "use_verified_content" : {
- "type" : "boolean"
+ "term" : {
+ "type" : "string",
+ "minLength" : 1
}
},
- "additionalProperties" : false
+ "required" : [ "term", "definition" ]
}
}
}
},
- "tags" : [ "/api/metabot/metabot" ]
+ "tags" : [ "/api/glossary" ]
}
},
- "/api/metabot/metabot/{id}/prompt-suggestions" : {
- "get" : {
- "operationId" : "get-api-metabot-metabot-id-prompt-suggestions",
- "summary" : "GET /api/metabot/metabot/{id}/prompt-suggestions",
- "description" : "Return the prompt suggestions for the metabot instance with `id`.",
+ "/api/glossary/{id}" : {
+ "put" : {
+ "operationId" : "put-api-glossary-id",
+ "summary" : "PUT /api/glossary/{id}",
+ "description" : "Update an existing glossary entry.",
"parameters" : [ {
"in" : "path",
"name" : "id",
@@ -37274,30 +32338,8 @@
"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
- }
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -37310,12 +32352,32 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/metabot/metabot" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "definition" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "term" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ },
+ "required" : [ "term", "definition" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/glossary" ]
},
"delete" : {
- "operationId" : "delete-api-metabot-metabot-id-prompt-suggestions",
- "summary" : "DELETE /api/metabot/metabot/{id}/prompt-suggestions",
- "description" : "Delete all prompt suggestions for the metabot instance with `id`.",
+ "operationId" : "delete-api-glossary-id",
+ "summary" : "DELETE /api/glossary/{id}",
+ "description" : "Delete a glossary entry.",
"parameters" : [ {
"in" : "path",
"name" : "id",
@@ -37323,7 +32385,8 @@
"schema" : {
"type" : "integer",
"minimum" : 1
- }
+ },
+ "description" : "value must be an integer greater than zero."
} ],
"responses" : {
"2XX" : {
@@ -37336,23 +32399,15 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/metabot/metabot" ]
+ "tags" : [ "/api/glossary" ]
}
},
- "/api/metabot/metabot/{id}/prompt-suggestions/regenerate" : {
- "post" : {
- "operationId" : "post-api-metabot-metabot-id-prompt-suggestions-regenerate",
- "summary" : "POST /api/metabot/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/google/settings" : {
+ "put" : {
+ "operationId" : "put-api-google-settings",
+ "summary" : "PUT /api/google/settings",
+ "description" : "Update Google Sign-In related settings. You must be a superuser to do this.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -37364,31 +32419,47 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/metabot/metabot" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "google-auth-auto-create-accounts-domain" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "google-auth-client-id" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "google-auth-enabled" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/google" ]
}
},
- "/api/metabot/metabot/{id}/prompt-suggestions/{prompt-id}" : {
- "delete" : {
- "operationId" : "delete-api-metabot-metabot-id-prompt-suggestions-prompt-id",
- "summary" : "DELETE /api/metabot/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
- }
- } ],
+ "/api/ldap/settings" : {
+ "put" : {
+ "operationId" : "put-api-ldap-settings",
+ "summary" : "PUT /api/ldap/settings",
+ "description" : "Update LDAP related settings. You must be a superuser to do this.",
+ "parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
@@ -37400,14 +32471,54 @@
"description" : "Server error response"
}
},
- "tags" : [ "/api/metabot/metabot" ]
+ "requestBody" : {
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "ldap-enabled" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "ldap-host" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "ldap-password" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "ldap-port" : {
+ "oneOf" : [ {
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/ldap" ]
}
},
- "/api/metabot/slack/events" : {
+ "/api/llm/extract-tables" : {
"post" : {
- "operationId" : "post-api-metabot-slack-events",
- "summary" : "POST /api/metabot/slack/events",
- "description" : "Respond to activities in Slack",
+ "operationId" : "post-api-llm-extract-tables",
+ "summary" : "POST /api/llm/extract-tables",
+ "description" : "Parse SQL and return referenced tables with their columns.\n\n Uses Macaw to parse the SQL, resolves table names to IDs,\n and returns permission-filtered tables with column metadata.\n\n This is a lightweight endpoint that does not trigger fingerprinting\n or field value fetching.",
"parameters" : [ ],
"responses" : {
"2XX" : {
@@ -37417,23 +32528,94 @@
"schema" : {
"type" : "object",
"properties" : {
- "body" : {
- "type" : "string"
- },
- "headers" : {
- "type" : "object",
- "properties" : {
- "Content-Type" : {
- "const" : "text/plain"
- }
- },
- "required" : [ "Content-Type" ]
- },
- "status" : {
- "const" : 200
+ "tables" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "columns" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "database_type" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "fk_target" : {
+ "type" : "object",
+ "properties" : {
+ "field_name" : {
+ "type" : "string"
+ },
+ "table_name" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "table_name", "field_name" ]
+ },
+ "id" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "semantic_type" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "id", "name" ]
+ }
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "id", "name", "columns" ]
+ }
}
},
- "required" : [ "status", "headers", "body" ]
+ "required" : [ "tables" ]
}
}
}
@@ -37449,92 +32631,132 @@
"content" : {
"application/json" : {
"schema" : {
- "oneOf" : [ {
- "type" : "object",
- "properties" : {
- "challenge" : {
- "type" : "string"
- },
- "type" : {
- "const" : "url_verification"
- }
- },
- "required" : [ "type", "challenge" ]
- }, {
- "type" : "object",
- "properties" : {
- "event" : {
- "type" : "object",
- "properties" : {
- "event_ts" : {
- "type" : "string"
- },
- "type" : {
- "type" : "string"
- }
- },
- "required" : [ "type", "event_ts" ]
- },
- "type" : {
- "const" : "event_callback"
- }
+ "type" : "object",
+ "properties" : {
+ "database_id" : {
+ "type" : "integer",
+ "minimum" : 1
},
- "required" : [ "type", "event" ]
- }, {
+ "sql" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "database_id", "sql" ]
+ }
+ }
+ }
+ },
+ "tags" : [ "/api/llm" ]
+ }
+ },
+ "/api/llm/generate-sql" : {
+ "post" : {
+ "operationId" : "post-api-llm-generate-sql",
+ "summary" : "POST /api/llm/generate-sql",
+ "description" : "Generate SQL from a natural language prompt.\n\n Requires:\n - LLM to be configured (Anthropic API key set in admin settings)\n - At least one table reference (explicit @mention or implicit from source_sql)\n - A database_id parameter\n\n Returns generated SQL and the list of tables used for context.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response",
+ "content" : {
+ "application/json" : {
+ "schema" : {
"type" : "object",
"properties" : {
- "type" : {
+ "referenced_entities" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "columns" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "database_type" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "fk_target" : {
+ "type" : "object",
+ "properties" : {
+ "field_name" : {
+ "type" : "string"
+ },
+ "table_name" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "table_name", "field_name" ]
+ },
+ "id" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "semantic_type" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "id", "name" ]
+ }
+ },
+ "description" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display_name" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "id" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "model" : {
+ "type" : "string"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "schema" : {
+ "oneOf" : [ {
+ "type" : "string"
+ }, {
+ "type" : "null"
+ } ]
+ }
+ },
+ "required" : [ "model", "id", "name", "columns" ]
+ }
+ },
+ "sql" : {
"type" : "string"
}
},
- "required" : [ "type" ]
- } ]
- }
- }
- }
- },
- "tags" : [ "/api/metabot/slack" ]
- }
- },
- "/api/metabot/slack/interactive" : {
- "post" : {
- "operationId" : "post-api-metabot-slack-interactive",
- "summary" : "POST /api/metabot/slack/interactive",
- "description" : "Handle interactive payloads from Slack (button clicks, modal submissions).",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response"
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "tags" : [ "/api/metabot/slack" ]
- }
- },
- "/api/metabot/slack/settings" : {
- "put" : {
- "operationId" : "put-api-metabot-slack-settings",
- "summary" : "PUT /api/metabot/slack/settings",
- "description" : "Update Metabot Slack settings atomically.\n All credential fields must be provided together.\n Setting values requires the metabot-v3 feature, but clearing values is always allowed.\n slack-connect-enabled is automatically set to true when credentials are provided, nil when cleared.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Successful response",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "object",
- "properties" : {
- "ok" : {
- "type" : "boolean"
- }
- },
- "required" : [ "ok" ]
+ "required" : [ "sql", "referenced_entities" ]
}
}
}
@@ -37552,75 +32774,72 @@
"schema" : {
"type" : "object",
"properties" : {
- "metabot-slack-signing-secret" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
+ "database_id" : {
+ "type" : "integer",
+ "minimum" : 1
},
- "slack-connect-client-id" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
+ "prompt" : {
+ "type" : "string"
},
- "slack-connect-client-secret" : {
- "oneOf" : [ {
- "type" : "string",
- "minLength" : 1
- }, {
- "type" : "null"
- } ]
+ "referenced_entities" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "model" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "model", "id" ]
+ }
+ },
+ "source_sql" : {
+ "type" : "string"
}
},
- "required" : [ "slack-connect-client-id", "slack-connect-client-secret", "metabot-slack-signing-secret" ]
+ "required" : [ "prompt", "database_id" ]
}
}
}
},
- "tags" : [ "/api/metabot/slack" ]
+ "tags" : [ "/api/llm" ]
}
},
- "/api/metabot/tools/answer-sources" : {
- "post" : {
- "operationId" : "post-api-metabot-tools-answer-sources",
- "summary" : "POST /api/metabot/tools/answer-sources",
- "description" : "Return top level meta information about available information sources.",
+ "/api/llm/list-models" : {
+ "get" : {
+ "operationId" : "get-api-llm-list-models",
+ "summary" : "GET /api/llm/list-models",
+ "description" : "List available LLM models from the configured provider.\n\n Requires LLM to be configured (Anthropic API key set in admin settings).",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
+ "description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "models" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "display_name" : {
+ "type" : "string"
+ },
+ "id" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "id", "display_name" ]
+ }
}
},
- "required" : [ "conversation_id" ]
+ "required" : [ "models" ]
}
}
}
@@ -37632,86 +32851,18 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "type" : "object",
- "properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.answer-sources-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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
- }
- }
- }
- },
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/llm" ]
}
},
- "/api/metabot/tools/create-alert" : {
+ "/api/logger/adjustment" : {
"post" : {
- "operationId" : "post-api-metabot-tools-create-alert",
- "summary" : "POST /api/metabot/tools/create-alert",
- "description" : "Create an alert for a saved question.",
+ "operationId" : "post-api-logger-adjustment",
+ "summary" : "POST /api/logger/adjustment",
+ "description" : "Temporarily adjust the log levels.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "error" : {
- "type" : "string"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -37724,79 +32875,102 @@
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"type" : "object",
"properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.create-alert-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}"
+ "duration" : {
+ "type" : "integer"
},
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "duration_unit" : {
+ "$ref" : "#/components/schemas/metabase.logger.api.time-unit"
},
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
+ "log_levels" : { }
},
- "required" : [ "arguments", "conversation_id" ]
+ "required" : [ "duration", "duration_unit", "log_levels" ]
}
}
}
},
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/logger" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-logger-adjustment",
+ "summary" : "DELETE /api/logger/adjustment",
+ "description" : "Undo any log level adjustments.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/logger" ]
+ }
+ },
+ "/api/logger/logs" : {
+ "get" : {
+ "operationId" : "get-api-logger-logs",
+ "summary" : "GET /api/logger/logs",
+ "description" : "Logs.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/logger" ]
}
},
- "/api/metabot/tools/create-dashboard-subscription" : {
- "post" : {
- "operationId" : "post-api-metabot-tools-create-dashboard-subscription",
- "summary" : "POST /api/metabot/tools/create-dashboard-subscription",
- "description" : "Create a dashboard subscription and send it to a slack channel.",
+ "/api/logger/presets" : {
+ "get" : {
+ "operationId" : "get-api-logger-presets",
+ "summary" : "GET /api/logger/presets",
+ "description" : "Get all known presets.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
+ "description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "error" : {
- "type" : "string"
- },
- "metabot_id" : {
- "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "display_name" : {
"type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
+ },
+ "id" : {
"type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
+ },
+ "loggers" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "properties" : {
+ "level" : {
+ "$ref" : "#/components/schemas/metabase.logger.api.log-level"
+ },
+ "name" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "name", "level" ]
+ }
+ }
+ },
+ "required" : [ "id", "display_name", "loggers" ]
+ }
}
}
}
@@ -37808,80 +32982,42 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "type" : "object",
- "properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "arguments", "conversation_id" ]
- }
- }
+ "tags" : [ "/api/logger" ]
+ }
+ },
+ "/api/login-history/current" : {
+ "get" : {
+ "operationId" : "get-api-login-history-current",
+ "summary" : "GET /api/login-history/current",
+ "description" : "Fetch recent logins for the current user.",
+ "parameters" : [ ],
+ "responses" : {
+ "2XX" : {
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/login-history" ]
}
},
- "/api/metabot/tools/field-values" : {
+ "/api/measure" : {
"post" : {
- "operationId" : "post-api-metabot-tools-field-values",
- "summary" : "POST /api/metabot/tools/field-values",
- "description" : "Return statistics and/or values for a given field of a given entity.",
+ "operationId" : "post-api-measure",
+ "summary" : "POST /api/measure",
+ "description" : "Create a new `Measure`.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
+ "description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
+ "$ref" : "#/components/schemas/metabase.measures.api.measure"
}
}
}
@@ -37897,76 +33033,52 @@
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"type" : "object",
"properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.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}"
+ "definition" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
},
- "metabot_id" : {
+ "description" : {
"oneOf" : [ {
"type" : "string"
}, {
"type" : "null"
} ]
},
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "table_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}
},
- "required" : [ "arguments", "conversation_id" ]
+ "required" : [ "name", "table_id", "definition" ]
}
}
}
},
- "tags" : [ "/api/metabot/tools" ]
- }
- },
- "/api/metabot/tools/filter-records" : {
- "post" : {
- "operationId" : "post-api-metabot-tools-filter-records",
- "summary" : "POST /api/metabot/tools/filter-records",
- "description" : "Apply filters to records from a data source (query, report, or table).",
+ "tags" : [ "/api/measure" ]
+ },
+ "get" : {
+ "operationId" : "get-api-measure",
+ "summary" : "GET /api/measure",
+ "description" : "Fetch *all* `Measures`.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
+ "description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.measures.api.measure"
+ }
}
}
}
@@ -37978,89 +33090,65 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "type" : "object",
- "properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "arguments", "conversation_id" ]
+ "tags" : [ "/api/measure" ]
+ }
+ },
+ "/api/measure/{id}" : {
+ "get" : {
+ "operationId" : "get-api-measure-id",
+ "summary" : "GET /api/measure/{id}",
+ "description" : "Fetch `Measure` with 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",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/metabase.measures.api.measure"
+ }
}
}
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
}
},
- "tags" : [ "/api/metabot/tools" ]
- }
- },
- "/api/metabot/tools/generate-insights" : {
- "post" : {
- "operationId" : "post-api-metabot-tools-generate-insights",
- "summary" : "POST /api/metabot/tools/generate-insights",
- "description" : "Generate insights.",
- "parameters" : [ ],
+ "tags" : [ "/api/measure" ]
+ },
+ "put" : {
+ "operationId" : "put-api-measure-id",
+ "summary" : "PUT /api/measure/{id}",
+ "description" : "Update a `Measure` with 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" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
+ "description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "output" : {
- "type" : "string"
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "reactions" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabot.reaction.redirect"
- }
- }
- },
- "required" : [ "output", "reactions", "conversation_id" ]
+ "$ref" : "#/components/schemas/metabase.measures.api.measure"
}
}
}
@@ -38076,76 +33164,89 @@
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"type" : "object",
"properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.generate-insights-arguments"
+ "archived" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "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}"
+ "definition" : {
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : { }
+ }, {
+ "type" : "null"
+ } ]
},
- "metabot_id" : {
+ "description" : {
"oneOf" : [ {
"type" : "string"
}, {
"type" : "null"
} ]
},
- "profile_id" : {
+ "name" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
+ },
+ "revision_message" : {
+ "type" : "string",
+ "minLength" : 1
}
},
- "required" : [ "arguments", "conversation_id" ]
+ "required" : [ "revision_message" ]
}
}
}
},
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/measure" ]
}
},
- "/api/metabot/tools/get-current-user" : {
- "post" : {
- "operationId" : "post-api-metabot-tools-get-current-user",
- "summary" : "POST /api/metabot/tools/get-current-user",
- "description" : "Get information about user that started the conversation.",
- "parameters" : [ ],
+ "/api/measure/{id}/dimension/{dimension-key}/remapping" : {
+ "get" : {
+ "operationId" : "get-api-measure-id-dimension-dimension-key-remapping",
+ "summary" : "GET /api/measure/{id}/dimension/{dimension-key}/remapping",
+ "description" : "Fetch remapped value for a specific dimension value.\n\n Returns a pair [value, display-name] if remapping exists, or [value] otherwise.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "path",
+ "name" : "dimension-key",
+ "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" : "query",
+ "name" : "value",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ } ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
+ "description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
+ "$ref" : "#/components/schemas/metabase.measures.api.RemappedValueResponse"
}
}
}
@@ -38157,54 +33258,54 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.deftool.tool-request"
- }
- }
- }
- },
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/measure" ]
}
},
- "/api/metabot/tools/get-dashboard-details" : {
- "post" : {
- "operationId" : "post-api-metabot-tools-get-dashboard-details",
- "summary" : "POST /api/metabot/tools/get-dashboard-details",
- "description" : "Get information about a given dashboard.",
- "parameters" : [ ],
+ "/api/measure/{id}/dimension/{dimension-key}/search" : {
+ "get" : {
+ "operationId" : "get-api-measure-id-dimension-dimension-key-search",
+ "summary" : "GET /api/measure/{id}/dimension/{dimension-key}/search",
+ "description" : "Search for values of a dimension that contain the query string.\n\n Returns field values matching the search query in the same format as the field values API.",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "path",
+ "name" : "dimension-key",
+ "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" : "query",
+ "name" : "query",
+ "required" : true,
+ "schema" : {
+ "type" : "string",
+ "minLength" : 1
+ }
+ } ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
+ "description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "type" : "array",
+ "items" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
}
- },
- "required" : [ "conversation_id" ]
+ }
}
}
}
@@ -38216,80 +33317,60 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "type" : "object",
- "properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.get-dashboard-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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "arguments", "conversation_id" ]
- }
- }
- }
- },
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/measure" ]
}
},
- "/api/metabot/tools/get-document-details" : {
- "post" : {
- "operationId" : "post-api-metabot-tools-get-document-details",
- "summary" : "POST /api/metabot/tools/get-document-details",
- "description" : "Get information about a given document.",
- "parameters" : [ ],
+ "/api/measure/{id}/dimension/{dimension-key}/values" : {
+ "get" : {
+ "operationId" : "get-api-measure-id-dimension-dimension-key-values",
+ "summary" : "GET /api/measure/{id}/dimension/{dimension-key}/values",
+ "description" : "Fetch values for a dimension of a measure.\n\n Returns field values in the same format as the field values API:\n - values: list of [value] or [value, display-name] tuples\n - field_id: the underlying field ID\n - has_more_values: boolean indicating if there are more values",
+ "parameters" : [ {
+ "in" : "path",
+ "name" : "id",
+ "required" : true,
+ "schema" : {
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "description" : "value must be an integer greater than zero."
+ }, {
+ "in" : "path",
+ "name" : "dimension-key",
+ "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" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
+ "description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "has_more_values" : {
+ "type" : "boolean"
},
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "values" : {
+ "type" : "array",
+ "items" : {
+ "anyOf" : [ {
+ "type" : "array",
+ "prefixItems" : [ { }, {
+ "type" : "string"
+ } ]
+ }, {
+ "type" : "array",
+ "prefixItems" : [ { } ]
+ } ]
+ }
}
},
- "required" : [ "conversation_id" ]
+ "required" : [ "has_more_values", "values" ]
}
}
}
@@ -38301,83 +33382,18 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "type" : "object",
- "properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.get-document-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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "arguments", "conversation_id" ]
- }
- }
- }
- },
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/measure" ]
}
},
- "/api/metabot/tools/get-metric-details" : {
+ "/api/metabot/agent-streaming" : {
"post" : {
- "operationId" : "post-api-metabot-tools-get-metric-details",
- "summary" : "POST /api/metabot/tools/get-metric-details",
- "description" : "Get information about a given metric.",
+ "operationId" : "post-api-metabot-agent-streaming",
+ "summary" : "POST /api/metabot/agent-streaming",
+ "description" : "Send a chat message to the LLM via the AI Proxy.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -38390,79 +33406,62 @@
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"type" : "object",
"properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.get-metric-details-arguments"
+ "context" : {
+ "$ref" : "#/components/schemas/metabase.metabot.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}"
},
- "metabot_id" : {
+ "debug" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "boolean"
}, {
"type" : "null"
} ]
},
- "profile_id" : {
+ "history" : {
"oneOf" : [ {
- "type" : "string"
+ "$ref" : "#/components/schemas/metabase.metabot.schema.messages"
}, {
"type" : "null"
} ]
+ },
+ "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", "history", "state" ]
}
}
}
},
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/metabot" ]
}
},
- "/api/metabot/tools/get-query-details" : {
+ "/api/metabot/describe/card" : {
"post" : {
- "operationId" : "post-api-metabot-tools-get-query-details",
- "summary" : "POST /api/metabot/tools/get-query-details",
- "description" : "Get information about a given query.",
+ "operationId" : "post-api-metabot-describe-card",
+ "summary" : "POST /api/metabot/describe/card",
+ "description" : "Summarize a question.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -38475,164 +33474,202 @@
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"type" : "object",
"properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.get-query-details-arguments"
+ "visualization_settings" : {
+ "description" : "Value must be a map.",
+ "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}"
+ "dataset" : {
+ "oneOf" : [ {
+ "type" : "boolean"
+ }, {
+ "type" : "null"
+ } ]
},
- "metabot_id" : {
+ "dataset_query" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ },
+ "parameter_mappings" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter-mapping"
+ }
}, {
"type" : "null"
} ]
},
- "profile_id" : {
+ "collection_position" : {
"oneOf" : [ {
- "type" : "string"
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
}, {
"type" : "null"
} ]
- }
- },
- "required" : [ "arguments", "conversation_id" ]
- }
- }
- }
- },
- "tags" : [ "/api/metabot/tools" ]
- }
- },
- "/api/metabot/tools/get-report-details" : {
- "post" : {
- "operationId" : "post-api-metabot-tools-get-report-details",
- "summary" : "POST /api/metabot/tools/get-report-details",
- "description" : "Get information about a given report.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
},
- "required" : [ "conversation_id" ]
- }
- }
- }
- },
- "4XX" : {
- "description" : "Client error response"
- },
- "5XX" : {
- "description" : "Server error response"
- }
- },
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "type" : "object",
- "properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.get-report-details-arguments"
+ "result_metadata" : {
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/metabase.analyze.query-results.ResultsMetadata"
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "collection_id" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
},
- "conversation_id" : {
- "description" : "value must be a valid UUID.",
+ "cache_ttl" : {
+ "oneOf" : [ {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "display" : {
"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
},
- "metabot_id" : {
+ "parameters" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/metabase.parameters.schema.parameter"
+ }
}, {
"type" : "null"
} ]
},
- "profile_id" : {
+ "description" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
}
},
- "required" : [ "arguments", "conversation_id" ]
+ "required" : [ "dataset_query", "display", "visualization_settings" ]
}
}
}
},
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/metabot" ]
+ }
+ },
+ "/api/metabot/describe/dashboard/{id}" : {
+ "post" : {
+ "operationId" : "post-api-metabot-describe-dashboard-id",
+ "summary" : "POST /api/metabot/describe/dashboard/{id}",
+ "description" : "Provide a summary of a dashboard.",
+ "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/metabot" ]
}
},
- "/api/metabot/tools/get-snippet-details" : {
+ "/api/metabot/document/generate-content" : {
"post" : {
- "operationId" : "post-api-metabot-tools-get-snippet-details",
- "summary" : "POST /api/metabot/tools/get-snippet-details",
- "description" : "Get the content of a single SQL snippet.",
+ "operationId" : "post-api-metabot-document-generate-content",
+ "summary" : "POST /api/metabot/document/generate-content",
+ "description" : "Create a new piece of content to insert into the document. Kept for backwards compatibility; now uses the native Clojure agent.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
+ "description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"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}"
- },
- "metabot_id" : {
+ "description" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
},
- "profile_id" : {
+ "draft_card" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "object",
+ "properties" : {
+ "database_id" : {
+ "description" : "value must be an integer greater than zero.",
+ "type" : "integer",
+ "minimum" : 1
+ },
+ "dataset_query" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ },
+ "name" : {
+ "type" : "string",
+ "minLength" : 1
+ },
+ "parameters" : {
+ "oneOf" : [ {
+ "type" : "array",
+ "items" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }
+ }, {
+ "type" : "null"
+ } ]
+ },
+ "visualization_settings" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
+ }
+ },
+ "required" : [ "name", "dataset_query", "database_id", "parameters", "visualization_settings" ]
}, {
"type" : "null"
} ]
},
- "structured_output" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.full-snippet"
+ "error" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
}
},
- "required" : [ "structured_output", "conversation_id" ]
+ "required" : [ "draft_card", "error", "description" ]
}
}
}
@@ -38648,85 +33685,35 @@
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"type" : "object",
"properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.get-snippet-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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "minLength" : 1
},
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "references" : {
+ "description" : "Value must be a map.",
+ "type" : "object",
+ "properties" : { }
}
},
- "required" : [ "arguments", "conversation_id" ]
+ "required" : [ "instructions" ]
}
}
}
},
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/metabot/document" ]
}
},
- "/api/metabot/tools/get-snippets" : {
+ "/api/metabot/feedback" : {
"post" : {
- "operationId" : "post-api-metabot-tools-get-snippets",
- "summary" : "POST /api/metabot/tools/get-snippets",
- "description" : "Get a list of all known SQL snippets.",
+ "operationId" : "post-api-metabot-feedback",
+ "summary" : "POST /api/metabot/feedback",
+ "description" : "Proxy Metabot feedback to Harbormaster, adding the premium embedding token.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "structured_output" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.basic-snippet"
- }
- }
- },
- "required" : [ "structured_output", "conversation_id" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -38739,53 +33726,78 @@
"content" : {
"application/json" : {
"schema" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.deftool.tool-request"
+ "type" : "object",
+ "properties" : { }
}
}
}
},
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/metabot" ]
}
},
- "/api/metabot/tools/get-table-details" : {
- "post" : {
- "operationId" : "post-api-metabot-tools-get-table-details",
- "summary" : "POST /api/metabot/tools/get-table-details",
- "description" : "Get information about a given table or model.",
+ "/api/metabot/metabot" : {
+ "get" : {
+ "operationId" : "get-api-metabot-metabot",
+ "summary" : "GET /api/metabot/metabot",
+ "description" : "List configured metabot instances",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
- }
- }
- }
+ "description" : "Successful response"
+ },
+ "4XX" : {
+ "description" : "Client error response"
+ },
+ "5XX" : {
+ "description" : "Server error response"
+ }
+ },
+ "tags" : [ "/api/metabot/metabot" ]
+ }
+ },
+ "/api/metabot/metabot/{id}" : {
+ "get" : {
+ "operationId" : "get-api-metabot-metabot-id",
+ "summary" : "GET /api/metabot/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/metabot/metabot" ]
+ },
+ "put" : {
+ "operationId" : "put-api-metabot-metabot-id",
+ "summary" : "PUT /api/metabot/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"
@@ -38798,79 +33810,68 @@
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"type" : "object",
"properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.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}"
- },
- "metabot_id" : {
+ "collection_id" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "integer",
+ "minimum" : 1
}, {
"type" : "null"
} ]
},
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "use_verified_content" : {
+ "type" : "boolean"
}
},
- "required" : [ "arguments", "conversation_id" ]
+ "additionalProperties" : false
}
}
}
},
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/metabot/metabot" ]
}
},
- "/api/metabot/tools/get-tables" : {
- "post" : {
- "operationId" : "post-api-metabot-tools-get-tables",
- "summary" : "POST /api/metabot/tools/get-tables",
- "description" : "Get information about the tables in a given database.",
- "parameters" : [ ],
+ "/api/metabot/metabot/{id}/prompt-suggestions" : {
+ "get" : {
+ "operationId" : "get-api-metabot-metabot-id-prompt-suggestions",
+ "summary" : "GET /api/metabot/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" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -38879,83 +33880,52 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "type" : "object",
- "properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "arguments", "conversation_id" ]
- }
- }
+ "tags" : [ "/api/metabot/metabot" ]
+ },
+ "delete" : {
+ "operationId" : "delete-api-metabot-metabot-id-prompt-suggestions",
+ "summary" : "DELETE /api/metabot/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/metabot/tools" ]
+ "tags" : [ "/api/metabot/metabot" ]
}
},
- "/api/metabot/tools/query-datasource" : {
+ "/api/metabot/metabot/{id}/prompt-suggestions/regenerate" : {
"post" : {
- "operationId" : "post-api-metabot-tools-query-datasource",
- "summary" : "POST /api/metabot/tools/query-datasource",
- "description" : "Construct a query from a model or table data source.",
- "parameters" : [ ],
+ "operationId" : "post-api-metabot-metabot-id-prompt-suggestions-regenerate",
+ "summary" : "POST /api/metabot/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" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -38964,83 +33934,34 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "type" : "object",
- "properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "arguments", "conversation_id" ]
- }
- }
- }
- },
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/metabot/metabot" ]
}
},
- "/api/metabot/tools/query-metric" : {
- "post" : {
- "operationId" : "post-api-metabot-tools-query-metric",
- "summary" : "POST /api/metabot/tools/query-metric",
- "description" : "Construct a query from a metric.",
- "parameters" : [ ],
- "responses" : {
- "2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
- }
- }
- }
+ "/api/metabot/metabot/{id}/prompt-suggestions/{prompt-id}" : {
+ "delete" : {
+ "operationId" : "delete-api-metabot-metabot-id-prompt-suggestions-prompt-id",
+ "summary" : "DELETE /api/metabot/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"
@@ -39049,80 +33970,40 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "type" : "object",
- "properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "arguments", "conversation_id" ]
- }
- }
- }
- },
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/metabot/metabot" ]
}
},
- "/api/metabot/tools/query-model" : {
+ "/api/metabot/slack/events" : {
"post" : {
- "operationId" : "post-api-metabot-tools-query-model",
- "summary" : "POST /api/metabot/tools/query-model",
- "description" : "Construct a query from a model.",
+ "operationId" : "post-api-metabot-slack-events",
+ "summary" : "POST /api/metabot/slack/events",
+ "description" : "Respond to activities in Slack",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
+ "description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"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}"
+ "body" : {
+ "type" : "string"
},
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "headers" : {
+ "type" : "object",
+ "properties" : {
+ "Content-Type" : {
+ "const" : "text/plain"
+ }
+ },
+ "required" : [ "Content-Type" ]
},
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "status" : {
+ "const" : 200
}
},
- "required" : [ "conversation_id" ]
+ "required" : [ "status", "headers", "body" ]
}
}
}
@@ -39138,79 +34019,62 @@
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "type" : "object",
- "properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.tools.api.query-model-arguments"
+ "oneOf" : [ {
+ "type" : "object",
+ "properties" : {
+ "challenge" : {
+ "type" : "string"
+ },
+ "type" : {
+ "const" : "url_verification"
+ }
},
- "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" : [ "type", "challenge" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "event" : {
+ "type" : "object",
+ "properties" : {
+ "event_ts" : {
+ "type" : "string"
+ },
+ "type" : {
+ "type" : "string"
+ }
+ },
+ "required" : [ "type", "event_ts" ]
+ },
+ "type" : {
+ "const" : "event_callback"
+ }
},
- "metabot_id" : {
- "oneOf" : [ {
+ "required" : [ "type", "event" ]
+ }, {
+ "type" : "object",
+ "properties" : {
+ "type" : {
"type" : "string"
- }, {
- "type" : "null"
- } ]
+ }
},
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "arguments", "conversation_id" ]
+ "required" : [ "type" ]
+ } ]
}
}
}
},
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/metabot/slack" ]
}
},
- "/api/metabot/tools/search" : {
+ "/api/metabot/slack/interactive" : {
"post" : {
- "operationId" : "post-api-metabot-tools-search",
- "summary" : "POST /api/metabot/tools/search",
- "description" : "Enhanced search with term and semantic queries using Reciprocal Rank Fusion.",
+ "operationId" : "post-api-metabot-slack-interactive",
+ "summary" : "POST /api/metabot/slack/interactive",
+ "description" : "Handle interactive payloads from Slack (button clicks, modal submissions).",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
- }
- }
- }
+ "description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
@@ -39219,80 +34083,28 @@
"description" : "Server error response"
}
},
- "requestBody" : {
- "content" : {
- "application/json" : {
- "schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
- "type" : "object",
- "properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- }
- },
- "required" : [ "conversation_id" ]
- }
- }
- }
- },
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/metabot/slack" ]
}
},
- "/api/metabot/tools/search_v2" : {
- "post" : {
- "operationId" : "post-api-metabot-tools-search_v2",
- "summary" : "POST /api/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.",
+ "/api/metabot/slack/settings" : {
+ "put" : {
+ "operationId" : "put-api-metabot-slack-settings",
+ "summary" : "PUT /api/metabot/slack/settings",
+ "description" : "Update Metabot Slack settings atomically.\n All credential fields must be provided together.\n Setting values requires the metabot-v3 feature, but clearing values is always allowed.\n slack-connect-enabled is automatically set to true when credentials are provided, nil when cleared.",
"parameters" : [ ],
"responses" : {
"2XX" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
+ "description" : "Successful response",
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"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}"
- },
- "metabot_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
- },
- "profile_id" : {
- "oneOf" : [ {
- "type" : "string"
- }, {
- "type" : "null"
- } ]
+ "ok" : {
+ "type" : "boolean"
}
},
- "required" : [ "conversation_id" ]
+ "required" : [ "ok" ]
}
}
}
@@ -39308,38 +34120,39 @@
"content" : {
"application/json" : {
"schema" : {
- "description" : "Base schema for all tool requests. Contains the conversation ID and optional profile ID.",
"type" : "object",
"properties" : {
- "arguments" : {
- "$ref" : "#/components/schemas/metabase.metabot.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}"
+ "metabot-slack-signing-secret" : {
+ "oneOf" : [ {
+ "type" : "string",
+ "minLength" : 1
+ }, {
+ "type" : "null"
+ } ]
},
- "metabot_id" : {
+ "slack-connect-client-id" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
},
- "profile_id" : {
+ "slack-connect-client-secret" : {
"oneOf" : [ {
- "type" : "string"
+ "type" : "string",
+ "minLength" : 1
}, {
"type" : "null"
} ]
}
},
- "required" : [ "conversation_id" ]
+ "required" : [ "slack-connect-client-id", "slack-connect-client-secret", "metabot-slack-signing-secret" ]
}
}
}
},
- "tags" : [ "/api/metabot/tools" ]
+ "tags" : [ "/api/metabot/slack" ]
}
},
"/api/metric" : {